[Intel-gfx] [PATCH i-g-t 2/2] lib/tests: More igt_subtest_group checks

Daniel Vetter daniel.vetter at ffwll.ch
Sat Mar 19 11:15:59 UTC 2016


... for some cases discussed with Chris on irc. We seem to get them all
right.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 lib/tests/igt_subtest_group.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/lib/tests/igt_subtest_group.c b/lib/tests/igt_subtest_group.c
index 2b17955c5ac8..c2364d799f36 100644
--- a/lib/tests/igt_subtest_group.c
+++ b/lib/tests/igt_subtest_group.c
@@ -28,6 +28,7 @@
 igt_main
 {
 	bool t1 = false;
+	int t2 = 0;
 
 	igt_subtest_group {
 		igt_fixture {
@@ -59,5 +60,24 @@ igt_main
 		}
 	}
 
+	igt_subtest_group {
+		igt_fixture {
+			assert(t2 == 0);
+			t2 = 1;
+		}
+
+		igt_subtest("run-again") {
+			assert(t2 == 1);
+			t2 = 2;
+		}
+
+		igt_fixture {
+			assert(t2 == 2);
+			t2 = 3;
+
+		}
+	}
+
 	assert(t1);
+	assert(t2 == 3);
 }
-- 
2.7.0



More information about the Intel-gfx mailing list