diff options
-rw-r--r-- | tests/gem_close_race.c | 2 | ||||
-rw-r--r-- | tests/gem_ctx_create.c | 6 | ||||
-rw-r--r-- | tests/gem_ctx_switch.c | 21 | ||||
-rw-r--r-- | tests/gem_exec_create.c | 4 | ||||
-rw-r--r-- | tests/gem_exec_nop.c | 4 | ||||
-rw-r--r-- | tests/gem_sync.c | 52 |
6 files changed, 46 insertions, 43 deletions
diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c index 5edb3441..2850881b 100644 --- a/tests/gem_close_race.c +++ b/tests/gem_close_race.c @@ -230,7 +230,7 @@ igt_main } igt_subtest("basic-threads") - threads(10); + threads(1); igt_subtest("process-exit") { igt_fork(child, 768) diff --git a/tests/gem_ctx_create.c b/tests/gem_ctx_create.c index e92ec925..cd2db347 100644 --- a/tests/gem_ctx_create.c +++ b/tests/gem_ctx_create.c @@ -211,9 +211,11 @@ igt_main } igt_subtest("basic-files") - files(fd, 20, 1); + files(fd, 5, 1); + igt_subtest("files") + files(fd, 150, 1); igt_subtest("forked-files") - files(fd, 20, ncpus); + files(fd, 150, ncpus); for (const struct intel_execution_engine *e = intel_execution_engines; e->name; e++) { diff --git a/tests/gem_ctx_switch.c b/tests/gem_ctx_switch.c index 0f5286d7..0841bf22 100644 --- a/tests/gem_ctx_switch.c +++ b/tests/gem_ctx_switch.c @@ -67,7 +67,8 @@ static double elapsed(const struct timespec *start, const struct timespec *end) static void single(int fd, uint32_t handle, const struct intel_execution_engine *e, unsigned flags, - const int ncpus) + const int ncpus, + int timeout) { struct drm_i915_gem_execbuffer2 execbuf; struct drm_i915_gem_exec_object2 obj; @@ -117,15 +118,15 @@ static void single(int fd, uint32_t handle, clock_gettime(CLOCK_MONOTONIC, &start); do { igt_while_interruptible(flags & INTERRUPTIBLE) { - for (int loop = 0; loop < 1024; loop++) { + for (int loop = 0; loop < 64; loop++) { execbuf.rsvd1 = contexts[loop % 64]; reloc.presumed_offset = 0; gem_execbuf(fd, &execbuf); } - count += 1024; + count += 64; } clock_gettime(CLOCK_MONOTONIC, &now); - } while (elapsed(&start, &now) < 20.); + } while (elapsed(&start, &now) < timeout); gem_sync(fd, handle); clock_gettime(CLOCK_MONOTONIC, &now); @@ -161,17 +162,17 @@ igt_main for (e = intel_execution_engines; e->name; e++) { igt_subtest_f("%s%s", e->exec_id == 0 ? "basic-" : "", e->name) - single(fd, light, e, 0, 1); + single(fd, light, e, 0, 1, 5); igt_subtest_f("%s%s-heavy", e->exec_id == 0 ? "basic-" : "", e->name) - single(fd, heavy, e, 0, 1); + single(fd, heavy, e, 0, 1, 5); igt_subtest_f("%s-interruptible", e->name) - single(fd, light, e, INTERRUPTIBLE, 1); + single(fd, light, e, INTERRUPTIBLE, 1, 150); igt_subtest_f("forked-%s", e->name) - single(fd, light, e, 0, ncpus); + single(fd, light, e, 0, ncpus, 150); igt_subtest_f("forked-%s-heavy", e->name) - single(fd, heavy, e, 0, ncpus); + single(fd, heavy, e, 0, ncpus, 150); igt_subtest_f("forked-%s-interruptible", e->name) - single(fd, light, e, INTERRUPTIBLE, ncpus); + single(fd, light, e, INTERRUPTIBLE, ncpus, 150); } igt_fixture { diff --git a/tests/gem_exec_create.c b/tests/gem_exec_create.c index 6e01947c..aa7d9f48 100644 --- a/tests/gem_exec_create.c +++ b/tests/gem_exec_create.c @@ -157,9 +157,9 @@ igt_main } igt_subtest("basic") - all(device, 0, 20, 1); + all(device, 0, 5, 1); igt_subtest("forked") - all(device, 0, 20, ncpus); + all(device, 0, 150, ncpus); igt_subtest("madvise") all(device, LEAK, 20, 1); diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c index f49d7d4b..56298e13 100644 --- a/tests/gem_exec_nop.c +++ b/tests/gem_exec_nop.c @@ -315,10 +315,10 @@ igt_main } igt_subtest("basic-series") - series(device, handle, 10); + series(device, handle, 5); igt_subtest("basic-parallel") - parallel(device, handle, 10); + parallel(device, handle, 5); for (e = intel_execution_engines; e->name; e++) igt_subtest_f("%s", e->name) diff --git a/tests/gem_sync.c b/tests/gem_sync.c index 2a80efc4..57739773 100644 --- a/tests/gem_sync.c +++ b/tests/gem_sync.c @@ -81,7 +81,7 @@ static bool can_mi_store_dword(int gen, unsigned engine) } static void -sync_ring(int fd, unsigned ring, int num_children) +sync_ring(int fd, unsigned ring, int num_children, int timeout) { unsigned engines[16]; const char *names[16]; @@ -141,7 +141,7 @@ sync_ring(int fd, unsigned ring, int num_children) gem_execbuf(fd, &execbuf); gem_sync(fd, object.handle); } while (++cycles & 1023); - } while ((elapsed = gettime() - start) < SLOW_QUICK(10, 1)); + } while ((elapsed = gettime() - start) < timeout); igt_info("%s%sompleted %ld cycles: %.3f us\n", names[child % num_engines] ?: "", names[child % num_engines] ? " c" : "C", @@ -149,12 +149,12 @@ sync_ring(int fd, unsigned ring, int num_children) gem_close(fd, object.handle); } - igt_waitchildren_timeout(20, NULL); + igt_waitchildren_timeout(timeout+10, NULL); igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); } static void -store_ring(int fd, unsigned ring, int num_children) +store_ring(int fd, unsigned ring, int num_children, int timeout) { const int gen = intel_gen(intel_get_drm_devid(fd)); unsigned engines[16]; @@ -269,7 +269,7 @@ store_ring(int fd, unsigned ring, int num_children) gem_execbuf(fd, &execbuf); gem_sync(fd, object[1].handle); } while (++cycles & 1023); - } while ((elapsed = gettime() - start) < SLOW_QUICK(10, 1)); + } while ((elapsed = gettime() - start) < timeout); igt_info("%s%sompleted %ld cycles: %.3f us\n", names[child % num_engines] ?: "", names[child % num_engines] ? " c" : "C", @@ -278,7 +278,7 @@ store_ring(int fd, unsigned ring, int num_children) gem_close(fd, object[1].handle); gem_close(fd, object[0].handle); } - igt_waitchildren_timeout(20, NULL); + igt_waitchildren_timeout(timeout+10, NULL); igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); } @@ -508,7 +508,7 @@ store_many(int fd, unsigned ring, int timeout) } static void -sync_all(int fd, int num_children) +sync_all(int fd, int num_children, int timeout) { const struct intel_execution_engine *e; unsigned engines[16]; @@ -560,18 +560,18 @@ sync_all(int fd, int num_children) } gem_sync(fd, object.handle); } while (++cycles & 1023); - } while ((elapsed = gettime() - start) < SLOW_QUICK(10, 1)); + } while ((elapsed = gettime() - start) < timeout); igt_info("Completed %ld cycles: %.3f us\n", cycles, elapsed*1e6/cycles); gem_close(fd, object.handle); } - igt_waitchildren_timeout(20, NULL); + igt_waitchildren_timeout(timeout+10, NULL); igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); } static void -store_all(int fd, int num_children) +store_all(int fd, int num_children, int timeout) { const int gen = intel_gen(intel_get_drm_devid(fd)); const struct intel_execution_engine *e; @@ -679,14 +679,14 @@ store_all(int fd, int num_children) } gem_sync(fd, object[1].handle); } while (++cycles & 1023); - } while ((elapsed = gettime() - start) < SLOW_QUICK(10, 1)); + } while ((elapsed = gettime() - start) < timeout); igt_info("Completed %ld cycles: %.3f us\n", cycles, elapsed*1e6/cycles); gem_close(fd, object[1].handle); gem_close(fd, object[0].handle); } - igt_waitchildren_timeout(20, NULL); + igt_waitchildren_timeout(timeout+10, NULL); igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); } @@ -736,36 +736,36 @@ igt_main for (e = intel_execution_engines; e->name; e++) { igt_subtest_f("%s", e->name) - sync_ring(fd, e->exec_id | e->flags, 1); + sync_ring(fd, e->exec_id | e->flags, 1, 150); igt_subtest_f("store-%s", e->name) - store_ring(fd, e->exec_id | e->flags, 1); + store_ring(fd, e->exec_id | e->flags, 1, 150); igt_subtest_f("many-%s", e->name) - store_many(fd, e->exec_id | e->flags, 20); + store_many(fd, e->exec_id | e->flags, 150); igt_subtest_f("forked-%s", e->name) - sync_ring(fd, e->exec_id | e->flags, ncpus); + sync_ring(fd, e->exec_id | e->flags, ncpus, 150); igt_subtest_f("forked-store-%s", e->name) - store_ring(fd, e->exec_id | e->flags, ncpus); + store_ring(fd, e->exec_id | e->flags, ncpus, 150); } igt_subtest("basic-each") - sync_ring(fd, ~0u, 1); + sync_ring(fd, ~0u, 1, 5); igt_subtest("basic-store-each") - store_ring(fd, ~0u, 1); + store_ring(fd, ~0u, 1, 5); igt_subtest("basic-many-each") - store_many(fd, ~0u, 10); + store_many(fd, ~0u, 5); igt_subtest("forked-each") - sync_ring(fd, ~0u, ncpus); + sync_ring(fd, ~0u, ncpus, 150); igt_subtest("forked-store-each") - store_ring(fd, ~0u, ncpus); + store_ring(fd, ~0u, ncpus, 150); igt_subtest("basic-all") - sync_all(fd, 1); + sync_all(fd, 1, 5); igt_subtest("basic-store-all") - store_all(fd, 1); + store_all(fd, 1, 5); igt_subtest("forked-all") - sync_all(fd, ncpus); + sync_all(fd, ncpus, 150); igt_subtest("forked-store-all") - store_all(fd, ncpus); + store_all(fd, ncpus, 150); igt_fixture { igt_stop_hang_detector(); |