[igt-dev] [PATCH i-g-t 4/4] i915/gem_exec_parallel: Dynamise per-engine tests
Chris Wilson
chris at chris-wilson.co.uk
Mon Mar 30 09:21:17 UTC 2020
Convert the per-engine tests into a dynamic subtest.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
tests/i915/gem_exec_parallel.c | 28 ++++++++++++++-------------
tests/intel-ci/fast-feedback.testlist | 4 +---
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/tests/i915/gem_exec_parallel.c b/tests/i915/gem_exec_parallel.c
index 98316af40..66fe18534 100644
--- a/tests/i915/gem_exec_parallel.c
+++ b/tests/i915/gem_exec_parallel.c
@@ -196,7 +196,6 @@ static void all(int fd, struct intel_execution_engine2 *engine, unsigned flags)
engines[nengine++] = e->flags;
}
} else {
- igt_require(gem_class_can_store_dword(fd, engine->class));
engines[nengine++] = engine->flags;
}
igt_require(nengine);
@@ -254,7 +253,7 @@ igt_main
const char *name;
unsigned flags;
} modes[] = {
- { "", 0 },
+ { "basic", 0 },
{ "contexts", CONTEXTS },
{ "fds", FDS },
{ NULL }
@@ -268,18 +267,21 @@ igt_main
igt_fork_hang_detector(fd);
}
- for (const struct mode *m = modes; m->name; m++)
- igt_subtest_f("%s", *m->name ? m->name : "basic")
- /* NULL value means all engines */
- all(fd, NULL, m->flags);
-
- __for_each_physical_engine(fd, e) {
+ igt_subtest_with_dynamic("engines") {
for (const struct mode *m = modes; m->name; m++)
- igt_subtest_f("%s%s%s",
- e->name,
- *m->name ? "-" : "",
- m->name)
- all(fd, e, m->flags);
+ igt_dynamic(m->name)
+ /* NULL value means all engines */
+ all(fd, NULL, m->flags);
+ }
+
+ for (const struct mode *m = modes; m->name; m++) {
+ igt_subtest_with_dynamic(m->name) {
+ __for_each_physical_engine(fd, e) {
+ if (gem_class_can_store_dword(fd, e->class))
+ igt_dynamic(e->name)
+ all(fd, e, m->flags);
+ }
+ }
}
igt_fixture {
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index b41fb4a01..06367f822 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -21,9 +21,7 @@ igt at gem_exec_fence@basic-wait
igt at gem_exec_fence@basic-await
igt at gem_exec_fence@nb-await
igt at gem_exec_gttfill@basic
-igt at gem_exec_parallel@basic
-igt at gem_exec_parallel@contexts
-igt at gem_exec_parallel@fds
+igt at gem_exec_parallel@engines
igt at gem_exec_store@basic-all
igt at gem_exec_suspend@basic
igt at gem_exec_suspend@basic-s0
--
2.26.0
More information about the igt-dev
mailing list