Commit 835aec09 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b2efc471
...@@ -1738,6 +1738,7 @@ def test_wcfspy_virtmem(): ...@@ -1738,6 +1738,7 @@ def test_wcfspy_virtmem():
wconn = t.wc.connect(at1) wconn = t.wc.connect(at1)
defer(wconn.close) defer(wconn.close)
# mmap with 1 block beyond file size
m1 = wconn.mmap(zf._p_oid, 2, 3) m1 = wconn.mmap(zf._p_oid, 2, 3)
defer(m1.unmap) defer(m1.unmap)
...@@ -1751,6 +1752,7 @@ def test_wcfspy_virtmem(): ...@@ -1751,6 +1752,7 @@ def test_wcfspy_virtmem():
#assertCache(m1, [0,0,0]) #assertCache(m1, [0,0,0])
assert f.pinned == {} assert f.pinned == {}
# initial data reads
tm1.assertBlk(2, 'c1') tm1.assertBlk(2, 'c1')
assert f.pinned == {2:at1} assert f.pinned == {2:at1}
tm1.assertBlk(3, 'd1') tm1.assertBlk(3, 'd1')
...@@ -1758,8 +1760,12 @@ def test_wcfspy_virtmem(): ...@@ -1758,8 +1760,12 @@ def test_wcfspy_virtmem():
tm1.assertBlk(4, '') tm1.assertBlk(4, '')
assert f.pinned == {2:at1} assert f.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'}) at3 = t.commit(zf, {3:'d3', 4:'e3'})
assert f.pinned == {2:at1} assert f.pinned == {2:at1}
tm1.assertBlk(2, 'c1')
assert f.pinned == {2:at1}
tm1.assertBlk(3, 'd1') tm1.assertBlk(3, 'd1')
assert f.pinned == {2:at1, 3:at1} assert f.pinned == {2:at1, 3:at1}
tm1.assertBlk(4, '') tm1.assertBlk(4, '')
......
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