Re: [igt-dev] [PATCH i-g-t] tests/kms_busy: Limit the execution to two pipes
From: Petri Latvala <hidden>
Date: 2021-03-10 12:49:41
On Thu, Mar 11, 2021 at 02:06:40AM +0530, Bhanuprakash Modem wrote:
quoted hunk ↗ jump to hunk
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 <redacted> Cc: Latvala Petri <redacted> Cc: Kunche Kishore <redacted> Signed-off-by: Bhanuprakash Modem <redacted> --- 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 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev