[PATCH i-g-t] tests/gem_exec_reloc: Don't call igt_(dis)allow_hang outside fixtures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



gem_exec_reloc --list-subtests breaks otherwise.

v2: use igt_subtest_group (Chris)

CC: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Petri Latvala <petri.latvala@xxxxxxxxx>
---
 tests/gem_exec_reloc.c | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/tests/gem_exec_reloc.c b/tests/gem_exec_reloc.c
index 78bb59c..8356d85 100644
--- a/tests/gem_exec_reloc.c
+++ b/tests/gem_exec_reloc.c
@@ -550,19 +550,25 @@ igt_main
 	for (f = flags; f->name; f++) {
 		igt_hang_t hang;
 
-		if (f->flags & HANG)
-			hang = igt_allow_hang(fd, 0, 0);
-
-		for (m = modes; m->name; m++) {
-			igt_subtest_f("%s%s%s",
-				      f->basic ? "basic-" : "",
-				      m->name,
-				      f->name)
-				basic_reloc(fd, m->before, m->after, f->flags);
+		igt_subtest_group {
+			igt_fixture {
+				if (f->flags & HANG)
+					hang = igt_allow_hang(fd, 0, 0);
+			}
+
+			for (m = modes; m->name; m++) {
+				igt_subtest_f("%s%s%s",
+					      f->basic ? "basic-" : "",
+					      m->name,
+					      f->name)
+					basic_reloc(fd, m->before, m->after, f->flags);
+			}
+
+			igt_fixture {
+				if (f->flags & HANG)
+					igt_disallow_hang(fd, hang);
+			}
 		}
-
-		if (f->flags & HANG)
-			igt_disallow_hang(fd, hang);
 	}
 
 	igt_subtest("basic-softpin")
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux