diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2018-11-18 17:11:13 +0000 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2018-11-24 20:51:34 +0000 |
commit | 68f177d238ca8dd7412b0ce30d86d03dfcdd78cf (patch) | |
tree | 1f27e43cf1d9af9e8ecd250fb2fafd7782e20c5e /test/util.py | |
parent | 0c73b8389aaea156e7544d984be95515b9743033 (diff) | |
download | libfuse-68f177d238ca8dd7412b0ce30d86d03dfcdd78cf.tar.gz |
Kill filesystem process on test cleanup.
Diffstat (limited to 'test/util.py')
-rw-r--r-- | test/util.py | 7 |
1 files changed, 6 insertions, 1 deletions
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): |