diff mbox series

[v2,2/2] futex/futex_wake04.c: raise delay waiting for threads

Message ID 20181010114136.23957-2-rafael.tinoco@linaro.org
State New
Headers show
Series [v2,1/2] futex/futex_wake04.c: fix hugepages setup for test | expand

Commit Message

Rafael David Tinoco Oct. 10, 2018, 11:41 a.m. UTC
usleep() time was too small if test is being executed in slower terminal
devices (specially embedded systems). Raising it to 0.001 seconds was
enough to finish 10240 iterations in around 90 seconds in a 4 vcpu kvm
guest (fully emulated serial being used as console).

Link: https://bugs.linaro.org/show_bug.cgi?id=3984
Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org>
---
 testcases/kernel/syscalls/futex/futex_wake04.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/futex/futex_wake04.c b/testcases/kernel/syscalls/futex/futex_wake04.c
index 1ae9599ab..bd10e56af 100644
--- a/testcases/kernel/syscalls/futex/futex_wake04.c
+++ b/testcases/kernel/syscalls/futex/futex_wake04.c
@@ -175,8 +175,9 @@  static void wakeup_thread2(void)
 				tst_strerrno(res));
 	}
 
+    /* 0.001 seconds: less might cause lockups for slower terminals */
 	while (wait_for_threads(2))
-		usleep(100);
+		usleep(1000);
 
 	futex_wake(futex2, 1, 0);