Skip to contentSkip to conversation

tests: fix sub-test enumeration

PATCH In review Thomas Wood 2 participants 2 messages Feb 12, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: fix sub-test enumeration

Ensure sub-tests can be listed correctly by doing any test setup within an igt_fixture block.

---
 tests/gem_evict_alignment.c | 7 ++++---
 tests/gem_pwrite_pread.c    | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)
tests/gem_evict_alignment.c +4 -3
index 15c4707..c478f18 100644
@@ -189,11 +189,12 @@ igt_main
 
 	igt_skip_on_simulation();
 
-	igt_fixture
+	igt_fixture {
 		fd = drm_open_any();
 
-	igt_skip_on_f(intel_gen(intel_get_drm_devid(fd)) > 7,
-		      "BLIT commands not yet updated\n");
+		igt_skip_on_f(intel_gen(intel_get_drm_devid(fd)) > 7,
+			      "BLIT commands not yet updated\n");
+	}
 
 	igt_subtest("minor-normal") {
 		size = 1024 * 1024;
tests/gem_pwrite_pread.c +2 -2
index 1ae0820..8f768b3 100644
@@ -380,9 +380,9 @@ int main(int argc, char **argv)
 
 		gem_set_caching(fd, src, 0);
 		gem_set_caching(fd, dst, 0);
-	}
 
-	devid = intel_get_drm_devid(fd);
+		devid = intel_get_drm_devid(fd);
+	}
 
 	igt_subtest("uncached-copy-correctness")
 		test_copy(fd, src, dst, tmp, object_size);
Signature · 1 line
1.8.5.3
#1 lore raw
Quoted 4 lines · Thomas Wood

Ensure sub-tests can be listed correctly by doing any test setup within an igt_fixture block.

Oops, I've missed some. Patch merged, thanks.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch