[igt-dev] [PATCH i-g-t 2/3] igt/kms_addfb_basic: Call igt_require_gem for gem specific tiling

Deepak Rawat drawat at vmware.com
Wed Jan 16 00:22:29 UTC 2019


For tests using gem specific buffer tiling, add a call to
igt_require_gem so that these tests don't fail at later stage.

Signed-off-by: Deepak Rawat <drawat at vmware.com>
---
 tests/kms_addfb_basic.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index 47dce2d4..9c4c2c4d 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -131,6 +131,8 @@ static void invalid_tests(int fd)
 	}
 
 	igt_subtest("clobberred-modifier") {
+		igt_require_gem(fd);
+
 		f.flags = 0;
 		f.modifier[0] = 0;
 		gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4);
@@ -313,6 +315,8 @@ static void tiling_tests(int fd)
 
 	igt_subtest_group {
 		igt_fixture {
+			igt_require_gem(fd);
+
 			tiled_x_bo = igt_create_bo_with_dimensions(fd, 1024, 1024,
 				DRM_FORMAT_XRGB8888, LOCAL_I915_FORMAT_MOD_X_TILED,
 				1024*4, NULL, NULL, &is_dumb);
@@ -464,6 +468,8 @@ 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);
@@ -521,6 +527,8 @@ 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);
 		}
-- 
2.17.1



More information about the igt-dev mailing list