From: Darrick J. Wong Date: Fri, 10 Nov 2017 00:44:28 +0000 (-0800) Subject: xfs/31[2-7]: hide pwrite fsync errors that are supposed to fail X-Git-Tag: v2022.05.01~1786 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ee3f35961f3c9b7d2994da4f8ed205dec2577101;p=users%2Fhch%2Fxfstests-dev.git xfs/31[2-7]: hide pwrite fsync errors that are supposed to fail xfs_io 4.14 will gain the ability to print error messages when pwrite+fsync fail. Certain tests use the error injector to cause failures, so the errors are expected. Since we test for a shut down filesystem after the error injection, we can push the error messages to the log. Signed-off-by: Darrick J. Wong Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/tests/xfs/312 b/tests/xfs/312 index 0c1044142..098752747 100755 --- a/tests/xfs/312 +++ b/tests/xfs/312 @@ -79,7 +79,7 @@ echo "Inject error" _scratch_inject_error "bmap_finish_one" echo "CoW a few blocks" -$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full +$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full 2>&1 echo "FS should be shut down, touch will fail" touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch diff --git a/tests/xfs/313 b/tests/xfs/313 index 1a2cff20d..0904b57fc 100755 --- a/tests/xfs/313 +++ b/tests/xfs/313 @@ -79,7 +79,7 @@ echo "Inject error" _scratch_inject_error "refcount_finish_one" echo "CoW a few blocks" -$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full +$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full 2>&1 echo "FS should be shut down, touch will fail" touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch diff --git a/tests/xfs/314 b/tests/xfs/314 index ec16c6f37..e2e4d7c55 100755 --- a/tests/xfs/314 +++ b/tests/xfs/314 @@ -81,7 +81,7 @@ echo "Inject error" _scratch_inject_error "rmap_finish_one" echo "CoW a few blocks" -$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full +$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full 2>&1 echo "FS should be shut down, touch will fail" touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch diff --git a/tests/xfs/315 b/tests/xfs/315 index 6170540c0..db2655517 100755 --- a/tests/xfs/315 +++ b/tests/xfs/315 @@ -77,7 +77,7 @@ echo "Inject error" _scratch_inject_error "free_extent" echo "CoW a few blocks" -$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz 0 $sz" $SCRATCH_MNT/file1 >> $seqres.full +$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz 0 $sz" $SCRATCH_MNT/file1 >> $seqres.full 2>&1 sync echo "FS should be shut down, touch will fail" diff --git a/tests/xfs/317 b/tests/xfs/317 index 507c2a9a0..651a06737 100755 --- a/tests/xfs/317 +++ b/tests/xfs/317 @@ -71,7 +71,7 @@ echo "Inject error" _scratch_inject_error "rmap_finish_one" echo "Write files" -$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz 0 $sz" $SCRATCH_MNT/file1 >> $seqres.full +$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz 0 $sz" $SCRATCH_MNT/file1 >> $seqres.full 2>&1 echo "FS should be shut down, touch will fail" touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch diff --git a/tests/xfs/326 b/tests/xfs/326 index 36bdcf486..929d3e6b7 100755 --- a/tests/xfs/326 +++ b/tests/xfs/326 @@ -87,7 +87,7 @@ echo "Inject error" _scratch_inject_error "refcount_finish_one" echo "CoW a few blocks" -$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full +$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full 2>&1 echo "FS should be shut down, touch will fail" touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch