diff mbox

[i-g-t,v2,16/17] kms_addfb_basic: Move calls to gem_set_tiling to the subtests

Message ID 1457448699-9778-17-git-send-email-tomeu.vizoso@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomeu Vizoso March 8, 2016, 2:51 p.m. UTC
So they don't cause unrelated subtests to be skipped when testing
drivers other than i915.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---

Changes in v2: None

 tests/kms_addfb_basic.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index 6dfaecfc38a7..daba6b9aaeed 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -316,10 +316,8 @@  static void size_tests(int fd)
 		f.fb_id = 0;
 	}
 
-	igt_fixture
-		gem_set_tiling(fd, gem_bo_small, I915_TILING_X, 1024*4);
-
 	igt_subtest("bo-too-small-due-to-tiling") {
+		gem_set_tiling(fd, gem_bo_small, I915_TILING_X, 1024*4);
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
 			   errno == EINVAL);
 	}
@@ -368,10 +366,8 @@  static void addfb25_tests(int fd)
 		igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) < 0 && errno == EINVAL);
 	}
 
-	igt_fixture
-		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
-
 	igt_subtest("addfb25-X-tiled-mismatch") {
+		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 		igt_require_fb_modifiers(fd);
 
 		f.modifier[0] = LOCAL_DRM_FORMAT_MOD_NONE;
@@ -379,6 +375,7 @@  static void addfb25_tests(int fd)
 	}
 
 	igt_subtest("addfb25-X-tiled") {
+		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 		igt_require_fb_modifiers(fd);
 
 		f.modifier[0] = LOCAL_I915_FORMAT_MOD_X_TILED;