[PATCH i-g-t v4] tests/intel/kms_big_fb: Restrict runs on simulation
Pranay Samala
pranay.samala at intel.com
Mon May 20 17:28:10 UTC 2024
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.
v4:
- Inserted simulation check right after for loop (Kamil)
- Executing only on 1 coordinate (w, h) on simulation
Signed-off-by: Pranay Samala <pranay.samala at intel.com>
---
tests/intel/kms_big_fb.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/tests/intel/kms_big_fb.c b/tests/intel/kms_big_fb.c
index 1e45d8e42..605813f7f 100644
--- a/tests/intel/kms_big_fb.c
+++ b/tests/intel/kms_big_fb.c
@@ -443,6 +443,7 @@ static bool test_plane(data_t *data)
struct igt_fb *big_fb = &data->big_fb;
int w = data->big_fb_width - small_fb->width;
int h = data->big_fb_height - small_fb->height;
+ bool run_in_simulation = igt_run_in_simulation();
struct {
int x, y;
} coords[] = {
@@ -467,8 +468,13 @@ static bool test_plane(data_t *data)
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;
+ int x, y;
+
+ if (run_in_simulation)
+ i = ARRAY_SIZE(coords) - 1;
+
+ x = coords[i].x;
+ y = coords[i].y;
/* Hardware limitation */
if (data->format == DRM_FORMAT_RGB565 &&
@@ -540,6 +546,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 +604,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