Commit f801e574 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 661b871f
......@@ -205,8 +205,8 @@ class tDB:
# cases, when wcfs, even after receiving `kill -9`, will be stuck in kernel.
# ( git.kernel.org/linus/a131de0a482a makes in-kernel FUSE client to
# still wait for request completion even after fatal signal )
t._closed = chan()
t._wcfuseconn = os.stat(testmntpt).st_dev
t._closed = chan()
t._wcfuseabort = open("/sys/fs/fuse/connections/%d/abort" % os.stat(testmntpt).st_dev, "w")
go(t._abort_ontimeout, 7*time.second) # NOTE must be >> with_timeout
# ZBigFile(s) scheduled for commit
......@@ -252,14 +252,16 @@ class tDB:
return # tDB closed = testcase completed
# timeout -> force-umount wcfs
print("\nC: test timed out after %.1fs -> aborting wcfs fuse connection"
" to unblock" % (dt / time.second), file=sys.stderr)
writefile("/sys/fs/fuse/connections/%d/abort" % t._wcfuseconn, b"1\n")
print("\nC: test timed out after %.1fs" % (dt / time.second), file=sys.stderr)
print("-> aborting wcfs fuse connection to unblock ...", file=sys.stderr)
t._wcfuseabort.write(b"1\n")
t._wcfuseabort.flush()
# close closes test database as well as all tracked files, watch links and wcfs.
# it also prints change history to help developer overview current testcase.
@func
def close(t):
defer(t._wcfuseabort.close)
defer(t._closed.close)
# unmount and wait for wcfs to exit
......
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