Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Gupta, Nidhi1" <nidhi1.gupta@intel.com>
Subject: Re: [igt-dev] [PATCH 3/3] tests/i915/i915_pm_backlight: Create dynamic subtests
Date: Tue, 15 Nov 2022 14:46:55 +0000	[thread overview]
Message-ID: <b8fe6bbfbef299a5ed3a67799b61564b511fae9b.camel@intel.com> (raw)
In-Reply-To: <1668517250-4514-4-git-send-email-nidhi1.gupta@intel.com>

Hello,

One comment inline below.

On Tue, 2022-11-15 at 18:30 +0530, Nidhi Gupta wrote:
> Modified the test to include dynamic subtests.
> 
> Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
> ---
>  tests/i915/i915_pm_backlight.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/i915/i915_pm_backlight.c
> b/tests/i915/i915_pm_backlight.c
> index e94214a..cb8efcb 100644
> --- a/tests/i915/i915_pm_backlight.c
> +++ b/tests/i915/i915_pm_backlight.c
> @@ -305,7 +305,7 @@ igt_main
>  
>         for (i = 0; i < ARRAY_SIZE(tests); i++) {
>                 igt_describe(tests[i].desc);
> -               igt_subtest(tests[i].name) {
> +               igt_subtest_with_dynamic(tests[i].name) {
>                         for (int j = 0; j < (dual_edp ? 2 : 1); j++)
> {
>                                 test_setup(display, &contexts-
> >output[j]);
>  
> @@ -318,11 +318,13 @@ igt_main
>                                 if (tests[i].flags == TEST_SUSPEND)
>                                         check_suspend(contexts[j].out
> put);
>  
> -
>                                igt_assert(backlight_read(&contexts[j].
> max, "max_brightness", &contexts[j]) > -1);
> -                               tests[i].test_t(&contexts[j]);
> +                               igt_dynamic_f("%s",
> igt_output_name(contexts[j].output)) {
> +                                       igt_assert(backlight_read(&co
> ntexts[j].max, "max_brightness", &contexts[j]) > -1);

You are already reading max brightness.

> +                                       tests[i].test_t(&contexts[j])
> ;
> +                               }
> +                               test_cleanup(&display, output);
>                         }
> -
> -                       test_cleanup(&display, output);
> +                       /* TODO: Add tests for dual eDP. */
>                 }
>         }
>  


  reply	other threads:[~2022-11-15 14:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15 13:00 [igt-dev] [PATCH 0/3] Add new subtest and test cleanup Nidhi Gupta
2022-11-15 13:00 ` [igt-dev] [PATCH 1/3] tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight Nidhi Gupta
2022-11-15 14:32   ` Hogander, Jouni
2022-11-15 13:00 ` [igt-dev] [PATCH 2/3] tests/i915/i915_pm_backlight: Add a common structure for all subtests Nidhi Gupta
2022-11-15 14:44   ` Hogander, Jouni
2022-11-15 13:00 ` [igt-dev] [PATCH 3/3] tests/i915/i915_pm_backlight: Create dynamic subtests Nidhi Gupta
2022-11-15 14:46   ` Hogander, Jouni [this message]
2022-11-15 14:27 ` [igt-dev] [PATCH 0/3] Add new subtest and test cleanup Hogander, Jouni
2022-11-15 15:42 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add new subtest and test cleanup (rev3) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2022-11-15  6:15 [igt-dev] [PATCH 0/3] Add new subtest and test cleanup Nidhi Gupta
2022-11-15  6:16 ` [igt-dev] [PATCH 3/3] tests/i915/i915_pm_backlight: Create dynamic subtests Nidhi Gupta
2022-11-15 10:49   ` Hogander, Jouni

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=b8fe6bbfbef299a5ed3a67799b61564b511fae9b.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=nidhi1.gupta@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