Skip to contentSkip to conversation

selftests/seccomp: use 90s as timeout

PATCH Superseded Thadeu Lima de Souza Cascardo 2 participants 2 messages Jun 1, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/seccomp: use 90s as timeout

As seccomp_benchmark tries to calibrate how many samples will take more than 5 seconds to execute, it may end up picking up a number of samples that take 10 (but up to 12) seconds. As the calibration will take double that time, it takes around 20 seconds. Then, it executes the whole thing again, and then once more, with some added overhead. So, the thing might take more than 40 seconds, which is too close to the 45s timeout.

That is very dependent on the system where it's executed, so may not be observed always, but it has been observed on x86 VMs. Using a 90s timeout seems safe enough.

---
 tools/testing/selftests/seccomp/settings | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/seccomp/settings +1 -1
index d61f00d8cad3..ba4d85f74cd6 100644
@@ -1 +1 @@
-90
+timeout=90
Signature · 1 line
2.25.1
#1 lore raw
Quoted 7 lines · Thadeu Lima de Souza Cascardo

As seccomp_benchmark tries to calibrate how many samples will take more than 5 seconds to execute, it may end up picking up a number of samples that take 10 (but up to 12) seconds. As the calibration will take double that time, it takes around 20 seconds. Then, it executes the whole thing again, and then once more, with some added overhead. So, the thing might take more than 40 seconds, which is too close to the 45s timeout.

Quoted 5 lines

That is very dependent on the system where it's executed, so may not be observed always, but it has been observed on x86 VMs. Using a 90s timeout seems safe enough.

Excellent point! Thanks, I've applied this (well, actually, your v2) to for-next/seccomp.

Signature · 1 line
Kees Cook