[igt-dev] [PATCH i-g-t] tests/drm_import_export: Restrict runtime
Chris Wilson
chris at chris-wilson.co.uk
Thu Nov 28 08:24:42 UTC 2019
Switch from fixed amount of work to fixed time so that we don't have
order-of-magnitude discrepancies in runtime between platforms.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
tests/drm_import_export.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/drm_import_export.c b/tests/drm_import_export.c
index f79c09db8..d8f9b6065 100644
--- a/tests/drm_import_export.c
+++ b/tests/drm_import_export.c
@@ -40,6 +40,7 @@
#include <unistd.h>
#include <sys/syscall.h>
+#define DURATION 10
int fd;
drm_intel_bufmgr *bufmgr;
@@ -107,8 +108,7 @@ static void start_test(void)
{
int i;
- for (i=0; i < 16384; i++)
- {
+ igt_until_timeout(DURATION) {
drm_intel_bo * bo_shared;
bo_shared = drm_intel_bo_alloc(bufmgr1, "buf-shared",16384, 4096);
@@ -196,7 +196,7 @@ static void test_import_close_race(void)
igt_assert_eq(pthread_create(&t, NULL, import_close_thread , &t_data), 0);
- igt_until_timeout(15) {
+ igt_until_timeout(DURATION) {
bo = drm_intel_bo_alloc(bufmgr, "buf-shared", 4096, 4096);
igt_assert(bo != NULL);
/*
--
2.24.0
More information about the igt-dev
mailing list