[PATCH i-g-t] tests/kms_cursor_crc: optimise cursor crc on simulation
Santhosh Reddy Guddati
santhosh.reddy.guddati at intel.com
Mon Jun 23 12:06:43 UTC 2025
Reduce the number of test crc iterations on simulation to avoid timeouts
on simulation.
Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
---
tests/kms_cursor_crc.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index cacd2402c..28c747639 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -490,9 +490,20 @@ static void test_crc_offscreen(data_t *data)
static void test_crc_sliding(data_t *data)
{
int i;
+ int max;
+ bool run_in_simulation = false;
+
+ run_in_simulation = igt_run_in_simulation();
+
+ /* In simulation, we only run a few rounds to keep the test fast */
+ if (run_in_simulation)
+ max = 4;
+ else
+ max = 16;
+
struct {
igt_crc_t crc[3];
- } rounds[16] = {};
+ } rounds[max];
/* Make sure cursor moves smoothly and pixel-by-pixel, and that there are
* no alignment issues. Horizontal, vertical and diagonal test.
@@ -521,10 +532,15 @@ static void test_crc_random(data_t *data)
{
igt_crc_t crc[50];
int i, max, x[ARRAY_SIZE(crc)], y[ARRAY_SIZE(crc)];
+ bool run_in_simulation = false;
max = data->flags & (TEST_DPMS | TEST_SUSPEND) ? 2 : ARRAY_SIZE(crc);
/* Random cursor placement */
+ run_in_simulation = igt_run_in_simulation();
+
+ if (run_in_simulation)
+ max = 10;
/* HW test */
cursor_enable(data);
--
2.34.1
More information about the igt-dev
mailing list