Re: [PATCH i-g-t v1 10/16] tests/kms_vblank: limit #outputs tested during suspend
"Thasleem, Mohammed" <[email protected]> Thu, 30 Jul 2026 15:06:29 +0530
| Newsgroups | org.freedesktop.lists.igt-dev |
|---|---|
| Message-ID | <[email protected]> |
--------------4qYbZ5suAMEPbjcksMzaDXt0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit On 13-07-2026 02:25 pm, Michał Grzelak wrote: > We are iterating through each output while testing suspend. This results > in extended execution time. In turn this leads to hitting CI enforced > timeout. > > By default limit number of tested outputs to 2. Test each connected > output when passing command-line parameter. > > Signed-off-by: Michał Grzelak<[email protected]> > --- > tests/kms_vblank.c | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c > index 47b733af15..7ad23da355 100644 > --- a/tests/kms_vblank.c > +++ b/tests/kms_vblank.c > @@ -109,7 +109,10 @@ typedef struct { > #define RPM 0x80 > } data_t; > > +#define OUTPUT_LIMIT 2 > + > static bool all_pipes; > +static bool all_outputs; > static int active_crtcs[IGT_MAX_PIPES]; > static uint32_t last_crtc_index; > > @@ -476,6 +479,7 @@ static void vblank_ts_cont(data_t *data, int fd, int nchildren) > static void run_subtests(data_t *data) > { > igt_crtc_t *crtc; > + int output_count = 0; -->Initialised once entire function but never reset b/t subtests, IMO reset at start of subtest would be better? > const struct { > const char *name; > void (*func)(data_t *, int, int); > @@ -516,6 +520,11 @@ static void run_subtests(data_t *data) > igt_describe("Check if test run while hanging by introducing NOHANG flag."); > igt_subtest_with_dynamic_f("%s-%s", f->name, m->name) { > for_each_connected_output(&data->display, data->output) { > + if (!all_outputs && (m->flags & SUSPEND) && output_count > OUTPUT_LIMIT) { -->Hear as well : output_count >= OUTPUT_LIMIT , to limit only two outputs.. > + igt_info("Skipping output %s\n", data->output->name); > + continue; > + } > + > for_each_crtc(&data->display, crtc) { > if(!igt_crtc_connector_valid(crtc, data->output)) > continue; > @@ -538,6 +547,8 @@ static void run_subtests(data_t *data) > run_test(data, f->func); > } > } > + > + output_count++; > } > } > > @@ -628,6 +639,9 @@ static int opt_handler(int opt, int opt_index, void *data) > case 'e': > all_pipes = true; > break; > + case 'o': > + all_outputs = true; > + break; > default: > return IGT_OPT_HANDLER_ERROR; > } > @@ -636,9 +650,10 @@ static int opt_handler(int opt, int opt_index, void *data) > } > > const char *help_str = > - " -e \tRun on all pipes. (By default subtests will run on two pipes)\n"; > + " -e \tRun on all pipes. (By default subtests will run on two pipes)\n" > + " -o \tRun on all outputs. (By default subtests will run on three outputs)\n"; > > -int igt_main_args("e", NULL, help_str, opt_handler, NULL) > +int igt_main_args("eo", NULL, help_str, opt_handler, NULL) > { > igt_crtc_t *crtc; > int fd; --------------4qYbZ5suAMEPbjcksMzaDXt0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 8bit <!DOCTYPE html><html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <p><br> </p> <div class="moz-cite-prefix">On 13-07-2026 02:25 pm, Michał Grzelak wrote:<br> </div> <blockquote type="cite" cite="mid:[email protected]"> <pre wrap="" class="moz-quote-pre">We are iterating through each output while testing suspend. This results in extended execution time. In turn this leads to hitting CI enforced timeout. By default limit number of tested outputs to 2. Test each connected output when passing command-line parameter. Signed-off-by: Michał Grzelak <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><[email protected]></a> --- tests/kms_vblank.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c index 47b733af15..7ad23da355 100644 --- a/tests/kms_vblank.c +++ b/tests/kms_vblank.c @@ -109,7 +109,10 @@ typedef struct { #define RPM 0x80 } data_t; +#define OUTPUT_LIMIT 2 + static bool all_pipes; +static bool all_outputs; static int active_crtcs[IGT_MAX_PIPES]; static uint32_t last_crtc_index; @@ -476,6 +479,7 @@ static void vblank_ts_cont(data_t *data, int fd, int nchildren) static void run_subtests(data_t *data) { igt_crtc_t *crtc; + int output_count = 0;</pre> </blockquote> -->Initialised once entire function but never reset b/t subtests, IMO reset at start of subtest would be better? <blockquote type="cite" cite="mid:[email protected]"> <pre wrap="" class="moz-quote-pre"> const struct { const char *name; void (*func)(data_t *, int, int); @@ -516,6 +520,11 @@ static void run_subtests(data_t *data) igt_describe("Check if test run while hanging by introducing NOHANG flag."); igt_subtest_with_dynamic_f("%s-%s", f->name, m->name) { for_each_connected_output(&data->display, data->output) { + if (!all_outputs && (m->flags & SUSPEND) && output_count > OUTPUT_LIMIT) {</pre> </blockquote> -->Hear as well : <span style="white-space: pre-wrap">output_count >= OUTPUT_LIMIT , to limit only two outputs..</span> <blockquote type="cite" cite="mid:[email protected]"> <pre wrap="" class="moz-quote-pre"> + igt_info("Skipping output %s\n", data->output->name); + continue; + } + for_each_crtc(&data->display, crtc) { if(!igt_crtc_connector_valid(crtc, data->output)) continue; @@ -538,6 +547,8 @@ static void run_subtests(data_t *data) run_test(data, f->func); } } + + output_count++; } } @@ -628,6 +639,9 @@ static int opt_handler(int opt, int opt_index, void *data) case 'e': all_pipes = true; break; + case 'o': + all_outputs = true; + break; default: return IGT_OPT_HANDLER_ERROR; } @@ -636,9 +650,10 @@ static int opt_handler(int opt, int opt_index, void *data) } const char *help_str = - " -e \tRun on all pipes. (By default subtests will run on two pipes)\n"; + " -e \tRun on all pipes. (By default subtests will run on two pipes)\n" + " -o \tRun on all outputs. (By default subtests will run on three outputs)\n"; -int igt_main_args("e", NULL, help_str, opt_handler, NULL) +int igt_main_args("eo", NULL, help_str, opt_handler, NULL) { igt_crtc_t *crtc; int fd; </pre> </blockquote> </body> </html> --------------4qYbZ5suAMEPbjcksMzaDXt0--