[igt-dev] [PATCH 3/3] tests/i915/i915_pm_backlight: Create dynamic subtests
Hogander, Jouni
jouni.hogander at intel.com
Tue Nov 15 14:46:55 UTC 2022
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 at 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. */
> }
> }
>
More information about the igt-dev
mailing list