Commit f5df0cea authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f76dfed1
...@@ -171,6 +171,19 @@ def test_wcfs_client(): ...@@ -171,6 +171,19 @@ def test_wcfs_client():
tm2.assertBlk(5, '', {}) tm2.assertBlk(5, '', {})
tm2.assertBlk(6, '', {}) tm2.assertBlk(6, '', {})
# open same fh twice, close once - fh2 continue to work ok
fh2 = wconn.open(zf._p_oid)
defer(fh2.close)
mfh2 = fh2.mmap(2, 3); defer(mfh2.unmap); tmfh2 = tMapping(t, mfh2)
tm1.assertBlk(2, 'c2', {}); tmfh2.assertBlk(2, 'c2', {})
tm1.assertBlk(3, 'd3', {}); tmfh2.assertBlk(3, 'd3', {})
tm1.assertBlk(4, 'e3', {}); tmfh2.assertBlk(4, 'e3', {})
fh2.close()
tm1.assertBlk(2, 'c2', {}); tmfh2.assertBlk(2, 'c2', {})
tm1.assertBlk(3, 'd3', {}); tmfh2.assertBlk(3, 'd3', {})
tm1.assertBlk(4, 'e3', {}); tmfh2.assertBlk(4, 'e3', {})
# resync ↓ -> "forbidden" (reject is from server) -> wconn is down. # resync ↓ -> "forbidden" (reject is from server) -> wconn is down.
with raises(error, match=": going back in history is forbidden"): wconn.resync(at2) with raises(error, match=": going back in history is forbidden"): wconn.resync(at2)
with raises(error, match=".*: connection closed"): wconn.open(zf._p_oid) with raises(error, match=".*: connection closed"): wconn.open(zf._p_oid)
...@@ -178,7 +191,6 @@ def test_wcfs_client(): ...@@ -178,7 +191,6 @@ def test_wcfs_client():
# XXX w mapping with RW - in sync # XXX w mapping with RW - in sync
# XXX fh close then open again and use # XXX fh close then open again and use
# XXX open same fh twice, close once - fh2 continue to work ok
# verify that on Conn/FileH down/closed -> Mappings switch to EFAULT on access. # verify that on Conn/FileH down/closed -> Mappings switch to EFAULT on access.
......
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