Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id CAE5010F233 for ; Thu, 12 May 2022 07:01:54 +0000 (UTC) Message-ID: Date: Thu, 12 May 2022 12:31:48 +0530 MIME-Version: 1.0 Content-Language: en-US To: Bhanuprakash Modem , igt-dev@lists.freedesktop.org References: <20220512061130.3347243-1-bhanuprakash.modem@intel.com> From: "Sharma, Swati2" In-Reply-To: <20220512061130.3347243-1-bhanuprakash.modem@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [igt-dev] [PATCH] tests/kms_hdr: Fix dynamic subtest name List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Agree. But i suggest if we can have pipe_name-connector_name like igt@kms_hdr@bpc-switch@pipe-a-dp-1 On 12-May-22 11:41 AM, Bhanuprakash Modem wrote: > As we are using dynamic subtests, no need to use the same subtest > name in all dynamic subtests. > > Example: > Before: igt@kms_hdr@bpc-switch@bpc-switch-dp-1-pipe-a > After: igt@kms_hdr@bpc-switch@dp-1-pipe-a > > Cc: Swati Sharma > Signed-off-by: Bhanuprakash Modem > --- > tests/kms_hdr.c | 32 +++++++++++++++++--------------- > 1 file changed, 17 insertions(+), 15 deletions(-) > > diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c > index 247eb658..d60422a3 100644 > --- a/tests/kms_hdr.c > +++ b/tests/kms_hdr.c > @@ -251,7 +251,7 @@ static bool has_max_bpc(igt_output_t *output) > igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC); > } > > -static void test_bpc_switch(data_t *data, const char *test_name, uint32_t flags) > +static void test_bpc_switch(data_t *data, uint32_t flags) > { > igt_display_t *display = &data->display; > igt_output_t *output; > @@ -264,10 +264,11 @@ static void test_bpc_switch(data_t *data, const char *test_name, uint32_t flags) > > for_each_pipe(display, pipe) { > if (igt_pipe_connector_valid(pipe, output)) { > - igt_dynamic_f("%s-%s-pipe-%s", > - test_name, output->name, kmstest_pipe_name(pipe)) > + igt_dynamic_f("%s-pipe-%s", > + output->name, kmstest_pipe_name(pipe)) > test_bpc_switch_on_output(data, pipe, output, flags); > - /* One pipe is enough */ > + > + /* One pipe is enough */ > break; > } > } > @@ -564,7 +565,7 @@ static bool has_hdr(igt_output_t *output) > return igt_output_has_prop(output, IGT_CONNECTOR_HDR_OUTPUT_METADATA); > } > > -static void test_hdr(data_t *data, const char *test_name, uint32_t flags) > +static void test_hdr(data_t *data, uint32_t flags) > { > igt_display_t *display = &data->display; > igt_output_t *output; > @@ -584,14 +585,15 @@ static void test_hdr(data_t *data, const char *test_name, uint32_t flags) > > for_each_pipe(display, pipe) { > if (igt_pipe_connector_valid(pipe, output)) { > - igt_dynamic_f("%s-%s-pipe-%s", > - test_name, output->name, kmstest_pipe_name(pipe)) { > + igt_dynamic_f("%s-pipe-%s", > + output->name, kmstest_pipe_name(pipe)) { > if (flags & TEST_NONE || flags & TEST_DPMS || flags & TEST_SUSPEND) > test_static_toggle(data, pipe, output, flags); > if (flags & TEST_SWAP) > test_static_swap(data, pipe, output); > } > - /* One pipe is enough */ > + > + /* One pipe is enough */ > break; > } > } > @@ -615,27 +617,27 @@ igt_main > > igt_describe("Tests switching between different display output bpc modes"); > igt_subtest_with_dynamic("bpc-switch") > - test_bpc_switch(&data, "bpc-switch", TEST_NONE); > + test_bpc_switch(&data, TEST_NONE); > igt_describe("Tests bpc switch with dpms"); > igt_subtest_with_dynamic("bpc-switch-dpms") > - test_bpc_switch(&data, "bpc-switch-dpms", TEST_DPMS); > + test_bpc_switch(&data, TEST_DPMS); > igt_describe("Tests bpc switch with suspend"); > igt_subtest_with_dynamic("bpc-switch-suspend") > - test_bpc_switch(&data, "bpc-switch-suspend", TEST_SUSPEND); > + test_bpc_switch(&data, TEST_SUSPEND); > > igt_describe("Tests entering and exiting HDR mode"); > igt_subtest_with_dynamic("static-toggle") > - test_hdr(&data, "static-toggle", TEST_NONE); > + test_hdr(&data, TEST_NONE); > igt_describe("Tests static toggle with dpms"); > igt_subtest_with_dynamic("static-toggle-dpms") > - test_hdr(&data, "static-toggle-dpms", TEST_DPMS); > + test_hdr(&data, TEST_DPMS); > igt_describe("Tests static toggle with suspend"); > igt_subtest_with_dynamic("static-toggle-suspend") > - test_hdr(&data, "static-toggle-suspend", TEST_SUSPEND); > + test_hdr(&data, TEST_SUSPEND); > > igt_describe("Tests swapping static HDR metadata"); > igt_subtest_with_dynamic("static-swap") > - test_hdr(&data, "static-swap", TEST_SWAP); > + test_hdr(&data, TEST_SWAP); > > igt_fixture { > igt_display_fini(&data.display); -- ~Swati Sharma