summaryrefslogtreecommitdiffstats
path: root/tests/basic/quota-nfs.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic/quota-nfs.t')
-rwxr-xr-xtests/basic/quota-nfs.t13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/basic/quota-nfs.t b/tests/basic/quota-nfs.t
index db73debef58..ef337a7b3ae 100755
--- a/tests/basic/quota-nfs.t
+++ b/tests/basic/quota-nfs.t
@@ -12,6 +12,9 @@ function usage()
}
cleanup;
+QDD=$(dirname $0)/quota
+# compile the test write program and run it
+build_tester $(dirname $0)/quota.c -o $QDD
TEST glusterd
TEST pidof glusterd
@@ -30,21 +33,19 @@ TEST mount_nfs $H0:/$V0 $N0
deep=/0/1/2/3/4/5/6/7/8/9
TEST mkdir -p $N0/$deep
-TEST dd if=/dev/zero of=$N0/$deep/file bs=1k count=10240
+TEST $QDD $N0/$deep/file 256 40
TEST $CLI volume quota $V0 enable
TEST $CLI volume quota $V0 limit-usage / 20MB
TEST $CLI volume quota $V0 soft-timeout 0
TEST $CLI volume quota $V0 hard-timeout 0
-TEST dd if=/dev/zero of=$N0/$deep/newfile_1 bs=512 count=10240
+TEST $QDD $N0/$deep/newfile_1 256 20
# wait for write behind to complete.
EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "15.0MB" usage "/"
-# compile the test write program and run it
-TEST $CC $(dirname $0)/quota.c -o $(dirname $0)/quota;
# Try to create a 100Mb file which should fail
-TEST ! $(dirname $0)/quota $N0/$deep/newfile_2 "104857600"
+TEST ! $QDD $N0/$deep/newfile_2 256 400
TEST rm -f $N0/$deep/newfile_2
## Before killing daemon to avoid deadlocks
@@ -52,4 +53,6 @@ umount_nfs $N0
TEST $CLI volume stop $V0
EXPECT "1" get_aux
+
+rm -f $QDD
cleanup;