[PATCH i-g-t v3] tests/intel/kms_big_fb: Restrict runs on simulation
Kamil Konieczny
kamil.konieczny at linux.intel.com
Mon May 20 10:39:08 UTC 2024
Hi Pranay,
On 2024-05-20 at 10:31:55 +0530, Pranay Samala wrote:
> This test executes on only one pipe and all the available planes with
> set of 6 coordinates. Due to this, test takes long duration to execute
> on simulation and gets timeout.
>
> Restricting the test to execute only on one of the coordinates for
> simulation.
Now it looks much better, I still have one ask for improvement,
see below.
>
> Signed-off-by: Pranay Samala <pranay.samala at intel.com>
> ---
> tests/intel/kms_big_fb.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/kms_big_fb.c b/tests/intel/kms_big_fb.c
> index 1e45d8e42..502905974 100644
> --- a/tests/intel/kms_big_fb.c
> +++ b/tests/intel/kms_big_fb.c
> @@ -529,6 +529,9 @@ static bool test_plane(data_t *data)
>
> igt_assert_crc_equal(&big_crc, &small_crc);
> igt_pipe_crc_stop(data->pipe_crc);
> +
> + if (igt_run_in_simulation())
> + break;
Please move this to just after for(...) loop begins, the argument
it is much more easier to read, second is it will allow easily
modify it if you want to test (x,y) instead of (0,0). You could
reuse your conscept with var here, also add comment, so imho it
would be better:
At begin of this function, put:
bool run_in_simulation = igt_run_in_simulation();
At for loop:
for (int i = 0; i < ARRAY_SIZE(coords); i++) {
igt_crc_t small_crc, big_crc;
int x = coords[i].x;
int y = coords[i].y;
/* Limit running time on simulation to (0,0) */
if (run_in_simulation && i > 0)
break;
So now you could also easily change this into:
int x;
int y;
/* Limit running time on simulation to (x,y) */
if (run_in_simulation)
i = ARRAY_SIZE(coords) - 1;
x = coords[i].x;
y = coords[i].y;
Or use both (0,0) and (x,y) on simulation.
Regards,
Kamil
> }
>
> return true;
> @@ -540,6 +543,7 @@ static bool test_pipe(data_t *data)
> drmModeModeInfo *mode;
> igt_plane_t *primary;
> bool ret = false;
> + bool run_in_simulation = igt_run_in_simulation();
>
> igt_info("Using (pipe %s + %s) to run the subtest.\n",
> kmstest_pipe_name(data->pipe), igt_output_name(data->output));
> @@ -597,7 +601,7 @@ static bool test_pipe(data_t *data)
>
> for_each_plane_on_pipe(&data->display, data->pipe, data->plane) {
> ret = test_plane(data);
> - if (ret)
> + if (ret || run_in_simulation)
> break;
> }
>
> --
> 2.34.1
>
More information about the igt-dev
mailing list