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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
78c54e48
Commit
78c54e48
authored
Jun 23, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b10e08f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+9
-14
No files found.
wcfs/wcfs_test.py
View file @
78c54e48
...
...
@@ -849,7 +849,7 @@ class tSrvReq:
# watch sets up or adjusts a watch for file@at.
#
# During setup it verifies that wcfs sends correct initial pins.
# During setup it verifies that wcfs sends correct initial
/update
pins.
#
# pinok: {} blk -> rev
# pinok can be omitted - in that case it is computed automatically.
...
...
@@ -857,11 +857,11 @@ class tSrvReq:
# The automatic computation of pinok is verified against explicitly provided
# pinok when it is present.
#
# Criteria for when blk must be pinned:
# Criteria for when blk must be pinned
as of @at view
:
#
# blk ∈ pin(at) <=> ∃ r = rev(blk):
# 1) at < r ; block was changed after at
# 2) r ≤ headOfAccess(blk) ; block revision changed after at was accessed
# blk ∈ pin
ned
(at) <=> ∃ r = rev(blk):
#
1) at < r ; block was changed after at
#
2) r ≤ headOfAccess(blk) ; block revision changed after at was accessed
@
func
(
tWatchLink
)
def
watch
(
twlink
,
zf
,
at
,
pinok
=
None
):
# -> tWatch
t
=
twlink
.
tdb
...
...
@@ -940,7 +940,10 @@ def watch(twlink, zf, at, pinok=None): # -> tWatch
twlink
.
_watch
(
zf
,
at
,
pinok
,
"ok"
)
w
.
at
=
at
# `watch ... -> at_i -> at_j` must be the same as `watch ø -> at_j`
assert
w
.
pinned
==
t
.
_needPinAt
(
zf
,
at
)
# XXX & headOfBlkAccess
return
w
...
...
@@ -1327,18 +1330,10 @@ def test_wcfs():
print
(
'
\
n
--------'
)
print
(
' -> '
.
join
([
t
.
hat
(
_
)
for
_
in
revv
]))
wl
=
t
.
openwatch
()
w
=
w
l
.
watch
(
zf
,
revv
[
0
])
wl
.
watch
(
zf
,
revv
[
0
])
wl
.
watch
(
zf
,
revv
[
0
])
# verify at_i -> at_i
for
at
in
revv
[
1
:]:
wl
.
watch
(
zf
,
at
)
# at_i -> at_j -> at_k must be the same as ø -> at_k
wl_
=
t
.
openwatch
()
w_
=
wl_
.
watch
(
zf
,
at
)
assert
w
.
at
==
w_
.
at
assert
w
.
pinned
==
w_
.
pinned
wl_
.
close
()
wl
.
close
()
# """
...
...
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