mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
reflink: make error reporting consistent when simulating EIO
When we're using dm-error to simulate failed devices, we don't really know if the write or the fdatasync is going to receive the EIO. For tests that make a single (failed) write attempt and never retry, it's sufficient to check that the file md5 doesn't change after recovery. For tests that /do/ retry the write, we should capture the entire output and just look for the word error instead of enshrining the exact perror message (filename/function call and everything) in the golden output. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
eaa652fbb2
commit
c4288aec3c
+1
-2
@@ -80,8 +80,7 @@ md5sum $testdir/file2 | _filter_scratch
|
||||
echo "CoW and unmount"
|
||||
sync
|
||||
_dmerror_load_error_table
|
||||
urk=$($XFS_IO_PROG -f -c "mmap -rw 0 $filesize" -c "mwrite -S 0x63 0 $filesize" $testdir/file2 > $TEST_DIR/mwrite.out 2>&1)
|
||||
cat $TEST_DIR/mwrite.out | tee -a $seqres.full
|
||||
$XFS_IO_PROG -f -c "mmap -rw 0 $filesize" -c "mwrite -S 0x63 0 $filesize" $testdir/file2 >> $seqres.full 2>&1
|
||||
_dmerror_load_working_table
|
||||
rm -rf $testdir/file2 >> $seqres.full 2>&1
|
||||
_dmerror_unmount
|
||||
|
||||
Reference in New Issue
Block a user