Report and compare stddev instead of variance so that direct submission passes ;) --- tests/gem_exec_latency.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/gem_exec_latency.c b/tests/gem_exec_latency.c index 547d728b3..757b390d0 100644 --- a/tests/gem_exec_latency.c +++ b/tests/gem_exec_latency.c @@ -429,7 +429,7 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) igt_warn("Failed to set scheduling policy!\n"); msg.status = RT_FAIL; write(link[1], &msg, sizeof(msg)); - exit(1); + break; } } @@ -439,7 +439,7 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) passname[pass]); msg.status = RT_FAIL; write(link[1], &msg, sizeof(msg)); - exit(1); + break; } igt_spin_busywait_until_running(spin); @@ -457,7 +457,7 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) igt_warn("Wait timeout! (%s)\n", passname[pass]); write(link[1], &msg, sizeof(msg)); - exit(1); + break; } if (t > msg.max) @@ -468,17 +468,15 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) igt_spin_batch_free(fd, spin); - igt_info("%10s: mean=%.2fus variance=%.2fus max=%.2fus (n=%lu)\n", + igt_info("%10s: mean=%.2fus stddev=%.3fus max=%.2fus (n=%lu)\n", passname[pass], igt_mean_get(&msg.mean) * 1e6, - igt_mean_get_variance(&msg.mean) * 1e6, + sqrt(igt_mean_get_variance(&msg.mean)) * 1e6, msg.max * 1e6, msg.mean.count); write(link[1], &msg, sizeof(msg)); } while (++pass < 3); - - exit(0); } for (i = 0; i < 3; i++) { @@ -494,11 +492,12 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) igt_waitchildren(); /* - * Check that the submission latency variance for a task with RT - * priority is no larger than three times the same of a normal task. + * Check that the submission latency stddev for a task with RT + * priority is no larger than three times the same of a normal task, + * (since variance is the square of stddev, we check 9 times) */ igt_assert(igt_mean_get_variance(&res[2].mean) < - igt_mean_get_variance(&res[1].mean) * 3); + igt_mean_get_variance(&res[1].mean) * 9); } igt_main -- 2.17.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx