From ee3f35961f3c9b7d2994da4f8ed205dec2577101 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 9 Nov 2017 16:44:28 -0800 Subject: [PATCH] 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 --- tests/xfs/312 | 2 +- tests/xfs/313 | 2 +- tests/xfs/314 | 2 +- tests/xfs/315 | 2 +- tests/xfs/317 | 2 +- tests/xfs/326 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/xfs/312 b/tests/xfs/312 index 0c104414..09875274 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 1a2cff20..0904b57f 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 ec16c6f3..e2e4d7c5 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 6170540c..db265551 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 507c2a9a..651a0673 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 36bdcf48..929d3e6b 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 -- 2.39.5