]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/250: ignore xfs_io IO errors when writing to dmerror device
authorEryu Guan <eguan@redhat.com>
Thu, 26 May 2016 03:26:24 +0000 (11:26 +0800)
committerEryu Guan <eguan@redhat.com>
Wed, 15 Jun 2016 07:32:30 +0000 (15:32 +0800)
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>
tests/generic/250
tests/generic/250.out

index 6d15de2bb5e5942e5a63e1410710bacf54648c32..3c4fe6dbf28cb4e11990b0158fb39222697dcd78 100755 (executable)
@@ -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
index 710c80e50bfc2a05835ece39f822755c2f5a31b0..67b006bd123fbb9e4ba4444d81579413c154faf3 100644 (file)
@@ -3,8 +3,7 @@ Format and mount
 Create the original files
 Compare files
 ec8bb3b24d5b0f1b5bdf8c8f0f541ee6  SCRATCH_MNT/test-250/file2
-CoW and unmount
-pwrite64: Input/output error
+Write and unmount
 Compare files
 3ed86318f4ff8da26c1c2a6e3041f9be  SCRATCH_MNT/test-250/file2
 Check for damage