Bug 39534 - failed general and udev tests intended for Intel drm only
Summary: failed general and udev tests intended for Intel drm only
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: libdrm (show other bugs)
Version: XOrg git
Hardware: All All
: low enhancement
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-25 19:29 UTC by guido
Modified: 2019-09-24 17:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to fix udev tests on Intel (when there is actually no Intel drm) (843 bytes, patch)
2011-07-25 19:29 UTC, guido
no flags Details | Splinter Review

Description guido 2011-07-25 19:29:47 UTC
Created attachment 49548 [details] [review]
Patch to fix udev tests on Intel (when there is actually no Intel drm)

In libdrm from git and latest release (2.4.26), there are some tests that fail:

PASS: openclose
PASS: getversion
PASS: getclient
PASS: getstats
lt-setversion: drmtest.c:46: is_master: Assertion `ret == 0' failed.
/bin/sh: line 5:   382 Aborted                 ${dir}$tst
FAIL: setversion
lt-updatedraw: drmtest.c:46: is_master: Assertion `ret == 0' failed.
/bin/sh: line 5:   411 Aborted                 ${dir}$tst
FAIL: updatedraw
PASS: name_from_fd
/bin/sh: line 5:   457 Segmentation fault      ${dir}$tst
FAIL: gem_basic
/bin/sh: line 5:   484 Segmentation fault      ${dir}$tst
FAIL: gem_flink
/bin/sh: line 5:   510 Segmentation fault      ${dir}$tst
FAIL: gem_readwrite
/bin/sh: line 5:   534 Segmentation fault      ${dir}$tst
FAIL: gem_mmap

Starting program: /usr/src/libdrm-2.4.26/tests/.libs/gem_basic 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x000000000040115e in drm_open_matching (pci_glob=0x4014ba "8086:*", flags=0) at drmtest.c:82
82			if (strcmp(udev_device_get_subsystem(parent), "pci") != 0)
(gdb) where
#0  0x000000000040115e in drm_open_matching (pci_glob=0x4014ba "8086:*", flags=0) at drmtest.c:82
#1  0x0000000000400f73 in main (argc=1, argv=0x7fffffffe298) at gem_basic.c:91
(gdb) print parent
$1 = (struct udev_device *) 0x0

Something should be done to skip certain udev function calls when parent is NULL.

See attached patch (which works for both 2.4.26 and git). It avoids the segmentation fault but perhaps, it produces a false positive, I am not sure:

PASS: gem_basic
failed to open intel drm device, skipping
PASS: gem_flink
failed to open intel drm device, skipping
PASS: gem_readwrite
failed to open intel drm device, skipping
PASS: gem_mmap

I have no Intel drm device. I have a Nouveau device. If I disable Intel drm from build by proper configure options, such tests are automatically skipped (but Intel is built by default and it's not easy to figure out what's going in the current situation).

You can always modify the patch to behave slightly different if such tests should fail.
Comment 1 GitLab Migration User 2019-09-24 17:08:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/drm/issues/4.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.