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
035cce1f
Commit
035cce1f
authored
Oct 22, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
55dc0056
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+8
-8
No files found.
wcfs/wcfs_test.py
View file @
035cce1f
...
...
@@ -45,7 +45,7 @@ from thread import get_ident as gettid
from
time
import
gmtime
from
errno
import
EINVAL
,
ENOTCONN
from
resource
import
setrlimit
,
getrlimit
,
RLIMIT_MEMLOCK
from
golang
import
go
,
chan
,
select
,
func
,
defer
,
default
,
error
,
b
from
golang
import
go
,
chan
,
select
,
func
,
defer
,
error
,
b
from
golang
import
context
,
errors
,
sync
,
time
from
zodbtools.util
import
ashex
as
h
,
fromhex
import
pytest
;
xfail
=
pytest
.
mark
.
xfail
...
...
@@ -170,7 +170,7 @@ def test_join_autostart():
assert
os
.
path
.
isdir
(
wc
.
mountpoint
+
"/head/bigfile"
)
# verify that join
successfully starts wcfs if previous wcfs exited uncleanly.
# verify that join successfully starts wcfs if previous wcfs exited uncleanly.
@
func
def
test_join_after_crash
():
zurl
=
testzurl
...
...
@@ -198,7 +198,7 @@ def test_join_after_crash():
procmounts_lookup_wcfs
(
zurl
)
# verify that start successfuly starts server if previous wcfs exited uncleanly.
# verify that start successful
l
y starts server if previous wcfs exited uncleanly.
@
func
def
test_start_after_crash
():
zurl
=
testzurl
...
...
@@ -345,7 +345,7 @@ class DFile:
#
# tDB must be explicitly closed once no longer used.
#
#
XXX
print -> t.trace/debug() + t.verbose depending on py.test -v -v ?
#
TODO(?)
print -> t.trace/debug() + t.verbose depending on py.test -v -v ?
class
tWCFS
(
_tWCFS
):
@
func
def
__init__
(
t
):
...
...
@@ -420,7 +420,7 @@ class tDB(tWCFS):
# whether head/ ZBigFile(s) blocks were ever accessed via wcfs.
# this is updated only explicitly via ._blkheadaccess() .
t
.
_blkaccessedViaHead
=
{}
# ZBigFile -> set(blk)
XXX ZF -> foid ? (threads)
t
.
_blkaccessedViaHead
=
{}
# ZBigFile -> set(blk)
# tracked opened tFiles & tWatchLinks
t
.
_files
=
set
()
...
...
@@ -558,7 +558,7 @@ class tDB(tWCFS):
# XXX locking needed? or we do everything serially?
t
.
_blkaccessed
(
zf
).
add
(
blk
)
# _blkaccessed returns set describing wh
ether
head/zf blocks were ever accessed.
# _blkaccessed returns set describing wh
ich
head/zf blocks were ever accessed.
def
_blkaccessed
(
t
,
zf
):
# set(blk)
return
t
.
_blkaccessedViaHead
.
setdefault
(
zf
,
set
())
...
...
@@ -583,7 +583,7 @@ class tFile:
t
.
fmmap
=
None
tdb
.
_files
.
add
(
t
)
# make sure that wcfs reports zf.blksize as pref
fe
red block size for IO.
# make sure that wcfs reports zf.blksize as pref
er
red block size for IO.
# wcfs.py also uses .st_blksize in blk -> byte offset computation.
st
=
os
.
fstat
(
t
.
f
.
fileno
())
assert
st
.
st_blksize
==
t
.
blksize
...
...
@@ -886,7 +886,7 @@ class tWatchLink(wcfs.WatchLink):
w
.
pinned
=
{}
t
.
_watching
=
{}
# XXX just wrap req.at with tAt inpace
# XXX just wrap req.at with tAt inp
l
ace
"""
# recvReq is the same as WatchLink.recvReq but returns tSrvReq instead of PinReq.
def recvReq(t, ctx): # -> tSrvReq | None when EOF
...
...
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