Subtests that measure time of resume after engine reset compare a median
value calculated from the measurements against a presumed limit and fail
if the limit has been exceeded.  However, if it occurs not possible to
collect enough measurements required for stable median value calculation,
that condition is now ignored and success is reported, as if the measured
time fit below the limit.

Skip if not able to collect sufficient number of time measurements.  CI
results from slow platforms that always skip may be handled as expected
skips.

Signed-off-by: Janusz Krzysztofik <[email protected]>
---
 tests/intel/gem_eio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/intel/gem_eio.c b/tests/intel/gem_eio.c
index b65b914faf..0a00ef026e 100644
--- a/tests/intel/gem_eio.c
+++ b/tests/intel/gem_eio.c
@@ -409,8 +409,9 @@ static void check_wait_elapsed(const char *prefix, int fd, 
igt_stats_t *st)
                 igt_stats_get_median(st)*1e-6,
                 igt_stats_get_max(st)*1e-6);
 
-       if (st->n_values < 9)
-               return; /* too few for stable median */
+       igt_require_f(st->n_values > 8,
+                     "at least 9 resets completed for stable median 
calculation, %d is too few\n",
+                     st->n_values);
 
        /*
         * Older platforms need to reset the display (incl. modeset to off,
-- 
2.51.0

Reply via email to