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

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Fri Jul 20 17:01:33 UTC 2018


Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
---
 tests/kms_addfb_basic.c | 4 ++++
 tests/kms_flip.c        | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index 7d8852f0..cd075117 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -106,6 +106,7 @@ static void invalid_tests(int fd)
 	igt_subtest("clobberred-modifier") {
 		f.flags = 0;
 		f.modifier[0] = 0;
+		igt_require_gem(fd);
 		gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4);
 		igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) == 0);
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
@@ -200,6 +201,7 @@ static void tiling_tests(int fd)
 		igt_subtest("framebuffer-vs-set-tiling") {
 			f.handles[0] = gem_bo;
 
+			igt_require_gem(fd);
 			gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 			igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
 			igt_assert(__gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4) == -EBUSY);
@@ -318,6 +320,7 @@ static void size_tests(int fd)
 	}
 
 	igt_subtest("bo-too-small-due-to-tiling") {
+		igt_require_gem(fd);
 		gem_set_tiling(fd, gem_bo_small, I915_TILING_X, 1024*4);
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
 			   errno == EINVAL);
@@ -369,6 +372,7 @@ static void addfb25_tests(int fd)
 
 	igt_subtest_group {
 		igt_fixture {
+			igt_require_gem(fd);
 			gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 			igt_require_fb_modifiers(fd);
 		}
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 393d690a..4dcb0691 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -612,6 +612,7 @@ static void set_y_tiling(struct test_output *o, int fb_idx)
 	r = drmModeGetFB(drm_fd, fb_info->fb_id);
 	igt_assert(r);
 	/* Newer kernels don't allow such shenagians any more, so skip the test. */
+	igt_require_gem(drm_fd);
 	igt_require(__gem_set_tiling(drm_fd, r->handle, I915_TILING_Y, fb_info->stride) == 0);
 	gem_close(drm_fd, r->handle);
 	drmFree(r);
@@ -782,8 +783,10 @@ static unsigned int run_test_step(struct test_output *o)
 	if (do_flip)
 		do_or_die(do_page_flip(o, new_fb_id, !(o->flags & TEST_NOEVENT)));
 
-	if (o->flags & TEST_FENCE_STRESS)
+	if (o->flags & TEST_FENCE_STRESS) {
+		igt_require_gem(drm_fd);
 		emit_fence_stress(o);
+	}
 
 	if (do_vblank) {
 		do_or_die(do_wait_for_vblank(o, o->pipe, target_seq,
-- 
2.18.0

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the igt-dev mailing list