[Piglit] [PATCH 9/9] egl_ext_device_enumeration: check the populate call to eglQueryDevices
Emil Velikov
emil.l.velikov at gmail.com
Fri Aug 3 12:46:37 UTC 2018
From: Emil Velikov <emil.velikov at collabora.com>
The first call gives us the number of devices, while the second
populates the user provided array. Check that the second call returns at
least one device.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
.../egl_ext_device_enumeration/egl_ext_device_enumeration.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/egl/spec/egl_ext_device_enumeration/egl_ext_device_enumeration.c b/tests/egl/spec/egl_ext_device_enumeration/egl_ext_device_enumeration.c
index 0b524d556..e14ffbdf4 100644
--- a/tests/egl/spec/egl_ext_device_enumeration/egl_ext_device_enumeration.c
+++ b/tests/egl/spec/egl_ext_device_enumeration/egl_ext_device_enumeration.c
@@ -79,6 +79,11 @@ main(void)
piglit_report_result(PIGLIT_FAIL);
}
+ if (!numdevs) {
+ printf("Zero devices enumerated\n");
+ piglit_report_result(PIGLIT_FAIL);
+ }
+
for (i = 0; i < numdevs; i++)
if (devs[i] == NULL) {
printf("Enumerated device slot not initialized\n");
--
2.18.0
More information about the Piglit
mailing list