[igt-dev] [PATCH i-g-t 6/8] kms_plane_cursor: Use dynamic subtests
Petri Latvala
petri.latvala at intel.com
Thu Oct 24 11:05:44 UTC 2019
Instead of for_each_pipe_static, use for_each_pipe with a dynamic
subtest per pipe.
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
tests/kms_plane_cursor.c | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/tests/kms_plane_cursor.c b/tests/kms_plane_cursor.c
index cbad0041..9616430c 100644
--- a/tests/kms_plane_cursor.c
+++ b/tests/kms_plane_cursor.c
@@ -318,22 +318,24 @@ igt_main
igt_display_require_output(&data.display);
}
- for_each_pipe_static(pipe)
- for (i = 0; i < ARRAY_SIZE(cursor_sizes); ++i) {
- int size = cursor_sizes[i];
-
- igt_subtest_f("pipe-%s-overlay-size-%d",
- kmstest_pipe_name(pipe), size)
- test_cursor_overlay(&data, size, pipe);
-
- igt_subtest_f("pipe-%s-primary-size-%d",
- kmstest_pipe_name(pipe), size)
- test_cursor_primary(&data, size, pipe);
-
- igt_subtest_f("pipe-%s-viewport-size-%d",
- kmstest_pipe_name(pipe), size)
- test_cursor_viewport(&data, size, pipe);
- }
+ for (i = 0; i < ARRAY_SIZE(cursor_sizes); ++i) {
+ int size = cursor_sizes[i];
+
+ igt_subtest_with_dynamic_subsubtests_f("overlay-size-%d", size)
+ for_each_pipe(&data.display, pipe)
+ igt_dynamic_subsubtest_f("pipe-%s", kmstest_pipe_name(pipe))
+ test_cursor_overlay(&data, size, pipe);
+
+ igt_subtest_with_dynamic_subsubtests_f("primary-size-%d", size)
+ for_each_pipe(&data.display, pipe)
+ igt_dynamic_subsubtest_f("pipe-%s", kmstest_pipe_name(pipe))
+ test_cursor_primary(&data, size, pipe);
+
+ igt_subtest_with_dynamic_subsubtests_f("viewport-size-%d", size)
+ for_each_pipe(&data.display, pipe)
+ igt_dynamic_subsubtest_f("pipe-%s", kmstest_pipe_name(pipe))
+ test_cursor_viewport(&data, size, pipe);
+ }
igt_fixture {
igt_display_fini(&data.display);
--
2.19.1
More information about the igt-dev
mailing list