[igt-dev] [PATCH 1/2] tests/kms_invalid_mode : Convert tests to dynamic
Gupta, Nidhi1
nidhi1.gupta at intel.com
Mon Jun 6 05:36:08 UTC 2022
Hi Petri,
Thanks for the review.
We are trying to convert all the tests in IGT into dynamic tests, for better reporting and get more data just from the name of the subtest to ease the debugging process.
Trying to do the same with this test, this test will be executed on every pipe with valid output.
-----Original Message-----
From: Latvala, Petri <petri.latvala at intel.com>
Sent: Friday, May 20, 2022 11:33 AM
To: Gupta, Nidhi1 <nidhi1.gupta at intel.com>
Cc: igt-dev at lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH 1/2] tests/kms_invalid_mode : Convert tests to dynamic
On Fri, May 20, 2022 at 06:42:25AM +0530, Nidhi Gupta wrote:
> Modified kms_invalid_mode to include dynamic test cases for better
> reporting of the results.
>
> Signed-off-by: Nidhi Gupta <nidhi1.gupta at intel.com>
> ---
> tests/kms_invalid_mode.c | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c index
> bb92a94e..bb524037 100644
> --- a/tests/kms_invalid_mode.c
> +++ b/tests/kms_invalid_mode.c
> @@ -296,8 +296,11 @@ static const struct {
>
> static data_t data;
>
> -igt_main
> -{
> +igt_main {
> +
> +igt_output_t *output;
> +enum pipe pipe;
> +
> igt_fixture {
> data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>
> @@ -312,9 +315,15 @@ igt_main
> }
>
> for (int i = 0; i < ARRAY_SIZE(subtests); i++) {
> - igt_subtest(subtests[i].name) {
> - data.adjust_mode = subtests[i].adjust_mode;
> - test(&data);
> + igt_subtest_with_dynamic(subtests[i].name) {
> + for_each_pipe(&data.display, pipe) {
> + for_each_valid_output_on_pipe(&data.display, pipe, output) {
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) {
> + data.adjust_mode = subtests[i].adjust_mode;
> + test(&data);
> + }
> + }
What is the goal of this change? All this does is repeat the _same_ operations n number of times.
--
Petri Latvala
More information about the igt-dev
mailing list