From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2] kms_flip_event_leak: Create dynamic subtests
Date: Wed, 14 Sep 2022 12:12:11 +0530 [thread overview]
Message-ID: <20220914064211.27625-1-jeevan.b@intel.com> (raw)
Converting the existing subtests to dynamic subtests.
v2: Add igt_dispaly_require_output and igt_display_reset and update the
test name. (Bhanu)
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/kms_flip_event_leak.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/tests/kms_flip_event_leak.c b/tests/kms_flip_event_leak.c
index ac201293..d5a40c24 100644
--- a/tests/kms_flip_event_leak.c
+++ b/tests/kms_flip_event_leak.c
@@ -48,6 +48,7 @@ static void test(data_t *data, enum pipe pipe, igt_output_t *output)
struct igt_fb fb[2];
int fd, ret;
+ igt_display_reset(&data->display);
/* select the pipe we want to use */
igt_output_set_pipe(output, pipe);
@@ -89,24 +90,30 @@ static void test(data_t *data, enum pipe pipe, igt_output_t *output)
igt_remove_fb(data->drm_fd, &fb[0]);
}
-igt_simple_main
+igt_main
{
data_t data = {};
igt_output_t *output;
- int valid_tests = 0;
enum pipe pipe;
- data.drm_fd = drm_open_driver_master(DRIVER_ANY);
- kmstest_set_vt_graphics_mode();
+ igt_fixture {
+ data.drm_fd = drm_open_driver_master(DRIVER_ANY);
+ kmstest_set_vt_graphics_mode();
- igt_display_require(&data.display, data.drm_fd);
-
- for_each_pipe_with_valid_output(&data.display, pipe, output) {
- test(&data, pipe, output);
- valid_tests++;
+ igt_display_require(&data.display, data.drm_fd);
+ igt_display_require_output(&data.display);
}
- igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
- igt_display_fini(&data.display);
+ igt_subtest_with_dynamic("kms_flip_event_leak_basic") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe)) {
+ test(&data, pipe, output);
+ }
+ }
+ }
+
+ igt_fixture {
+ igt_display_fini(&data.display);
+ }
}
--
2.36.0
next reply other threads:[~2022-09-14 6:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 6:42 Jeevan B [this message]
2022-09-14 9:08 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_flip_event_leak: Create dynamic subtests (rev3) Patchwork
2022-09-14 22:59 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-19 9:01 ` [igt-dev] [PATCH i-g-t v2] kms_flip_event_leak: Create dynamic subtests Modem, Bhanuprakash
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220914064211.27625-1-jeevan.b@intel.com \
--to=jeevan.b@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.