erofs-utils: tests: check SEEK_HOLE/SEEK_DATA in inode_share mode
PATCH 1/1 erofs-utils: tests: check SEEK_HOLE/SEEK_DATA in inode_share mode
In inode_share mode erofs_ishare_fops used to fall back to generic_file_llseek(), which considers the whole file to be data, so SEEK_HOLE always returned i_size and the real holes of sparse files were hidden. This is fixed by kernel commit 8ebf95897885 ("erofs:
support SEEK_HOLE/SEEK_DATA in inode_share mode").
Add a regression test for it. xfs_io is requisite for seeking SEEK_HOLE and SEEK_DATA.
Signed-off-by Jingbo Xu <[email protected]>
--- tests/Makefile.am | 3 + tests/erofs/033 | 157 ++++++++++++++++++++++++++++++++++++++++++++ tests/erofs/033.out | 2 + 3 files changed, 162 insertions(+) create mode 100755 tests/erofs/033 create mode 100644 tests/erofs/033.out
tests/Makefile.am +3 -0
@@ -135,6 +135,9 @@ TESTS += erofs/031 # 032 - check that the xattr layout does not depend on listxattr(2) order TESTS += erofs/032 +# 033 - regression test for SEEK_HOLE/SEEK_DATA in inode_share mode +TESTS += erofs/033 + # NEW TEST CASE HERE # TESTS += erofs/999
tests/erofs/033 new file +157 -0
157 lines not on this page · raw message
tests/erofs/033.out new file +2 -0
@@ -0,0 +1,2 @@ +QA output created by 033 +Silence is golden
Signature · 1 line
2.19.1.6.gb485710b