[igt-dev] [PATCH] igt: Markup more tests that require INTEL

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Tue Jul 24 12:26:53 UTC 2018


Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
---
 tests/drv_module_reload.c | 7 ++++++-
 tests/kms_atomic.c        | 4 ++++
 tests/kms_flip.c          | 4 +++-
 tests/kms_plane_lowres.c  | 1 +
 tests/kms_vblank.c        | 4 +++-
 5 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/tests/drv_module_reload.c b/tests/drv_module_reload.c
index 3046d822..79e45172 100644
--- a/tests/drv_module_reload.c
+++ b/tests/drv_module_reload.c
@@ -305,8 +305,13 @@ igt_main
 {
 	int err;
 
-	igt_fixture
+	igt_fixture {
+		int fd;
+		fd = __drm_open_driver(DRIVER_INTEL);
+		igt_require_intel(fd);
+		close(fd);
 		hda_dynamic_debug(true);
+	}
 
 	igt_subtest("basic-reload") {
 		if ((err = reload(NULL)))
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index ac02baf0..b1aa8a0c 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -895,18 +895,21 @@ igt_main
 			igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
 
 		igt_require(overlay);
+		igt_require_intel(display.drm_fd);
 
 		atomic_setup(&display, pipe, output, primary, &fb);
 		plane_overlay(pipe_obj, output, overlay);
 	}
 
 	igt_subtest("plane_primary_legacy") {
+		igt_require_intel(display.drm_fd);
 		atomic_setup(&display, pipe, output, primary, &fb);
 
 		plane_primary(pipe_obj, primary, &fb);
 	}
 
 	igt_subtest("test_only") {
+		igt_require_intel(display.drm_fd);
 		atomic_clear(&display, pipe, primary, output);
 
 		test_only(pipe_obj, primary, output);
@@ -922,6 +925,7 @@ igt_main
 	}
 
 	igt_subtest("plane_invalid_params") {
+		igt_require_intel(display.drm_fd);
 		atomic_setup(&display, pipe, output, primary, &fb);
 
 		plane_invalid_params(pipe_obj, output, primary, &fb);
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 4dcb0691..03173173 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -771,8 +771,10 @@ static unsigned int run_test_step(struct test_output *o)
 	igt_print_activity();
 
 	memset(&hang, 0, sizeof(hang));
-	if (do_flip && (o->flags & TEST_HANG))
+	if (do_flip && (o->flags & TEST_HANG)) {
+		igt_require_intel(drm_fd);
 		hang = hang_gpu(drm_fd);
+	}
 
 	/* try to make sure we can issue two flips during the same frame */
 	if (do_flip && (o->flags & TEST_EBUSY)) {
diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index d1e4b3ca..d2c0b0b2 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -270,6 +270,7 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
 		igt_skip_on(pipe >= data->display.n_pipes);
 
 		igt_display_require_output_on_pipe(&data->display, pipe);
+		igt_require_intel(data->drm_fd);
 	}
 
 	igt_subtest_f("pipe-%s-tiling-none",
diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index 508c0fa0..46072e85 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -127,8 +127,10 @@ static void run_test(data_t *data, void (*testfunc)(data_t *, int, int))
 		 igt_subtest_name(), kmstest_pipe_name(data->pipe),
 		 igt_output_name(output));
 
-	if (!(data->flags & NOHANG))
+	if (!(data->flags & NOHANG)) {
+		igt_require_intel(fd);
 		hang = igt_hang_ring(fd, I915_EXEC_DEFAULT);
+	}
 
 	if (data->flags & BUSY) {
 		union drm_wait_vblank vbl;
-- 
2.18.0



More information about the igt-dev mailing list