Commit ac8dfb69 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 665ae5ac
......@@ -182,35 +182,34 @@ def test_wcfs_client_down_efault():
# XXX all fileh / mappings become invalid after wconn.close
t = tDB(); zf = t.zfile; at0=t.at0
defer(t.close)
pinned = lambda fh: fhpinned(t, fh)
at1 = t.commit(zf, {2:'c1', 3:'d1'})
wconn = t.wc.connect(at1)
defer(wconn.close)
fh = wconn.open(zf._p_oid)
defer(fh.close)
fh1 = wconn.open(zf._p_oid)
defer(fh1.close)
m1 = fh.mmap(1, 4); defer(m1.unmap)
m2 = fh.mmap(3, 3); defer(m2.unmap)
m11 = fh1.mmap(1, 4); defer(m11.unmap)
m12 = fh1.mmap(3, 3); defer(m12.unmap)
tm1 = tMapping(t, m1)
tm2 = tMapping(t, m2)
tm1.assertBlk(1, '', {})
tm1.assertBlk(2, 'c1', {})
tm1.assertBlk(3, 'd1', {}); tm2.assertBlk(3, 'd1', {})
tm1.assertBlk(4, '', {}); tm2.assertBlk(4, '', {})
pass; tm2.assertBlk(5, '', {})
# close fileh -> all mmaps must turn into efaulting memory
fh.close()
tm1.assertBlkFaults(1)
tm1.assertBlkFaults(2)
tm1.assertBlkFaults(3); tm2.assertBlkFaults(3)
tm1.assertBlkFaults(4); tm2.assertBlkFaults(4)
pass; tm2.assertBlkFaults(5)
tm11 = tMapping(t, m11)
tm12 = tMapping(t, m12)
tm11.assertBlk(1, '', {})
tm11.assertBlk(2, 'c1', {})
tm11.assertBlk(3, 'd1', {}); tm12.assertBlk(3, 'd1', {})
tm11.assertBlk(4, '', {}); tm12.assertBlk(4, '', {})
pass; tm12.assertBlk(5, '', {})
# close fh1 -> all fh1 mmaps must turn into efaulting memory.
fh1.close()
tm11.assertBlkFaults(1)
tm11.assertBlkFaults(2)
tm11.assertBlkFaults(3); tm12.assertBlkFaults(3)
tm11.assertBlkFaults(4); tm12.assertBlkFaults(4)
pass; tm12.assertBlkFaults(5)
# verify that read_mustfault works as expected.
......
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