diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_reset_stats.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c index 27bc6c9c..3b4974f9 100644 --- a/tests/gem_reset_stats.c +++ b/tests/gem_reset_stats.c @@ -148,6 +148,8 @@ static int gem_reset_status(int fd, int ctx_id) return RS_NO_ERROR; } +static struct timespec ts_injected; + #define BAN HANG_ALLOW_BAN #define ASYNC 2 static void inject_hang(int fd, uint32_t ctx, @@ -156,6 +158,8 @@ static void inject_hang(int fd, uint32_t ctx, { igt_hang_ring_t hang; + clock_gettime(CLOCK_MONOTONIC, &ts_injected); + hang = igt_hang_ctx(fd, ctx, e->exec_id | e->flags, flags & BAN, NULL); if ((flags & ASYNC) == 0) igt_post_hang_ring(fd, hang); @@ -238,6 +242,8 @@ static void test_rs(const struct intel_execution_engine *e, assert_reset_status(i, fd[i], 0, RS_BATCH_PENDING); } + igt_assert(igt_seconds_elapsed(&ts_injected) <= 30); + for (i = 0; i < num_fds; i++) close(fd[i]); } @@ -290,6 +296,8 @@ static void test_rs_ctx(const struct intel_execution_engine *e, } sync_gpu(); + igt_assert(igt_seconds_elapsed(&ts_injected) <= 30); + for (i = 0; i < num_fds; i++) assert_reset_status(i, fd[i], 0, RS_NO_ERROR); |