[igt-dev] [i-g-t,v2] igt: Markup more tests that require INTEL

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Tue Jul 24 14:31:19 UTC 2018


v2: Drop igt_require_intel() on drv_module_reload (Chris Wilson)
    drv_module_reload on the whole should not require intel.
    Some particular tests should skip if the module doesn't have the right
    modparam, but if it does it should conform.

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

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