generic: verify FIBMAP address overlap
PATCH v2 1/1 generic: verify FIBMAP address overlap
xfstests doesn't cover FIBMAP test, it cause we brought in a regression bug fixed by "79b3dbe4adb3 fs: fix iomap_bmap position calculation".
Although FIBMAP is old, there're still some programs use it, likes LILO. This case tests if there's physical address overlap returned by FIBMAP.
Signed-off-by Zorro Lang <[email protected]>
---
Hi,
V2 did below changes:
1) New _require_fibmap() function in common/rc.
2) Change $TESTFILE to $testfile.
3) Simplify the logic of function verify_filefrag().
Thanks,
Zorro
common/rc | 14 +++++++ tests/generic/999 | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/999.out | 3 ++ tests/generic/group | 1 + 4 files changed, 122 insertions(+) create mode 100755 tests/generic/999 create mode 100644 tests/generic/999.out
common/rc +14 -0
@@ -3843,6 +3843,20 @@ _require_scratch_btime() _scratch_unmount } +_require_fibmap() +{ + _require_command "$FILEFRAG_PROG" filefrag + + local file="$TEST_DIR/fibmap_testfile" + + echo "XX" > $file + ${FILEFRAG_PROG} -B $file 2>&1 | grep -q "FIBMAP[[:space:]]*unsupported" + if [ $? -eq 0 ]; then + _notrun "FIBMAP isn't supported on current fs" + fi + rm -f $file +} + init_rc ################################################################################
tests/generic/999 new file +104 -0
104 lines not on this page · raw message
tests/generic/999.out new file +3 -0
@@ -0,0 +1,3 @@ +QA output created by 999 +== FIBMAP on empty file == +== FIBMAP on sparse file ==
tests/generic/group +1 -0
@@ -519,3 +519,4 @@ 514 auto quick clone 515 auto quick clone 516 auto quick dedupe clone +999 auto quick
Signature · 1 line
2.14.5