public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] kms_flip: Convert to dynamic CRTC test groups
Date: Tue, 14 Apr 2020 13:47:35 +0300	[thread overview]
Message-ID: <20200414104735.GP9497@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20200414102800.2867147-1-chris@chris-wilson.co.uk>

On Tue, Apr 14, 2020 at 11:28:00AM +0100, Chris Wilson wrote:
> Use igt_dynamic_f for the dynamic discovered CRTC sets for each test.
> 
> v2:
> The subsubtest names are slightly more compact and forced to conform to
> igt_runner/piglit rules:
> 
> 	A-eDP1
> 	AB-eDP1-eDP2
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Martin Peres <martin.peres@linux.intel.com>
> ---


Let's see now.

1) No test renames, just added reporting for the subparts

2) Straightforward conversion


Unless CI finds something hilarious,

Reviewed-by: Petri Latvala <petri.latvala@intel.com>



>  tests/kms_flip.c | 93 ++++++++++++++++++++++++------------------------
>  1 file changed, 47 insertions(+), 46 deletions(-)
> 
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 4535ecc8b..5e3e196c0 100755
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -1185,52 +1185,17 @@ static void calibrate_ts(struct test_output *o, int crtc_idx)
>  	o->vblank_interval = mean;
>  }
>  
> -static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
> -				 int crtc_count, int duration_ms)
> +static void __run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
> +				   int crtc_count, int duration_ms)
>  {
> -	char test_name[128];
> -	unsigned elapsed;
>  	unsigned bo_size = 0;
> +	bool vblank = true;
> +	unsigned elapsed;
>  	uint64_t tiling;
>  	int i;
> -	bool vblank = true;
> -
> -	switch (crtc_count) {
> -	case RUN_TEST:
> -		connector_find_preferred_mode(o->_connector[0], crtc_idxs[0], o);
> -		if (!o->mode_valid)
> -			return;
> -		snprintf(test_name, sizeof(test_name),
> -			 "%s on pipe %s, connector %s-%d",
> -			 igt_subtest_name(),
> -			 kmstest_pipe_name(o->_pipe[0]),
> -			 kmstest_connector_type_str(o->kconnector[0]->connector_type),
> -			 o->kconnector[0]->connector_type_id);
> -		break;
> -	case RUN_PAIR:
> -		connector_find_compatible_mode(crtc_idxs[0], crtc_idxs[1], o);
> -		if (!o->mode_valid)
> -			return;
> -		snprintf(test_name, sizeof(test_name),
> -			 "%s on pipe %s:%s, connector %s-%d:%s-%d",
> -			 igt_subtest_name(),
> -			 kmstest_pipe_name(o->_pipe[0]),
> -			 kmstest_pipe_name(o->_pipe[1]),
> -			 kmstest_connector_type_str(o->kconnector[0]->connector_type),
> -			 o->kconnector[0]->connector_type_id,
> -			 kmstest_connector_type_str(o->kconnector[1]->connector_type),
> -			 o->kconnector[1]->connector_type_id);
> -		break;
> -	default:
> -		igt_assert(0);
> -	}
> -
> -	igt_assert_eq(o->count, crtc_count);
>  
>  	last_connector = o->kconnector[0];
>  
> -	igt_info("Beginning %s\n", test_name);
> -
>  	if (o->flags & TEST_PAN)
>  		o->fb_width *= 2;
>  
> @@ -1274,7 +1239,6 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
>  		 */
>  		igt_assert_f(crtc_count > 1 || crtc_idxs[0] < 2,
>  			     "set_mode may only fail on the 3rd pipe or in multiple crtc tests\n");
> -		igt_info("\n%s: SKIPPED\n\n", test_name);
>  		goto out;
>  	}
>  	igt_assert(fb_is_bound(o, o->fb_ids[0]));
> @@ -1322,8 +1286,6 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
>  	if (o->flags & TEST_VBLANK)
>  		check_final_state(o, &o->vblank_state, elapsed);
>  
> -	igt_info("\n%s: PASSED\n\n", test_name);
> -
>  out:
>  	igt_remove_fb(drm_fd, &o->fb_info[2]);
>  	igt_remove_fb(drm_fd, &o->fb_info[1]);
> @@ -1334,6 +1296,45 @@ out:
>  	free_test_output(o);
>  }
>  
> +static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
> +				 int crtc_count, int duration_ms)
> +{
> +	char test_name[128];
> +
> +	switch (crtc_count) {
> +	case RUN_TEST:
> +		connector_find_preferred_mode(o->_connector[0], crtc_idxs[0], o);
> +		if (!o->mode_valid)
> +			return;
> +		snprintf(test_name, sizeof(test_name),
> +			 "%s-%s%d",
> +			 kmstest_pipe_name(o->_pipe[0]),
> +			 kmstest_connector_type_str(o->kconnector[0]->connector_type),
> +			 o->kconnector[0]->connector_type_id);
> +		break;
> +	case RUN_PAIR:
> +		connector_find_compatible_mode(crtc_idxs[0], crtc_idxs[1], o);
> +		if (!o->mode_valid)
> +			return;
> +		snprintf(test_name, sizeof(test_name),
> +			 "%s%s-%s%d-%s%d",
> +			 kmstest_pipe_name(o->_pipe[0]),
> +			 kmstest_pipe_name(o->_pipe[1]),
> +			 kmstest_connector_type_str(o->kconnector[0]->connector_type),
> +			 o->kconnector[0]->connector_type_id,
> +			 kmstest_connector_type_str(o->kconnector[1]->connector_type),
> +			 o->kconnector[1]->connector_type_id);
> +		break;
> +	default:
> +		igt_assert(0);
> +	}
> +
> +	igt_assert_eq(o->count, crtc_count);
> +
> +	igt_dynamic_f("%s", test_name)
> +		__run_test_on_crtc_set(o, crtc_idxs, crtc_count, duration_ms);
> +}
> +
>  static int run_test(int duration, int flags)
>  {
>  	struct test_output o;
> @@ -1584,7 +1585,7 @@ igt_main
>  		test_nonblocking_read(drm_fd);
>  
>  	for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
> -		igt_subtest_f("%s%s",
> +		igt_subtest_with_dynamic_f("%s%s",
>  			      tests[i].flags & TEST_BASIC ? "basic-" : "",
>  			      tests[i].name)
>  			run_test(tests[i].duration, tests[i].flags);
> @@ -1592,7 +1593,7 @@ igt_main
>  		if (tests[i].flags & TEST_NO_2X_OUTPUT)
>  			continue;
>  
> -		igt_subtest_f( "2x-%s", tests[i].name)
> +		igt_subtest_with_dynamic_f("2x-%s", tests[i].name)
>  			run_pair(tests[i].duration, tests[i].flags);
>  	}
>  
> @@ -1618,13 +1619,13 @@ igt_main
>  		if (tests[i].flags & (TEST_EINVAL | TEST_EBUSY | TEST_HANG))
>  			continue;
>  
> -		igt_subtest_f( "%s-interruptible", tests[i].name)
> +		igt_subtest_with_dynamic_f("%s-interruptible", tests[i].name)
>  			run_test(tests[i].duration, tests[i].flags);
>  
>  		if (tests[i].flags & TEST_NO_2X_OUTPUT)
>  			continue;
>  
> -		igt_subtest_f( "2x-%s-interruptible", tests[i].name)
> +		igt_subtest_with_dynamic_f("2x-%s-interruptible", tests[i].name)
>  			run_pair(tests[i].duration, tests[i].flags);
>  	}
>  	igt_stop_signal_helper();
> -- 
> 2.26.0
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-04-14 10:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 10:28 [igt-dev] [PATCH i-g-t] kms_flip: Convert to dynamic CRTC test groups Chris Wilson
2020-04-14 10:47 ` Petri Latvala [this message]
2020-04-14 15:05 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_flip: Convert to dynamic CRTC test groups (rev3) Patchwork
2020-04-15 10:12 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-04-11  9:44 [igt-dev] [PATCH i-g-t] kms_flip: Convert to dynamic CRTC test groups Chris Wilson
2020-04-11 10:37 ` Chris Wilson

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=20200414104735.GP9497@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    /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