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
d64280c6
Commit
d64280c6
authored
Jan 08, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
494dc22c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+13
-14
No files found.
wcfs/wcfs_test.py
View file @
d64280c6
...
...
@@ -1743,52 +1743,51 @@ def test_wcfspy_virtmem():
wconn
=
t
.
wc
.
connect
(
at1
)
defer
(
wconn
.
close
)
wf
=
wconn
.
open
(
zf
.
_p_oid
)
# XXX defer(
wf
.close)
fh
=
wconn
.
open
(
zf
.
_p_oid
)
# XXX defer(
fh
.close)
# create mmap with 1 block beyond file size
m1
=
wf
.
mmap
(
2
,
3
)
m1
=
fh
.
mmap
(
2
,
3
)
defer
(
m1
.
unmap
)
assert
m1
.
blk_start
==
2
assert
m1
.
blk_stop
==
5
assert
len
(
m1
.
mem
)
==
3
*
zf
.
blksize
f
=
m1
.
file
tm1
=
tMapping
(
m1
)
#assertCache(m1, [0,0,0])
assert
f
.
pinned
==
{}
assert
f
h
.
pinned
==
{}
# verify initial data reads
tm1
.
assertBlk
(
2
,
'c1'
)
assert
f
.
pinned
==
{
2
:
at1
}
assert
f
h
.
pinned
==
{
2
:
at1
}
tm1
.
assertBlk
(
3
,
'd1'
)
assert
f
.
pinned
==
{
2
:
at1
}
assert
f
h
.
pinned
==
{
2
:
at1
}
tm1
.
assertBlk
(
4
,
''
)
assert
f
.
pinned
==
{
2
:
at1
}
assert
f
h
.
pinned
==
{
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
f
.
pinned
==
{
2
:
at1
}
assert
f
h
.
pinned
==
{
2
:
at1
}
tm1
.
assertBlk
(
2
,
'c1'
)
assert
f
.
pinned
==
{
2
:
at1
}
assert
f
h
.
pinned
==
{
2
:
at1
}
tm1
.
assertBlk
(
3
,
'd1'
)
assert
f
.
pinned
==
{
2
:
at1
,
3
:
at1
}
assert
f
h
.
pinned
==
{
2
:
at1
,
3
:
at1
}
tm1
.
assertBlk
(
4
,
''
)
assert
f
.
pinned
==
{
2
:
at1
,
3
:
at1
}
assert
f
h
.
pinned
==
{
2
:
at1
,
3
:
at1
}
# resync at1 -> at2: #2 must unpin to @head; #4 must stay as zero
wconn
.
resync
(
at2
)
assert
f
.
pinned
==
{
3
:
at1
}
assert
f
h
.
pinned
==
{
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
f
.
pinned
==
{}
assert
f
h
.
pinned
==
{}
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