[igt-dev] [PATCH i-g-t] tests/testdisplay: Skip modeset if no display is connected

Swati Sharma swati2.sharma at intel.com
Thu Aug 4 08:18:40 UTC 2022


Even if no display is connected; test executes and result in
SUCCESS with no modeset happening.
Made changes, to SKIP test if there is no display connected.

Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
---
 tests/testdisplay.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index e9fbd2601..8ceca363c 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -478,6 +478,9 @@ int update_display(bool probe)
 	struct connector *connectors;
 	int c;
 
+	igt_display_require(&display, drm_fd);
+	igt_display_require_output(&display);
+
 	resources = drmModeGetResources(drm_fd);
 	igt_require(resources);
 
-- 
2.25.1



More information about the igt-dev mailing list