From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: Swati Sharma <swati2.sharma@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 4/4] tests/kms_atomic: Add flexibility to run tests on all pipes
Date: Mon, 30 Jan 2023 12:25:54 +0530 [thread overview]
Message-ID: <53112162-99e9-0b33-13c8-00db1d442db7@intel.com> (raw)
In-Reply-To: <20230103064658.27655-5-swati2.sharma@intel.com>
On Tue-03-01-2023 12:16 pm, Swati Sharma wrote:
> Extra flag in command line is passed to run subtests on all pipe/output combinations.
> However, by default execution is restricted to 1pipe/1output
> combination.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/kms_atomic.c | 56 +++++++++++++++++++++++++++++++++++-----------
> 1 file changed, 43 insertions(+), 13 deletions(-)
>
> diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
> index 716045315..6272e2aa6 100644
> --- a/tests/kms_atomic.c
> +++ b/tests/kms_atomic.c
> @@ -52,6 +52,8 @@
>
> IGT_TEST_DESCRIPTION("Test atomic modesetting API");
>
> +static bool all_pipes = false;
> +
> /* Common test data. */
> typedef struct {
> igt_display_t display;
> @@ -1295,7 +1297,23 @@ static bool has_zpos(igt_plane_t *plane)
> return igt_plane_has_prop(plane, IGT_PLANE_ZPOS);
> }
>
> -igt_main
> +static int opt_handler(int opt, int opt_index, void *_data)
> +{
> + switch (opt) {
> + case 'e':
> + all_pipes = true;
> + break;
> + default:
> + return IGT_OPT_HANDLER_ERROR;
> + }
> +
> + return IGT_OPT_HANDLER_SUCCESS;
> +}
> +
> +static const char *help_str =
> + " -e \tRun on all pipes. (By default subtests will run only on one pipe)\n";
> +
> +igt_main_args("e", NULL, help_str, opt_handler, NULL)
> {
> enum pipe pipe = PIPE_NONE;
> igt_output_t *output = NULL;
> @@ -1324,7 +1342,8 @@ igt_main
> plane_overlay(&data, output, overlay, format);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1337,7 +1356,8 @@ igt_main
> plane_primary(&data);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1362,7 +1382,8 @@ igt_main
> DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB1555);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1379,7 +1400,8 @@ igt_main
> plane_immutable_zpos(&data, output, pipe, n_planes);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1398,7 +1420,8 @@ igt_main
> atomic_clear(&data, pipe, output);
> test_only(&data, output, pipe, format);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1416,7 +1439,8 @@ igt_main
> plane_cursor(&data, output, cursor);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1428,7 +1452,8 @@ igt_main
> plane_invalid_params(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1440,7 +1465,8 @@ igt_main
> plane_invalid_params_fence(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1452,7 +1478,8 @@ igt_main
> crtc_invalid_params(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1464,7 +1491,8 @@ igt_main
> crtc_invalid_params_fence(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1478,7 +1506,8 @@ igt_main
> atomic_invalid_params(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1493,7 +1522,8 @@ igt_main
> atomic_plane_damage(&data);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
next prev parent reply other threads:[~2023-01-30 6:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-03 6:46 [igt-dev] [PATCH i-g-t 0/4] Test cleanup and dynamic conversion Swati Sharma
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 1/4] tests/kms_atomic: Cosmetic changes Swati Sharma
2023-01-03 18:02 ` Kamil Konieczny
2023-01-30 6:00 ` Modem, Bhanuprakash
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_atomic: Test cleanup Swati Sharma
2023-01-30 6:35 ` Modem, Bhanuprakash
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_atomic: Convert tests to dynamic Swati Sharma
2023-01-30 6:46 ` Modem, Bhanuprakash
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_atomic: Add flexibility to run tests on all pipes Swati Sharma
2023-01-30 6:55 ` Modem, Bhanuprakash [this message]
2023-01-03 10:10 ` [igt-dev] ✓ Fi.CI.BAT: success for Test cleanup and dynamic conversion Patchwork
2023-01-03 11:44 ` [igt-dev] ✓ Fi.CI.IGT: " 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=53112162-99e9-0b33-13c8-00db1d442db7@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox