summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2018-08-02 16:36:08 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2018-08-21 14:20:48 +0100
commit166c6e3a955c7ed6ac9c514abb6da30b04f81c8e (patch)
tree53ff57ddc8820ed32a07524a1150b8add201f7dc
parent82084e094ffbf8dc9d0f6840cb960a66266fa48d (diff)
egl_ext_device_enumeration: check the populate call to eglQueryDevices
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@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
-rw-r--r--tests/egl/spec/egl_ext_device_enumeration/egl_ext_device_enumeration.c5
1 files changed, 5 insertions, 0 deletions
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");