mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs/032: properly test for corruption from xfs_copy
From the xfs_repair manpage:
xfs_repair run without the -n option will always return
a status code of 0.
So we must use "-n" to detect corruption in this test.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
fa4fcb5294
commit
ac6c6b9f0b
+2
-1
@@ -68,7 +68,8 @@ while [ $SECTORSIZE -le $PAGESIZE ]; do
|
||||
|
||||
$XFS_COPY_PROG -d $SCRATCH_DEV $IMGFILE >> $seqres.full 2>&1 || \
|
||||
_fail "Copy failed for Sector size $SECTORSIZE Block size $BLOCKSIZE"
|
||||
$XFS_REPAIR_PROG $IMGFILE >> $seqres.full 2>&1 || \
|
||||
# Must use "-n" to get exit code; without it xfs_repair always returns 0
|
||||
$XFS_REPAIR_PROG -n $IMGFILE >> $seqres.full 2>&1 || \
|
||||
_fail "Copy corrupted for Sector size $SECTORSIZE Block size $BLOCKSIZE"
|
||||
|
||||
BLOCKSIZE=$(($BLOCKSIZE * 2));
|
||||
|
||||
Reference in New Issue
Block a user