Commit 0d679efa authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8a5e3d10
...@@ -1248,10 +1248,6 @@ def test_wcfs_basic(): ...@@ -1248,10 +1248,6 @@ def test_wcfs_basic():
f.assertCache([0,0,0]) # initially not cached f.assertCache([0,0,0]) # initially not cached
f.assertData (['','','c1'], mtime=t.head) 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 # >>> (@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 # NOTE blocks d(4) and f(5) will be accessed only in the end
at2 = t.commit(zf, {2:'c2', 3:'d2', 5:'f2'}) at2 = t.commit(zf, {2:'c2', 3:'d2', 5:'f2'})
...@@ -1326,6 +1322,24 @@ def test_wcfs_basic_hole2zblk(): ...@@ -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 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) # 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. # verify that watch setup is robust to client errors/misbehaviour.
@func @func
def test_wcfs_watch_robust(): def test_wcfs_watch_robust():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment