From: Emil Velikov <emil.veli...@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.veli...@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

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to