summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorSheetal Pamecha <spamecha@redhat.com>2019-06-19 15:08:58 +0530
committerAmar Tumballi <amarts@redhat.com>2019-06-26 14:07:48 +0000
commit5cbc87d8b8f1287e81c38b793b8d13b057208c62 (patch)
treeae6599a14a1ae78367bfcbc89faec695b5442a97 /tests/bugs
parent1716a907da1a835b658740f1325033d7ddd44952 (diff)
posix: modify storage.reserve option to take size and percent
* reverting changes made in https://review.gluster.org/#/c/glusterfs/+/21686/ * Now storage.reserve can take value in percent or bytes fixes: bz#1651445 Change-Id: Id4826210ec27991c55b17d1fecd90356bff3e036 Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/posix/bug-1651445.t29
1 files changed, 12 insertions, 17 deletions
diff --git a/tests/bugs/posix/bug-1651445.t b/tests/bugs/posix/bug-1651445.t
index f6f1833..5248d47 100644
--- a/tests/bugs/posix/bug-1651445.t
+++ b/tests/bugs/posix/bug-1651445.t
@@ -17,39 +17,34 @@ TEST $CLI volume start $V0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0
-TEST $CLI volume set $V0 storage.reserve-size 10MB
+#Setting the size in bytes
+TEST $CLI volume set $V0 storage.reserve 40MB
-#No effect as priority to reserve-size
-TEST $CLI volume set $V0 storage.reserve 20
+#wait 5s to reset disk_space_full flag
+sleep 5
TEST dd if=/dev/zero of=$M0/a bs=100M count=1
-sleep 5
+TEST dd if=/dev/zero of=$M0/b bs=10M count=1
-#Below dd confirms posix is giving priority to reserve-size
-TEST dd if=/dev/zero of=$M0/b bs=40M count=1
+# Wait 5s to update disk_space_full flag because thread check disk space
+# after every 5s
sleep 5
+# setup_lvm create lvm partition of 150M and 40M are reserve so after
+# consuming more than 110M next dd should fail
TEST ! dd if=/dev/zero of=$M0/c bs=5M count=1
rm -rf $M0/*
-#Size will reserve from the previously set reserve option = 20%
-TEST $CLI volume set $V0 storage.reserve-size 0
-#Overwrite reserve option
-TEST $CLI volume set $V0 storage.reserve-size 40MB
+#Setting the size in percent and repeating the above steps
+TEST $CLI volume set $V0 storage.reserve 40
-#wait 5s to reset disk_space_full flag
sleep 5
-TEST dd if=/dev/zero of=$M0/a bs=100M count=1
+TEST dd if=/dev/zero of=$M0/a bs=80M count=1
TEST dd if=/dev/zero of=$M0/b bs=10M count=1
-# Wait 5s to update disk_space_full flag because thread check disk space
-# after every 5s
-
sleep 5
-# setup_lvm create lvm partition of 150M and 40M are reserve so after
-# consuming more than 110M next dd should fail
TEST ! dd if=/dev/zero of=$M0/c bs=5M count=1
TEST $CLI volume stop $V0