[igt-dev] [PATCH i-g-t] tests/kms_busy: Limit the execution to two pipes

Petri Latvala petri.latvala at intel.com
Wed Mar 10 12:50:09 UTC 2021


On Thu, Mar 11, 2021 at 02:06:40AM +0530, Bhanuprakash Modem wrote:
> As all pipes are symmetric, restrict the execution to two pipes
> can save lot of CI time.
> 
> If we want to execute on all pipes, we need to pass an extra
> argument "-e" indicates extended.
> 
> Example: ./build/tests/kms_busy -e --r basic
> 
> Cc: Karthik B S <karthik.b.s at intel.com>
> Cc: Latvala Petri <petri.latvala at intel.com>
> Cc: Kunche Kishore <kishore.kunche at intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> ---
>  tests/kms_busy.c | 138 ++++++++++++++++++++++++++---------------------
>  1 file changed, 77 insertions(+), 61 deletions(-)
> 
> diff --git a/tests/kms_busy.c b/tests/kms_busy.c
> index df1f8e11a..48ed11229 100644
> --- a/tests/kms_busy.c
> +++ b/tests/kms_busy.c
> @@ -30,6 +30,15 @@
>  
>  IGT_TEST_DESCRIPTION("Basic check of KMS ABI with busy framebuffers.");
>  
> +/* restricted pipe count */
> +#define CRTC_RESTRICT_CNT 2
> +
> +static bool all_pipes = false;
> +
> +#define for_each_pipe_with_valid_output_limited(display, pipe, output, pipe_count) \
> +	for_each_pipe_with_valid_output(display, pipe, output) \
> +			for_each_if(pipe_count-- > 0)
> +
>  static igt_output_t *
>  set_fb_on_crtc(igt_display_t *dpy, int pipe, struct igt_fb *fb)
>  {
> @@ -287,10 +296,41 @@ static void test_pageflip_modeset_hang(igt_display_t *dpy, enum pipe pipe)
>  	igt_remove_fb(dpy->drm_fd, &fb);
>  }
>  
> -igt_main
> +static int opt_handler(int opt, int opt_index, void *data)
> +{
> +	switch (opt) {
> +		case 'e':
> +			all_pipes = true;
> +			break;
> +		default:
> +			return IGT_OPT_HANDLER_ERROR;
> +	}
> +
> +	return IGT_OPT_HANDLER_SUCCESS;
> +}
> +
> +const char *help_str =
> +	"  -e \tRun on all pipes. (By default subtests will run on two pipes)\n";
> +
> +igt_main_args("det:", NULL, help_str, opt_handler, NULL)

Same here as in that other patch: You declare det: but handle only e.

-- 
Petri Latvala


More information about the igt-dev mailing list