Regression test portability: quota.t

- Use du -k to have size reported in kB, as NetBSD defaults to blocks
- on overquota, Linux says 'No space left' and NetBSD 'Disc quota exceeded'

BUG: 1129939
Change-Id: I6a2baef94cb60e9fabf06a6f8d01f2acb6ee0a30
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8930
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
Emmanuel Dreyfus 2014-10-14 18:23:44 +02:00 committed by Vijay Bellur
parent eea8066462
commit 49d6a7b17f

View File

@ -162,13 +162,13 @@ done
## --------------------------------
for i in `seq 1 200`; do
dd if=/dev/urandom of="$M0/$TESTDIR/dir1/1MBfile$i" bs=1024k count=1 \
2>&1 | grep -v "No space left"
2>&1 | egrep -v '(No space left|Disc quota exceeded)'
done
# 65
## <Test whether quota limit crossed more than 10% of limit>
## ---------------------------------------------------------
USED_KB=`du -s $M0/$TESTDIR/dir1 | cut -f1`;
USED_KB=`du -ks $M0/$TESTDIR/dir1 | cut -f1`;
USED_MB=$(($USED_KB/1024));
TEST [ $USED_MB -le $((($QUOTALIMIT * 110) / 100)) ]