[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 09:47:39 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 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index e9fbd2601..c6b819399 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -476,8 +476,12 @@ set_stereo_mode(struct connector *c)
int update_display(bool probe)
{
struct connector *connectors;
+ igt_display_t display;
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