Commit 7b79065f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a8e2c5cc
...@@ -32,6 +32,7 @@ from golang.golang_test import panics ...@@ -32,6 +32,7 @@ from golang.golang_test import panics
from wendelin.wcfs.wcfs_test import tDB, tAt from wendelin.wcfs.wcfs_test import tDB, tAt
from wendelin.wcfs import wcfs_test from wendelin.wcfs import wcfs_test
from wendelin.wcfs.internal.wcfs_test import read_mustfault from wendelin.wcfs.internal.wcfs_test import read_mustfault
from wendelin.wcfs.internal import mm
# XXX so that e.g. testdb is set up + ... # XXX so that e.g. testdb is set up + ...
def setup_module(): wcfs_test.setup_module() def setup_module(): wcfs_test.setup_module()
...@@ -94,7 +95,7 @@ class tMapping(object): ...@@ -94,7 +95,7 @@ class tMapping(object):
fh = t.mmap.fileh fh = t.mmap.fileh
blkview = t.mmap.mem[blk_inmmap*fh.blksize:][:fh.blksize] blkview = t.mmap.mem[blk_inmmap*fh.blksize:][:fh.blksize]
for i in range(0, len(blkview), 8): # XXX 8 too frequent? for i in range(0, len(blkview), mm.PAGE_SIZE):
read_mustfault(blkview[i:][:1]) read_mustfault(blkview[i:][:1])
...@@ -201,18 +202,8 @@ def test_wcfs_client_down_efault(): ...@@ -201,18 +202,8 @@ def test_wcfs_client_down_efault():
with panics("not faulted"): tm1.assertBlkFaults(2) with panics("not faulted"): tm1.assertBlkFaults(2)
with panics("not faulted"): tm1.assertBlkFaults(3) with panics("not faulted"): tm1.assertBlkFaults(3)
#with panics("not faulted"): read_mustfault(m1.mem[0*zf.blksize:][:1])
#with panics("not faulted"): read_mustfault(m1.mem[1*zf.blksize:][:1])
#assert m1.mem[0*zf.blksize] == b'c'
#assert m1.mem[1*zf.blksize] == b'd'
# close fileh -> m1 must turn into efaulting memory # close fileh -> m1 must turn into efaulting memory
# XXX verify whole block?
fh.close() fh.close()
read_mustfault(m1.mem[0*zf.blksize:][:1])
read_mustfault(m1.mem[1*zf.blksize:][:1])
tm1.assertBlkFaults(1) # XXX
tm1.assertBlkFaults(2) tm1.assertBlkFaults(2)
tm1.assertBlkFaults(3) tm1.assertBlkFaults(3)
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