From: Eric Engestrom Date: Fri, 9 Nov 2018 19:00:35 +0000 (+0000) Subject: tests: skip drmdevice test if the machine doesn't have any drm device X-Git-Tag: libdrm-2.4.97~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e642f480b816f21448fc616f6122df5e8a6070fa;p=platform%2Fupstream%2Flibdrm.git 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 Reviewed-by: Daniel Stone --- diff --git a/tests/drmdevice.c b/tests/drmdevice.c index cdf6e8d..f1c1cd3 100644 --- a/tests/drmdevice.c +++ b/tests/drmdevice.c @@ -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);