xfs/117: fix inode corruption loop
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 5 Feb 2020 00:02:07 +0000 (16:02 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 9 Feb 2020 15:56:09 +0000 (23:56 +0800)
`seq X Y` will print all numbers between X and Y, including Y.  Since
inode chunks contain inodes numbered from X to X+63, we need to set the
loop variables correctly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/117

index 0a7831d5ef1f5ba6e79b8507b60e806749bb58e8..e32496235b3ead34585265f9551d414c4461a877 100755 (executable)
@@ -70,7 +70,7 @@ echo "+ check fs"
 _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
 
 echo "+ corrupt image"
 _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
 
 echo "+ corrupt image"
-seq "${inode}" "$((inode + 64))" | while read ino; do
+seq "${inode}" "$((inode + 63))" | while read ino; do
        _scratch_xfs_db -x -c "inode ${ino}" -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full 2>&1
 done
 
        _scratch_xfs_db -x -c "inode ${ino}" -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full 2>&1
 done