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
0d679efa
Commit
0d679efa
authored
Jul 02, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8a5e3d10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+18
-4
No files found.
wcfs/wcfs_test.py
View file @
0d679efa
...
...
@@ -1248,10 +1248,6 @@ def test_wcfs_basic():
f
.
assertCache
([
0
,
0
,
0
])
# initially not cached
f
.
assertData
([
''
,
''
,
'c1'
],
mtime
=
t
.
head
)
# read after file size returns (0, ok)
# (the same behaviour as on e.g. ext4 and as requested by posix)
assert
0
==
io
.
readat
(
f
.
f
.
fileno
(),
100
*
blksize
,
bytearray
(
10
))
# >>> (@at2) commit again -> we can see both latest and snapshotted states
# NOTE blocks d(4) and f(5) will be accessed only in the end
at2
=
t
.
commit
(
zf
,
{
2
:
'c2'
,
3
:
'd2'
,
5
:
'f2'
})
...
...
@@ -1326,6 +1322,24 @@ def test_wcfs_basic_hole2zblk():
# XXX ZBlk copied from blk1 -> blk2 ; for the same file and for file1 -> file2 (δbtree)
# XXX ZBlk moved from blk1 -> blk2 ; for the same file and for file1 -> file2 (δbtree)
# verify that read after file size returns (0, ok)
# (the same behaviour as on e.g. ext4 and as requested by posix)
@
func
def
test_wcfs_basic_read_aftertail
():
t
=
tDB
();
zf
=
t
.
zfile
defer
(
t
.
close
)
t
.
commit
(
zf
,
{
2
:
'c1'
}
f
=
t
.
open
(
zf
)
f
.
assertData
([
''
,
''
,
'c1'
])
assert
10
==
io
.
readat
(
f
.
f
.
fileno
(),
0
*
blksize
,
bytearray
(
10
))
assert
10
==
io
.
readat
(
f
.
f
.
fileno
(),
1
*
blksize
,
bytearray
(
10
))
assert
10
==
io
.
readat
(
f
.
f
.
fileno
(),
2
*
blksize
,
bytearray
(
10
))
assert
0
==
io
.
readat
(
f
.
f
.
fileno
(),
3
*
blksize
,
bytearray
(
10
))
assert
0
==
io
.
readat
(
f
.
f
.
fileno
(),
100
*
blksize
,
bytearray
(
10
))
# verify that watch setup is robust to client errors/misbehaviour.
@
func
def
test_wcfs_watch_robust
():
...
...
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