From 68f177d238ca8dd7412b0ce30d86d03dfcdd78cf Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Sun, 18 Nov 2018 17:11:13 +0000 Subject: Kill filesystem process on test cleanup. --- test/util.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/util.py') diff --git a/test/util.py b/test/util.py index ba02b9f..8bef265 100644 --- a/test/util.py +++ b/test/util.py @@ -44,7 +44,7 @@ def wait_for_mount(mount_process, mnt_dir, elapsed += 0.1 pytest.fail("mountpoint failed to come up") -def cleanup(mnt_dir): +def cleanup(mount_process, mnt_dir): # Don't bother trying Valgrind if things already went wrong if 'bsd' in sys.platform or 'dragonfly' in sys.platform: @@ -54,6 +54,11 @@ def cleanup(mnt_dir): '-z', '-u', mnt_dir] subprocess.call(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) + mount_process.terminate() + try: + mount_process.wait(1) + except subprocess.TimeoutExpired: + mount_process.kill() def umount(mount_process, mnt_dir): -- cgit v1.2.3