generic/250: ignore xfs_io IO errors when writing to dmerror device

When testing with data=journal ext4, direct write to dmerror device
doesn't return EIO, because ext4 turns direct write to buffered
write in data=journal mode and all data is written to journal
buffer. The write only fails later when commiting journal and error
messages can be seen in dmesg.

As the test is checking on the md5 checksum of the test file, it's
ok to ignore the IO error returned by xfs_io, as long as the
checksums match the golden image.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Eryu Guan
2016-05-26 11:26:24 +08:00
parent dddc12bc76
commit 86e7366e84
2 changed files with 4 additions and 4 deletions
+3 -2
View File
@@ -79,11 +79,12 @@ _dmerror_mount
echo "Compare files"
md5sum $testdir/file2 | _filter_scratch
echo "CoW and unmount"
echo "Write and unmount"
$XFS_IO_PROG -f -c "pwrite -S 0x63 $bufsize 1" $testdir/file2 >> $seqres.full
sync
_dmerror_load_error_table
$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 >> $seqres.full
$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 \
>> $seqres.full 2>&1
_dmerror_load_working_table
_dmerror_unmount
_dmerror_mount