summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-06-18 16:31:57 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-06-27 03:09:24 -0700
commit0c919396be6284f90de53cba9dede98980fa1692 (patch)
treec7309f0db5a38b5986a9ad310c660c47f2ca1267 /tests
parente2cd9baabaf0ddd3b709e4fd2a9391a66b50422a (diff)
quota: Fix statfs values in EC when quota_deem_statfs is enabled
This is a backport of http://review.gluster.org/#/c/11315/ > When quota_deem_statfs is enabled, quota sends aggregated statfs values > In EC we should not multiply statfs values with fragment number > > Change-Id: I7ef8ea1598d84b86ba5c5941a2bbe0a6ab43c101 > BUG: 1233162 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Iacc96b1ad42babd4de630f6cdc0092e8e9ac7f3b BUG: 1236260 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11434 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/disperse/bug-1227869.t39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/bugs/disperse/bug-1227869.t b/tests/bugs/disperse/bug-1227869.t
new file mode 100644
index 00000000000..83dc7655592
--- /dev/null
+++ b/tests/bugs/disperse/bug-1227869.t
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
+cleanup
+
+QDD=$(dirname $0)/quota
+# compile the test write program and run it
+build_tester $(dirname $0)/../../basic/quota.c -o $QDD
+
+function usage()
+{
+ local QUOTA_PATH=$1;
+ $CLI volume quota $V0 list $QUOTA_PATH | grep "$QUOTA_PATH" | awk '{print $4}'
+}
+
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume create $V0 disperse 3 $H0:$B0/${V0}{1..3}
+EXPECT "Created" volinfo_field $V0 'Status'
+
+TEST $CLI volume start $V0
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Started" volinfo_field $V0 'Status'
+
+TEST $CLI volume quota $V0 enable
+TEST $CLI volume quota $V0 limit-usage / 100MB
+
+TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0
+
+TEST $QDD $M0/file 256 40
+
+EXPECT "10.0MB" usage "/"
+
+EXPECT "0" echo $(df -k $M0 | grep -q '10240 '; echo $?)
+EXPECT "0" echo $(df -k $M0 | grep -q '92160 '; echo $?)
+
+rm -f $QDD
+cleanup