Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
57fd0b75
Commit
57fd0b75
authored
Jul 16, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
16f5dcaa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
wcfs/__init__.py
wcfs/__init__.py
+1
-1
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+15
-11
No files found.
wcfs/__init__.py
View file @
57fd0b75
...
...
@@ -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
...
...
wcfs/wcfs_test.py
View file @
57fd0b75
...
...
@@ -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 & tWatch
e
s
# tracked opened tFiles & tWatch
Link
s
t
.
_files
=
set
()
t
.
_wlinks
=
set
()
...
...
@@ -279,8 +279,8 @@ class tDB:
return
# tDB closed = testcase completed
# timeout -> force-umount wcfs
print
(
"
\
n
C: test timed out after %.1fs"
%
(
dt
/
time
.
second
),
file
=
sys
.
stderr
)
print
(
"-> aborting wcfs fuse connection to unblock ...
\
n
"
,
file
=
sys
.
stderr
)
eprint
(
"
\
n
C: 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
(
"
\
n
C: wcfs.go does not exit"
,
file
=
sys
.
stderr
)
print
(
"-> kill -QUIT wcfs.go ...
\
n
"
,
file
=
sys
.
stderr
)
eprint
(
"
\
n
C: 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
(
"
\
n
C: wcfs.go does not exit (after SIGQUIT)"
,
file
=
sys
.
stderr
)
print
(
"-> kill -KILL wcfs.go ...
\
n
"
,
file
=
sys
.
stderr
)
eprint
(
"
\
n
C: 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
(
"
\
n
C: 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
(
"
\
n
C: 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.
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment