mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-24 23:00:11 +01:00
tests: skip drmdevice test if the machine doesn't have any drm device
Error message was invalid too, negative values aren't the number of devices, they're errno error codes. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
8c1fddc640
commit
e642f480b8
1 changed files with 3 additions and 2 deletions
|
|
@ -115,8 +115,9 @@ main(void)
|
|||
max_devices = drmGetDevices2(0, NULL, 0);
|
||||
|
||||
if (max_devices <= 0) {
|
||||
printf("drmGetDevices2() has returned %d\n", max_devices);
|
||||
return -1;
|
||||
printf("drmGetDevices2() has not found any devices (errno=%d)\n",
|
||||
-max_devices);
|
||||
return 77;
|
||||
}
|
||||
printf("--- Devices reported %d ---\n", max_devices);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue