Skip to content

Commit 37e4f7c

Browse files
committed
contest: vm: sleep 5 sec before triggering kmemleak
Stan reports that kmemleak has a 5 sec grace period. This is probably also why we always catch leaks on the second scan. Add a sleep. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ef05351 commit 37e4f7c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contest/remote/lib/vm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,9 @@ def check_health(self):
402402
if self.fail_state:
403403
return
404404
if self.has_kmemleak:
405+
# kmemleak needs objects to be at least MSECS_MIN_AGE (5000)
406+
# before it considers them to have been leaked
407+
sleep(5)
405408
self.cmd("echo scan > /sys/kernel/debug/kmemleak && cat /sys/kernel/debug/kmemleak")
406409
self.drain_to_prompt()
407410
# Do it twice, kmemleak likes to hide the leak on the first attempt

0 commit comments

Comments
 (0)