From: Mohammed Thasleem <mohammed.thasleem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/kms_rmfb: Create dynamic subtests
Date: Tue, 17 May 2022 17:19:50 +0530 [thread overview]
Message-ID: <20220517114950.24140-1-mohammed.thasleem@intel.com> (raw)
Modified kms_rmfb to include dynamic test cases.
Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
tests/kms_rmfb.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/tests/kms_rmfb.c b/tests/kms_rmfb.c
index fcd5cdad..45ab5f8d 100644
--- a/tests/kms_rmfb.c
+++ b/tests/kms_rmfb.c
@@ -146,19 +146,31 @@ test_rmfb(struct rmfb_data *data, igt_output_t *output, enum pipe pipe, bool reo
}
static void
-run_rmfb_test(struct rmfb_data *data, bool reopen)
+run_rmfb_test(struct rmfb_data *data, bool reopen, const char *testname)
{
igt_output_t *output;
enum pipe pipe;
- for_each_pipe_with_single_output(&data->display, pipe, output)
+ for_each_pipe_with_single_output(&data->display, pipe, output) {
+ igt_dynamic_f("pipe-%s-%s-%s", kmstest_pipe_name(pipe),
+ igt_output_name(output), testname)
test_rmfb(data, output, pipe, reopen);
+ }
}
igt_main
{
+ int i;
struct rmfb_data data = {};
+ const struct {
+ bool flags;
+ const char *name;
+ } tests[] = {
+ { true, "rmfb-ioctl" },
+ { false, "close-fd" },
+ };
+
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_ANY);
@@ -168,15 +180,16 @@ igt_main
igt_display_require_output(&data.display);
}
- igt_describe("RMFB is supposed to free the framebuffers from any and all "
- "planes so test this and make sure it works.");
- igt_subtest_f("rmfb-ioctl")
- run_rmfb_test(&data, false);
+ for (i = 0; i < ARRAY_SIZE(tests); i++) {
+
+ igt_describe("RMFB is supposed to free the framebuffers from any and all "
+ "planes so test this and make sure it works with rmfb-ioctl,"
+ "fd close and reopen. ");
+ igt_subtest_with_dynamic(tests[i].name) {
+ run_rmfb_test(&data, tests[i].flags, tests[i].name);
- igt_describe("RMFB is supposed to free the framebuffers from any and all planes "
- "so test this and make sure it works with fd close and reopen.");
- igt_subtest_f("close-fd")
- run_rmfb_test(&data, true);
+ }
+ }
igt_fixture {
igt_display_fini(&data.display);
--
2.25.1
next reply other threads:[~2022-05-17 11:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 11:49 Mohammed Thasleem [this message]
2022-05-17 12:40 ` [igt-dev] ✗ GitLab.Pipeline: warning for tests/kms_rmfb: Create dynamic subtests Patchwork
2022-05-17 13:04 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2022-05-17 14:47 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
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=20220517114950.24140-1-mohammed.thasleem@intel.com \
--to=mohammed.thasleem@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.