[igt-dev] [PATCH i-g-t 10/10] i915/gem_exec_basic: Use dynamic subtests
Petri Latvala
petri.latvala at intel.com
Fri Aug 16 09:34:26 UTC 2019
Instead of generating a subtest for each engine in a static list,
convert to dynamic subtests, with one dynamic subtest per actually
present physical engine.
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
tests/i915/gem_exec_basic.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/tests/i915/gem_exec_basic.c b/tests/i915/gem_exec_basic.c
index 1287860b..a1d1922b 100644
--- a/tests/i915/gem_exec_basic.c
+++ b/tests/i915/gem_exec_basic.c
@@ -159,13 +159,25 @@ igt_main
igt_subtest("gtt-all")
gtt_all(fd);
- __for_each_physical_engine(fd, e) {
- igt_subtest_f("basic-%s", e->name)
- noop(fd, e->flags);
- igt_subtest_f("readonly-%s", e->name)
- readonly(fd, e->flags);
- igt_subtest_f("gtt-%s", e->name)
- gtt(fd, e->flags);
+ igt_dynamic_subtest_container("basic") {
+ __for_each_physical_engine(fd, e) {
+ igt_dynamic_subtest_f("%s", e->name)
+ noop(fd, e->flags);
+ }
+ }
+
+ igt_dynamic_subtest_container("readonly") {
+ __for_each_physical_engine(fd, e) {
+ igt_dynamic_subtest_f("%s", e->name)
+ readonly(fd, e->flags);
+ }
+ }
+
+ igt_dynamic_subtest_container("gtt") {
+ __for_each_physical_engine(fd, e) {
+ igt_dynamic_subtest_f("%s", e->name)
+ gtt(fd, e->flags);
+ }
}
igt_fixture {
--
2.19.1
More information about the igt-dev
mailing list