All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	<igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH 3/6] tests/kms_cursor_edge_walk: Create dynamic subtests
Date: Mon, 9 May 2022 18:34:15 +0530	[thread overview]
Message-ID: <4aace31f-1bba-9221-5fc1-daec67b549a4@intel.com> (raw)
In-Reply-To: <YnkLeGuBSSuekZUC@kamilkon-DESK1>

On Mon-09-05-2022 06:09 pm, Kamil Konieczny wrote:
> Hi Bhanuprakash,
> 
> On 2022-05-09 at 12:56:34 +0530, Bhanuprakash Modem wrote:
>> Covert the existing subtests to dynamic subtests at pipe level.
> ----^
> s/Covert/Convert/
> 
>>
>> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
>> ---
>>   tests/kms_cursor_edge_walk.c | 66 ++++++++++++++++--------------------
>>   1 file changed, 30 insertions(+), 36 deletions(-)
>>
>> diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
>> index b775714f..01ac9790 100644
>> --- a/tests/kms_cursor_edge_walk.c
>> +++ b/tests/kms_cursor_edge_walk.c
>> @@ -309,6 +309,17 @@ static const char *help_str =
>>   
>>   igt_main_args("", long_opts, help_str, opt_handler, &data)
>>   {
>> +	struct {
>> +		const char *name;
>> +		unsigned flags;
> 
> Add description field here.
> 
>> +	} tests[] = {
>> +		{ "left-edge", EDGE_LEFT },
> 
> Put descriptions here.
> 
>> +		{ "right-edge", EDGE_RIGHT },
>> +		{ "top-edge", EDGE_TOP },
>> +		{ "top-bottom", EDGE_BOTTOM },
>> +	};
>> +	int i;
>> +
>>   	igt_fixture {
>>   		int ret;
>>   
>> @@ -328,44 +339,27 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>>   		igt_require_pipe_crc(data.drm_fd);
>>   
>>   		igt_display_require(&data.display, data.drm_fd);
>> +		igt_display_require_output(&data.display);
>>   	}
>>   
>> -	for_each_pipe_static(data.pipe) {
>> -		igt_subtest_group {
>> -			igt_fixture {
>> -				igt_display_require_output_on_pipe(&data.display, data.pipe);
>> -				data.output = igt_get_single_output_for_pipe(&data.display, data.pipe);
>> -			}
>> -
>> -			for (data.curw = 64; data.curw <= 256; data.curw *= 2) {
>> -				data.curh = data.curw;
>> -
>> -				igt_fixture
>> -					igt_require(data.curw <= max_curw && data.curh <= max_curh);
>> -
>> -				igt_describe("Checking cursor by walking left edge of screen");
>> -				igt_subtest_f("pipe-%s-%dx%d-left-edge",
>> -					kmstest_pipe_name(data.pipe),
>> -					data.curw, data.curh)
>> -					test_crtc(&data, EDGE_LEFT);
>> -
>> -				igt_describe("Checking cursor by walking right edge of screen");
>> -				igt_subtest_f("pipe-%s-%dx%d-right-edge",
>> -					kmstest_pipe_name(data.pipe),
>> -					data.curw, data.curh)
>> -					test_crtc(&data, EDGE_RIGHT);
>> -
>> -				igt_describe("Checking cursor by walking top edge of screen");
>> -				igt_subtest_f("pipe-%s-%dx%d-top-edge",
>> -					kmstest_pipe_name(data.pipe),
>> -					data.curw, data.curh)
>> -					test_crtc(&data, EDGE_TOP);
>> -
>> -				igt_describe("Checking cursor by walking bottom edge of screen");
>> -				igt_subtest_f("pipe-%s-%dx%d-bottom-edge",
>> -					kmstest_pipe_name(data.pipe),
>> -					data.curw, data.curh)
>> -					test_crtc(&data, EDGE_BOTTOM);
>> +	igt_describe("Checking cursor by walking left/right/top/bottom edge of screen");
>> +	igt_subtest_group {
>> +		for (i = 0; i < ARRAY_SIZE(tests); i++) {
> 
> Please add description here.

Thanks for the review Kamil,

This is intentional. As we are grouping these tests (using 
igt_subtest_group), the same igt_describe is applicable to all subtests.

# ./build/tests/kms_cursor_edge_walk --desc
Exercise CHV pipe C cursor fail

SUB left-edge ../tests/kms_cursor_edge_walk.c:348:
   Checking cursor by walking left/right/top/bottom edge of screen

SUB right-edge ../tests/kms_cursor_edge_walk.c:348:
   Checking cursor by walking left/right/top/bottom edge of screen

SUB top-edge ../tests/kms_cursor_edge_walk.c:348:
   Checking cursor by walking left/right/top/bottom edge of screen

SUB top-bottom ../tests/kms_cursor_edge_walk.c:348:
   Checking cursor by walking left/right/top/bottom edge of screen

- Bhanu

> 
> Regards,
> Kamil
> 
>> +			igt_subtest_with_dynamic(tests[i].name) {
>> +				for_each_pipe(&data.display, data.pipe) {
>> +					igt_fixture {
>> +						igt_require(data.curw <= max_curw && data.curh <= max_curh);
>> +						data.output = igt_get_single_output_for_pipe(&data.display, data.pipe);
>> +					}
>> +
>> +					for (data.curw = 64; data.curw <= 256; data.curw *= 2) {
>> +						data.curh = data.curw;
>> +						igt_dynamic_f("pipe-%s-%dx%d",
>> +							      kmstest_pipe_name(data.pipe),
>> +							      data.curw, data.curh)
>> +							test_crtc(&data, tests[i].flags);
>> +					}
>> +				}
>>   			}
>>   		}
>>   	}
>> -- 
>> 2.35.1
>>

  reply	other threads:[~2022-05-09 13:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09  7:26 [igt-dev] [PATCH 0/6] Convert subtests to dynamic Bhanuprakash Modem
2022-05-09  7:26 ` [igt-dev] [PATCH 1/6] tests/kms_pipe_crc_basic: Create dynamic subtests Bhanuprakash Modem
2022-05-09 12:33   ` Kamil Konieczny
2022-05-09  7:26 ` [igt-dev] [PATCH 2/6] tests/kms_cursor_legacy: " Bhanuprakash Modem
2022-05-09  7:26 ` [igt-dev] [PATCH 3/6] tests/kms_cursor_edge_walk: " Bhanuprakash Modem
2022-05-09 12:39   ` Kamil Konieczny
2022-05-09 13:04     ` Modem, Bhanuprakash [this message]
2022-05-09  7:26 ` [igt-dev] [PATCH 4/6] tests/kms_cursor_crc: " Bhanuprakash Modem
2022-05-09  7:26 ` [igt-dev] [PATCH 5/6] tests/kms_color: " Bhanuprakash Modem
2022-05-09  7:26 ` [igt-dev] [PATCH 6/6] tests/intel-ci: Rename tests in BAT Bhanuprakash Modem
2022-05-09 10:43   ` [igt-dev] [v2 " Bhanuprakash Modem
2022-05-09  9:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for Convert subtests to dynamic Patchwork
2022-05-09 12:01 ` [igt-dev] ✗ Fi.CI.BAT: failure for Convert subtests to dynamic (rev2) 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=4aace31f-1bba-9221-5fc1-daec67b549a4@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.