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
a252e8ca
Commit
a252e8ca
authored
Jan 13, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e2a40b50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+19
-10
No files found.
wcfs/wcfs_test.py
View file @
a252e8ca
...
...
@@ -1731,6 +1731,7 @@ class tMapping(object):
# XXX assertData
# test_wcfspy_virtmem verifies wcfs.py integration with virtmem.
@
func
def
test_wcfspy_virtmem
():
...
...
@@ -1756,38 +1757,46 @@ def test_wcfspy_virtmem():
tm1
=
tMapping
(
m1
)
# pinned returns fh.pinned with rev wrapped into tAt.
# XXX better wrap FileH into tFileH and do this automatically in .pinned ?
def
pinned
(
fh
):
p
=
fh
.
pinned
.
copy
()
for
blk
in
p
:
p
[
blk
]
=
tAt
(
t
,
p
[
blk
])
return
p
#assertCache(m1, [0,0,0])
assert
fh
.
pinned
==
{}
assert
pinned
(
fh
)
==
{}
# verify initial data reads
tm1
.
assertBlk
(
2
,
'c1'
)
assert
fh
.
pinned
==
{
2
:
at1
}
assert
pinned
(
fh
)
==
{
2
:
at1
}
tm1
.
assertBlk
(
3
,
'd1'
)
assert
fh
.
pinned
==
{
2
:
at1
}
assert
pinned
(
fh
)
==
{
2
:
at1
}
tm1
.
assertBlk
(
4
,
''
)
assert
fh
.
pinned
==
{
2
:
at1
}
assert
pinned
(
fh
)
==
{
2
:
at1
}
# commit with growing file size -> verify data read as the same, #3 pinned.
# (#4 is not yet pinned because it was not accessed)
at3
=
t
.
commit
(
zf
,
{
3
:
'd3'
,
4
:
'e3'
})
assert
fh
.
pinned
==
{
2
:
at1
}
assert
pinned
(
fh
)
==
{
2
:
at1
}
tm1
.
assertBlk
(
2
,
'c1'
)
assert
fh
.
pinned
==
{
2
:
at1
}
assert
pinned
(
fh
)
==
{
2
:
at1
}
tm1
.
assertBlk
(
3
,
'd1'
)
assert
fh
.
pinned
==
{
2
:
at1
,
3
:
at1
}
assert
pinned
(
fh
)
==
{
2
:
at1
,
3
:
at1
}
tm1
.
assertBlk
(
4
,
''
)
assert
fh
.
pinned
==
{
2
:
at1
,
3
:
at1
}
assert
pinned
(
fh
)
==
{
2
:
at1
,
3
:
at1
}
# resync at1 -> at2: #2 must unpin to @head; #4 must stay as zero
wconn
.
resync
(
at2
)
assert
fh
.
pinned
==
{
3
:
at1
}
assert
pinned
(
fh
)
==
{
3
:
at1
}
tm1
.
assertBlk
(
2
,
'c2'
)
tm1
.
assertBlk
(
3
,
'd1'
)
tm1
.
assertBlk
(
4
,
''
)
# resync at2 -> at3: #3 must unpin to @head; #4 - start to read with data
wconn
.
resync
(
at3
)
assert
fh
.
pinned
==
{}
assert
pinned
(
fh
)
==
{}
tm1
.
assertBlk
(
2
,
'c2'
)
tm1
.
assertBlk
(
3
,
'd3'
)
tm1
.
assertBlk
(
4
,
'e3'
)
...
...
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