echo "CoW and unmount"
sync
_dmerror_load_error_table
-$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
+urk=$($XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" \
+ -c "fdatasync" $testdir/file2 2>&1)
+echo $urk >> $seqres.full
+echo "$urk" | grep -q "error" || _fail "pwrite did not fail"
+
_dmerror_load_working_table
_dmerror_unmount
_dmerror_mount
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-265/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-265/file2
CoW and unmount
-fdatasync: Input/output error
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-265/file1
Check for damage
echo "CoW and unmount"
sync
_dmerror_load_error_table
-$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
+urk=$($XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" \
+ -c "fdatasync" $testdir/file2 2>&1)
+echo $urk >> $seqres.full
+echo "$urk" | grep -q "error" || _fail "pwrite did not fail"
echo "Clean up the mess"
_dmerror_unmount
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-266/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-266/file2
CoW and unmount
-fdatasync: Input/output error
Clean up the mess
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-266/file1
echo "CoW and unmount"
sync
_dmerror_load_error_table
-$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 >> $seqres.full 2>&1
_dmerror_load_working_table
rm -rf $testdir/file2 >> $seqres.full 2>&1
_dmerror_unmount
echo "CoW and unmount"
sync
_dmerror_load_error_table
-$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
+urk=$($XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" \
+ -c "fdatasync" $testdir/file2 2>&1)
+echo $urk >> $seqres.full
+echo "$urk" | grep -q "error" || _fail "pwrite did not fail"
_dmerror_load_working_table
echo "Rewrite"
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-268/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-268/file2
CoW and unmount
-fdatasync: Input/output error
Rewrite
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-268/file1
echo "CoW and unmount"
sync
_dmerror_load_error_table
-$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 \
- 2>&1 >> $seqres.full | _filter_xfs_io_error
+urk=$($XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 2>&1)
+echo $urk >> $seqres.full
+echo "$urk" | grep -q "error" || _fail "dio pwrite did not fail"
_dmerror_load_working_table
_dmerror_unmount
_dmerror_mount
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-271/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-271/file2
CoW and unmount
-pwrite: Input/output error
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-271/file1
Check for damage
echo "CoW and unmount"
sync
_dmerror_load_error_table
-$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 \
- 2>&1 >> $seqres.full | _filter_xfs_io_error
+urk=$($XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 2>&1)
+echo $urk >> $seqres.full
+echo "$urk" | grep -q "error" || _fail "dio pwrite did not fail"
echo "Clean up the mess"
_dmerror_unmount
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-272/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-272/file2
CoW and unmount
-pwrite: Input/output error
Clean up the mess
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-272/file1
sync
_dmerror_load_error_table
$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 \
- 2>&1 >> $seqres.full | _filter_xfs_io_error
+ >> $seqres.full 2>&1
_dmerror_load_working_table
rm -rf $testdir/file2 >> $seqres.full 2>&1
_dmerror_unmount
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-276/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-276/file2
CoW and unmount
-pwrite: Input/output error
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-276/file1
Check for damage
echo "CoW and unmount"
sync
_dmerror_load_error_table
-$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 \
- 2>&1 >> $seqres.full | _filter_xfs_io_error
+urk=$($XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 2>&1)
+echo $urk >> $seqres.full
+echo "$urk" | grep -q "error" || _fail "dio pwrite did not fail"
_dmerror_load_working_table
echo "Rewrite"
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-278/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-278/file2
CoW and unmount
-pwrite: Input/output error
Rewrite
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-278/file1
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" -c "msync -s 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" \
+ -c "msync -s 0 $filesize" $testdir/file2 >> $seqres.full 2>&1
_dmerror_load_working_table
_dmerror_unmount
_dmerror_mount
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-279/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-279/file2
CoW and unmount
-msync: Input/output error
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-279/file1
Check for damage
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" -c "msync -s 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" \
+ -c "msync -s 0 $filesize" $testdir/file2 >> $seqres.full 2>&1
echo "Clean up the mess"
_dmerror_unmount
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-281/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-281/file2
CoW and unmount
-msync: Input/output error
Clean up the mess
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-281/file1
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
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" -c "msync -s 0 $filesize" $testdir/file2 > $TEST_DIR/mwrite.out 2>&1)
-cat $TEST_DIR/mwrite.out | tee -a $seqres.full
+urk=$($XFS_IO_PROG -f -c "mmap -rw 0 $filesize" -c "mwrite -S 0x63 0 $filesize" \
+ -c "msync -s 0 $filesize" $testdir/file2 2>&1)
+echo $urk >> $seqres.full
+echo "$urk" | grep -q "error" || _fail "mwrite did not fail"
_dmerror_load_working_table
echo "Rewrite"
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-283/file1
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-283/file2
CoW and unmount
-msync: Input/output error
Rewrite
Compare files
1886e67cf8783e89ce6ddc5bb09a3944 SCRATCH_MNT/test-283/file1