[igt-dev] [PATCH i-g-t] kms_atomic_transition: Make the available pipe discovery dynamic
Chris Wilson
chris at chris-wilson.co.uk
Mon Apr 20 14:03:12 UTC 2020
All of the per-plane tests are run on all available matching pipes. A
natural case for igt_subtest_with_dynamic + igt_dynamic_f
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala at intel.com>
---
tests/kms_atomic_transition.c | 86 +++++++++++++++++++++--------------
1 file changed, 52 insertions(+), 34 deletions(-)
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 44f01109d..d28a8cdf5 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -924,71 +924,89 @@ igt_main
for_each_pipe_with_valid_output(&display, pipe, output)
run_primary_test(&display, pipe, output);
- igt_subtest("plane-all-transition")
- for_each_pipe_with_valid_output(&display, pipe, output)
- run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, false);
+ igt_subtest_with_dynamic("plane-all-transition") {
+ for_each_pipe_with_valid_output(&display, pipe, output) {
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, false);
+ }
+ }
- igt_subtest("plane-all-transition-fencing")
- for_each_pipe_with_valid_output(&display, pipe, output)
- run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, true);
+ igt_subtest_with_dynamic("plane-all-transition-fencing") {
+ for_each_pipe_with_valid_output(&display, pipe, output) {
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, true);
+ }
+ }
- igt_subtest("plane-all-transition-nonblocking")
- for_each_pipe_with_valid_output(&display, pipe, output)
- run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, false);
+ igt_subtest_with_dynamic("plane-all-transition-nonblocking") {
+ for_each_pipe_with_valid_output(&display, pipe, output) {
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, false);
+ }
+ }
- igt_subtest("plane-all-transition-nonblocking-fencing")
- for_each_pipe_with_valid_output(&display, pipe, output)
- run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, true);
+ igt_subtest_with_dynamic("plane-all-transition-nonblocking-fencing") {
+ for_each_pipe_with_valid_output(&display, pipe, output) {
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, true);
+ }
+ }
- igt_subtest("plane-use-after-nonblocking-unbind")
- for_each_pipe_with_valid_output(&display, pipe, output)
- run_transition_test(&display, pipe, output, TRANSITION_AFTER_FREE, true, false);
+ igt_subtest_with_dynamic("plane-use-after-nonblocking-unbind") {
+ for_each_pipe_with_valid_output(&display, pipe, output) {
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_AFTER_FREE, true, false);
+ }
+ }
- igt_subtest("plane-use-after-nonblocking-unbind-fencing")
- for_each_pipe_with_valid_output(&display, pipe, output)
- run_transition_test(&display, pipe, output, TRANSITION_AFTER_FREE, true, true);
+ igt_subtest_with_dynamic("plane-use-after-nonblocking-unbind-fencing") {
+ for_each_pipe_with_valid_output(&display, pipe, output) {
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_AFTER_FREE, true, true);
+ }
+ }
/*
* Test modeset cases on internal panels separately with a reduced
* number of combinations, to avoid long runtimes due to modesets on
* panels with long power cycle delays.
*/
- igt_subtest("plane-all-modeset-transition")
+ igt_subtest_with_dynamic("plane-all-modeset-transition")
for_each_pipe_with_valid_output(&display, pipe, output) {
if (output_is_internal_panel(output))
continue;
- run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, false);
+
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, false);
}
- igt_subtest("plane-all-modeset-transition-fencing")
+ igt_subtest_with_dynamic("plane-all-modeset-transition-fencing")
for_each_pipe_with_valid_output(&display, pipe, output) {
if (output_is_internal_panel(output))
continue;
- run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, true);
- }
- igt_subtest("plane-all-modeset-transition-internal-panels") {
- int tested = 0;
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, true);
+ }
+ igt_subtest_with_dynamic("plane-all-modeset-transition-internal-panels") {
for_each_pipe_with_valid_output(&display, pipe, output) {
if (!output_is_internal_panel(output))
continue;
- run_transition_test(&display, pipe, output, TRANSITION_MODESET_FAST, false, false);
- tested++;
+
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_MODESET_FAST, false, false);
}
- igt_skip_on_f(!tested, "No output with internal panel found\n");
}
- igt_subtest("plane-all-modeset-transition-fencing-internal-panels") {
- int tested = 0;
-
+ igt_subtest_with_dynamic("plane-all-modeset-transition-fencing-internal-panels") {
for_each_pipe_with_valid_output(&display, pipe, output) {
if (!output_is_internal_panel(output))
continue;
- run_transition_test(&display, pipe, output, TRANSITION_MODESET_FAST, false, true);
- tested++;
+
+ igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+ run_transition_test(&display, pipe, output, TRANSITION_MODESET_FAST, false, true);
}
- igt_skip_on_f(!tested, "No output with internal panel found\n");
}
igt_subtest("plane-toggle-modeset-transition")
--
2.26.1
More information about the igt-dev
mailing list