From: Anthony Iliopoulos Date: Tue, 21 Apr 2020 11:36:43 +0000 (+0200) Subject: xfs/126: make blocktrash work reliably on attrleaf blocks X-Git-Tag: v2022.05.01~807 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=4590ee0ad3f9fd2529b9927c78f059477b1cac8c xfs/126: make blocktrash work reliably on attrleaf blocks Running xfs/126 sometimes fails due to output mismatch. Due to the randomized nature of the test, periodically the selected bits are not relevant to the test, or the selected bits are not flipped. Supply an offset that is close to the start of the metadata block, so that the test will reliably corrupt the header. Suggested-by: Darrick J. Wong Link: https://lore.kernel.org/linux-xfs/20200116160323.GC2149943@magnolia Signed-off-by: Anthony Iliopoulos Reviewed-by: Darrick J. Wong Signed-off-by: Eryu Guan --- diff --git a/tests/xfs/126 b/tests/xfs/126 index 4f9f8cf9..d01338c9 100755 --- a/tests/xfs/126 +++ b/tests/xfs/126 @@ -72,7 +72,7 @@ echo "+ corrupt xattr" loff=1 while true; do _scratch_xfs_db -x -c "inode ${inode}" -c "ablock ${loff}" -c "stack" | grep -q 'file attr block is unmapped' && break - _scratch_xfs_db -x -c "inode ${inode}" -c "ablock ${loff}" -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full + _scratch_xfs_db -x -c "inode ${inode}" -c "ablock ${loff}" -c "stack" -c "blocktrash -o 4 -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full loff="$((loff + 1))" done