Commit 57fd0b75 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 16f5dcaa
......@@ -65,7 +65,7 @@ class WCFS(object):
# ._proc wcfs process if it was opened by this WCFS | None
pass
# Conn represents logical connection viewing data on wcfs server as of
# Conn represents logical connection viewing data on wcfs filesystem as of
# particular database state.
#
# It uses /head/bigfile/* and notifications received from /head/watch to
......
......@@ -251,7 +251,7 @@ class tDB:
# this is updated only explicitly via ._blkheadaccess() .
t._blkaccessedViaHead = {} # ZBigFile -> set(blk) XXX ZF -> foid ? (threads)
# tracked opened tFiles & tWatches
# tracked opened tFiles & tWatchLinks
t._files = set()
t._wlinks = set()
......@@ -279,8 +279,8 @@ class tDB:
return # tDB closed = testcase completed
# timeout -> force-umount wcfs
print("\nC: test timed out after %.1fs" % (dt / time.second), file=sys.stderr)
print("-> aborting wcfs fuse connection to unblock ...\n", file=sys.stderr)
eprint("\nC: test timed out after %.1fs" % (dt / time.second))
eprint("-> aborting wcfs fuse connection to unblock ...\n")
t._wcfuseabort.write(b"1\n")
t._wcfuseabort.flush()
t._wcfuseaborted.close()
......@@ -302,20 +302,20 @@ class tDB:
# kill wcfs.go in case it is deadlocked and does not exit by itself
if procwait_(timeout(), t.wc._proc):
return
print("\nC: wcfs.go does not exit", file=sys.stderr)
print("-> kill -QUIT wcfs.go ...\n", file=sys.stderr)
eprint("\nC: wcfs.go does not exit")
eprint("-> kill -QUIT wcfs.go ...\n")
os.kill(t.wc._proc.pid, SIGQUIT)
if procwait_(timeout(), t.wc._proc):
return
print("\nC: wcfs.go does not exit (after SIGQUIT)", file=sys.stderr)
print("-> kill -KILL wcfs.go ...\n", file=sys.stderr)
eprint("\nC: wcfs.go does not exit (after SIGQUIT)")
eprint("-> kill -KILL wcfs.go ...\n")
os.kill(t.wc._proc.pid, SIGKILL)
if procwait_(timeout(), t.wc._proc):
return
print("\nC: wcfs.go does not exit (after SIGKILL; probably it is stuck in kernel)", file=sys.stderr)
print("-> nothing we can do...\n", file=sys.stderr) # XXX dump /proc/pid/task/*/stack instead (ignore EPERM)
eprint("\nC: wcfs.go does not exit (after SIGKILL; probably it is stuck in kernel)")
eprint("-> nothing we can do...\n") # XXX dump /proc/pid/task/*/stack instead (ignore EPERM)
fail("wcfs.go does not exit even after SIGKILL")
defer(_)
def _():
......@@ -2104,6 +2104,10 @@ def is_mountpoint(path): # -> bool
return mounted
# eprint prints msg to stderr
def eprint(msg):
print(msg, file=sys.stderr)
# xdefer is like defer, but makes sure exception raised before deferred
# function is called is not lost.
#
......
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