summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-03-20 08:36:14 +0530
committerAnand Avati <avati@redhat.com>2013-03-21 00:05:19 -0700
commit66d5d91465deba55afa9e1ab3a2160fc9d1b9275 (patch)
tree865e380dc9a47ea68b5cfabcadcbaee6e017f33c /tests
parent1d575d1706bf9968b84d10031bf4b2cfc571db91 (diff)
performance/io-threads: Fix range-check for least-rate-limit
The issue could be fixed with .validate=GF_OPT_VALIDATE_MIN. But adding max value is more robust. Change-Id: Ia69c6f86855dbd34a26e20391e77bfa0f796a200 BUG: 923573 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4698 Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bugs/bug-853680.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/bugs/bug-853680.t b/tests/bugs/bug-853680.t
index a4853c07f8b..72d53ae6c8f 100755
--- a/tests/bugs/bug-853680.t
+++ b/tests/bugs/bug-853680.t
@@ -15,6 +15,21 @@ TEST glusterd
TEST $CLI volume create $V0 $H0:$B0/${V0}1
TEST $CLI volume start $V0
+#Accept min val
+TEST $CLI volume set $V0 performance.least-rate-limit 0
+#Accept some value in between
+TEST $CLI volume set $V0 performance.least-rate-limit 1035
+#Accept max val INT_MAX
+TEST $CLI volume set $V0 performance.least-rate-limit 2147483647
+
+#Reject other values
+TEST ! $CLI volume set $V0 performance.least-rate-limit 2147483648
+TEST ! $CLI volume set $V0 performace.least-rate-limit -8
+TEST ! $CLI volume set $V0 performance.least-rate-limit abc
+TEST ! $CLI volume set $V0 performance.least-rate-limit 0.0
+TEST ! $CLI volume set $V0 performance.least-rate-limit -10.0
+TEST ! $CLI volume set $V0 performance.least-rate-limit 1%
+
# set rate limit to 1 operation/sec
TEST $CLI volume set $V0 performance.least-rate-limit 1