Commit 3a6bd764 authored by Kirill Smelkov's avatar Kirill Smelkov

X wcfs: tests: Run `fusermount -u` the second time if we had to kill wcfs

This makes sure to cleanup /proc/mounts from stale / broken FUSE
connection, and removes uninformational `assert not is_mountpoint` from
raising, thus, adding more noise in already very verbose wcfs-kill-dump.
parent 75857c32
......@@ -247,10 +247,19 @@ class tWCFS(_tWCFS):
assert not is_mountpoint(t.wc.mountpoint)
os.rmdir(t.wc.mountpoint)
defer(_)
@func
def _():
# kill wcfs.go in case it is deadlocked and does not exit by itself
if procwait_(timeout(), t.wc._proc):
return
# run `fusermount -u` the second time after we kill wcfs to cleanup
# /proc/mounts and avoid `assert not is_mountpoint` above.
def _():
if is_mountpoint(t.wc.mountpoint):
subprocess.check_call(["fusermount", "-u", t.wc.mountpoint])
defer(_)
eprint("\nC: wcfs.go does not exit")
eprint("-> kill -QUIT wcfs.go ...\n")
os.kill(t.wc._proc.pid, SIGQUIT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment