[igt-dev] [PATCH i-g-t] igt/kms_addfb_basic: require display

Jani Nikula jani.nikula at intel.com
Thu Jun 28 09:56:50 UTC 2018


Running the tests with i915.disable_display=1 leads to IGT errors. Skip
tests that need display.

References: http://patchwork.freedesktop.org/patch/msgid/20180608124057.6889-1-jani.nikula@intel.com
Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>

---

What's the best paradigm for this? There's loads of random and cargo
culted igt_requires for this stuff, with various checks on pipes > 0
etc.
---
 tests/kms_addfb_basic.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index 7d8852f02003..e7d3c0e298a3 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -543,9 +543,15 @@ int fd;
 
 igt_main
 {
-	igt_fixture
+	igt_display_t display;
+
+	igt_fixture {
 		fd = drm_open_driver_master(DRIVER_ANY);
 
+		igt_display_init(&display, fd);
+		igt_display_require_output(&display);
+	}
+
 	invalid_tests(fd);
 
 	pitch_tests(fd);
@@ -560,6 +566,8 @@ igt_main
 
 	prop_tests(fd);
 
-	igt_fixture
+	igt_fixture {
+		igt_display_fini(&display);
 		close(fd);
+	}
 }
-- 
2.11.0



More information about the igt-dev mailing list