xfstests: mmap and copy file data with page overlapping
PATCH 1/1 xfstests: mmap and copy file data with page overlapping
Mmap 2 pages of file, write 64 bytes to the first and second pages, copy the data from the first page and then second page to the second page offset with $pagesize - 64. Verify the data at the end.
+-----------------------+
| (copy) |
| V
+---------------+---------------+------------
|AAAA| ........ |AAAA| ... |AAAA|AAAA|
+---------------+---------------+------------
| ^
| (copy) |
+------------+This's also a regression test cover kernel commit: 4f06dd92b5d0 ("fuse: fix write deadlock")
Signed-off-by Zorro Lang <[email protected]>
--- .gitignore | 1 + src/Makefile | 3 +- src/t_mmap_writev_overlap.c | 134 ++++++++++++++++++++++++++++++++++++ tests/generic/637 | 57 +++++++++++++++ tests/generic/637.out | 2 + tests/generic/group | 1 + 6 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 src/t_mmap_writev_overlap.c create mode 100755 tests/generic/637 create mode 100644 tests/generic/637.out
.gitignore +1 -0
@@ -142,6 +142,7 @@ /src/t_mmap_stale_pmd /src/t_mmap_write_ro /src/t_mmap_writev +/src/t_mmap_writev_overlap /src/t_mtab /src/t_ofd_locks /src/t_open_tmpfiles
src/Makefile +2 -1
@@ -17,7 +17,8 @@ TARGETS = dirstress fill fill2 getpagesize holes lstat64 \ t_mmap_cow_race t_mmap_fallocate fsync-err t_mmap_write_ro \ t_ext4_dax_journal_corruption t_ext4_dax_inline_corruption \ t_ofd_locks t_mmap_collision mmap-write-concurrent \ - t_get_file_time t_create_short_dirs t_create_long_dirs t_enospc + t_get_file_time t_create_short_dirs t_create_long_dirs t_enospc \ + t_mmap_writev_overlap LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \ preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \
src/t_mmap_writev_overlap.c new file +134 -0
134 lines not on this page · raw message
tests/generic/637 new file +57 -0
57 lines not on this page · raw message
tests/generic/637.out new file +2 -0
@@ -0,0 +1,2 @@ +QA output created by 637 +Silence is golden
tests/generic/group +1 -0
@@ -639,3 +639,4 @@ 634 auto quick atime bigtime 635 auto quick atime bigtime shutdown 636 auto quick swap +637 auto quick rw
Signature · 1 line
2.31.1