From: Darrick J. Wong Date: Tue, 15 Sep 2020 01:44:18 +0000 (-0700) Subject: generic/204: don't flood stdout with ENOSPC messages on an ENOSPC test X-Git-Tag: v2022.05.01~682 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=a8f5f152e4da616c5e3c58da6498bc931c8632fc generic/204: don't flood stdout with ENOSPC messages on an ENOSPC test This test has been on and off my bad list for many years due to the fact that it will spew potentially millions of "No space left on device" errors if the file count calculations are wrong. The calculations should be correct for the XFS data device, but they don't apply to other filesystems. Therefore, filter out the ENOSPC messages when the files are not going to be created on the xfs data device (e.g. ext4, xfs realtime, etc.) Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Signed-off-by: Eryu Guan --- diff --git a/tests/generic/204 b/tests/generic/204 index 349f5eff..7250c00a 100755 --- a/tests/generic/204 +++ b/tests/generic/204 @@ -76,9 +76,13 @@ files=$((space / (direntlen + isize + dbsize))) echo files $files, resvblks $resv_blks >> $seqres.full _scratch_resvblks $resv_blks >> $seqres.full 2>&1 +filter() { + test $FSTYP != xfs && sed -e '/No space left on device/d' +} + for i in `seq -w 1 $files`; do - echo -n > $SCRATCH_MNT/$i - echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i + (echo -n > $SCRATCH_MNT/$i; + echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i) 2>&1 | filter done # success, all done