summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2014-07-14 10:48:01 -0400
committerVijay Bellur <vbellur@redhat.com>2014-07-15 23:00:48 -0700
commit52ca745fb79d36d7587a7913639520c90a121168 (patch)
tree7af836bb4e8ea59e772a9406ac642ac7ba4c623b /tests
parentde359f8b2aa1be9127b6d27a6283c202d089cd81 (diff)
tests: make dd less noisy
Also fixed one case in quota.t where error output is expected. There are probably other similar cases which can be fixed separately. Change-Id: If80fad0d9fcff6f8ca91d00f4f7b2d5f3fef4256 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/8298 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic/quota.t2
-rw-r--r--tests/include.rc11
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/basic/quota.t b/tests/basic/quota.t
index ae45a6357cd..2fef251e485 100755
--- a/tests/basic/quota.t
+++ b/tests/basic/quota.t
@@ -160,7 +160,7 @@ done
## --------------------------------
for i in `seq 1 200`; do
dd if=/dev/urandom of="$M0/$TESTDIR/dir1/1MBfile$i" bs=1024k count=1 \
- &>/dev/null
+ 2>&1 | grep -v "No space left"
done
# 65
diff --git a/tests/include.rc b/tests/include.rc
index c3c30b16af6..30dea01d2a7 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -299,3 +299,14 @@ alias EXPECT_WITHIN='_EXPECT_WITHIN $LINENO'
alias EXPECT_KEYWORD='_EXPECT_KEYWORD $LINENO'
alias TEST_IN_LOOP='_TEST_IN_LOOP $LINENO'
shopt -s expand_aliases
+
+ostype=$(uname -s)
+if [ x"$ostype" = x"Linux" ]; then
+ alias dd="dd status=none"
+elif [ x"$ostype" = x"NetBSD" ]; then
+ alias dd="dd msgfmt=quiet"
+fi
+# MacOS doesn't seem to support either option. Doing nothing at all is
+# probably the safest option there and on anything we don't recognize, but
+# if you want to reduce the noise level and know the correct option for
+# your favorite platform please feel free to add it here.