]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
overlay/061: enhance mmap ro/rw inconsistencies test
authorAmir Goldstein <amir73il@gmail.com>
Sun, 27 Jan 2019 08:38:50 +0000 (10:38 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 3 Feb 2019 07:26:47 +0000 (15:26 +0800)
commit43c35280910e81c96355e33417b6c409c02f8afc
tree55c1eb181f7c2317cac1641eafa7bc830db87d40
parentebc6c083d3bcfd813202d4d743021e44a899f15e
overlay/061: enhance mmap ro/rw inconsistencies test

overlay/061 is currently the only overlay test that is expected to
fail on upstream kernel.

It is a flavor of test overlay/016 with mread in stead of pread.
The ro/rw inconsistencies related to file read()/write() API were
fixed with stacked file operations in v4.19, but the ro/rw
inconsistencies related to shared mmap read/write remain to be
fixed.

The test currently checks cache coherency between mmap read and file
write(), but this sort of cache coherency is a Linux implementation
detail not a requirement of the API.

Instead of mread vs. pwrite, check consistency of mread vs. mwrite
to shared mmap, which is required by the MMAP_SHARED API.

Because we can, perform the test on shared memory that maps files
that are already close and check also that mwrite after file is
closed is persistent. This adds test coverage for future overlayfs
writeback code.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/overlay/061
tests/overlay/061.out