summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-05-01 11:01:15 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-04 01:23:28 -0700
commit7759748915485d6c740a7fed831376f298eb90bb (patch)
tree6279197354efd67013080537466fa9d586b80efc
parentc7bf5633276ee78e32ff79e5c0815b3f51e39500 (diff)
tests: Check aux umount is unmounted for quota tests
Change-Id: If57d08f3446755ea41f66ca258efcc8ea5a89063 BUG: 1217701 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/10480 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rwxr-xr-xrun-tests.sh1
-rwxr-xr-xtests/basic/ec/quota.t2
-rwxr-xr-xtests/basic/quota-ancestry-building.t2
-rwxr-xr-xtests/basic/quota-anon-fd-nfs.t2
-rwxr-xr-xtests/basic/quota-nfs.t3
-rwxr-xr-xtests/basic/quota.t1
-rw-r--r--tests/bugs/cli/bug-1022905.t2
-rw-r--r--tests/bugs/distribute/bug-1099890.t3
-rwxr-xr-xtests/bugs/distribute/bug-1161156.t4
-rwxr-xr-xtests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t3
-rw-r--r--tests/bugs/glusterfs/bug-848251.t2
-rwxr-xr-xtests/bugs/posix/bug-990028.t3
-rw-r--r--tests/bugs/quota/afr-quota-xattr-mdata-heal.t2
-rw-r--r--tests/bugs/quota/bug-1023974.t3
-rw-r--r--tests/bugs/quota/bug-1035576.t2
-rw-r--r--tests/bugs/quota/bug-1038598.t2
-rwxr-xr-xtests/bugs/quota/bug-1040423.t6
-rwxr-xr-xtests/bugs/quota/bug-1049323.t13
-rw-r--r--tests/bugs/quota/bug-1087198.t2
-rw-r--r--tests/bugs/quota/bug-1100050.t2
-rwxr-xr-xtests/bugs/quota/bug-1104692.t1
-rw-r--r--tests/bugs/quota/bug-1153964.t4
-rw-r--r--tests/bugs/quota/inode-quota.t1
-rw-r--r--tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t3
-rw-r--r--tests/volume.rc13
25 files changed, 57 insertions, 25 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 3474ce956da..afb8c079b24 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -196,7 +196,6 @@ function is_bad_test ()
local name=$1
for bt in ./tests/basic/volume-snapshot-clone.t \
./tests/basic/uss.t \
- ./tests/basic/ec/ec-12-4.t \
./tests/features/glupy.t; do
[ x"$name" = x"$bt" ] && return 0 # bash: zero means true/success
done
diff --git a/tests/basic/ec/quota.t b/tests/basic/ec/quota.t
index c3686503983..0dbc07738d2 100755
--- a/tests/basic/ec/quota.t
+++ b/tests/basic/ec/quota.t
@@ -55,5 +55,7 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "8.0MB" usage "/test"
TEST rm $M0/test/file2.txt
EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0Bytes" usage "/test"
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/basic/quota-ancestry-building.t b/tests/basic/quota-ancestry-building.t
index 0cb154ff146..e86e1e250ee 100755
--- a/tests/basic/quota-ancestry-building.t
+++ b/tests/basic/quota-ancestry-building.t
@@ -60,4 +60,6 @@ exec 4>&-
exec 5>&-
exec 6>&-
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/basic/quota-anon-fd-nfs.t b/tests/basic/quota-anon-fd-nfs.t
index 93a8516f534..6af8a3c7375 100755
--- a/tests/basic/quota-anon-fd-nfs.t
+++ b/tests/basic/quota-anon-fd-nfs.t
@@ -94,4 +94,6 @@ $CLI volume statedump $V0 all
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/basic/quota-nfs.t b/tests/basic/quota-nfs.t
index ea1fce93a3e..db73debef58 100755
--- a/tests/basic/quota-nfs.t
+++ b/tests/basic/quota-nfs.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
function usage()
@@ -49,4 +50,6 @@ TEST rm -f $N0/$deep/newfile_2
## Before killing daemon to avoid deadlocks
umount_nfs $N0
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/basic/quota.t b/tests/basic/quota.t
index 9fcd0a7ea10..7a3aaee2bcf 100755
--- a/tests/basic/quota.t
+++ b/tests/basic/quota.t
@@ -188,6 +188,7 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
TEST $CLI volume quota $V0 disable
TEST $CLI volume stop $V0;
+EXPECT "1" get_aux
EXPECT 'Stopped' volinfo_field $V0 'Status';
TEST $CLI volume delete $V0;
diff --git a/tests/bugs/cli/bug-1022905.t b/tests/bugs/cli/bug-1022905.t
index ce163f51943..f9f7f3c6163 100644
--- a/tests/bugs/cli/bug-1022905.t
+++ b/tests/bugs/cli/bug-1022905.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
cleanup;
@@ -34,6 +35,7 @@ TEST $CLI volume set $V0 diagnostics.client-log-level DEBUG
TEST $CLI volume reset $V0 force;
TEST $CLI volume stop $V0
+EXPECT "1" get_aux
TEST $CLI volume delete $V0
cleanup;
diff --git a/tests/bugs/distribute/bug-1099890.t b/tests/bugs/distribute/bug-1099890.t
index 4a4450166e9..f48162c972b 100644
--- a/tests/bugs/distribute/bug-1099890.t
+++ b/tests/bugs/distribute/bug-1099890.t
@@ -118,7 +118,8 @@ EXPECT "$V0-client-1" dht_get_linkto_target "$B0/${V0}1/zz"
EXPECT "1" is_dht_linkfile "$B0/${V0}1/zz"
force_umount $M0
-$CLI volume stop $V0
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
UMOUNT_LOOP ${B0}/${V0}{1,2}
rm -f ${B0}/brick{1,2}
diff --git a/tests/bugs/distribute/bug-1161156.t b/tests/bugs/distribute/bug-1161156.t
index 33d1571c59d..cc9522dc1a8 100755
--- a/tests/bugs/distribute/bug-1161156.t
+++ b/tests/bugs/distribute/bug-1161156.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
function usage()
@@ -49,6 +50,7 @@ TEST mv $N0/dir/file $N0/dir/newfile_3
# rename should fail here with disk quota exceeded
TEST ! mv $N0/dir/newfile_3 $N0/newdir/
-# cleanup
umount_nfs $N0
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t b/tests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t
index ce26c60696e..9fe55a3d9df 100755
--- a/tests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t
+++ b/tests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t
@@ -53,7 +53,8 @@ TEST ! $CLI volume set $V0 features.quota-deem-statfs off
EXPECT '' volinfo_field $V0 'features.quota-deem-statfs'
## Finish up
-TEST $CLI volume stop $V0;
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
EXPECT 'Stopped' volinfo_field $V0 'Status';
TEST $CLI volume delete $V0;
diff --git a/tests/bugs/glusterfs/bug-848251.t b/tests/bugs/glusterfs/bug-848251.t
index b44ec9d9bf2..ed3caa34b01 100644
--- a/tests/bugs/glusterfs/bug-848251.t
+++ b/tests/bugs/glusterfs/bug-848251.t
@@ -47,5 +47,7 @@ EXPECT "80%" quota_list
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
TEST rm -rf $MOUNTDIR
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/bugs/posix/bug-990028.t b/tests/bugs/posix/bug-990028.t
index a35ea2a9f6e..d04bb2b4af1 100755
--- a/tests/bugs/posix/bug-990028.t
+++ b/tests/bugs/posix/bug-990028.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../fileio.rc
cleanup;
@@ -151,5 +152,7 @@ function links_across_directories()
__init;
links_in_same_directory;
links_across_directories;
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup
diff --git a/tests/bugs/quota/afr-quota-xattr-mdata-heal.t b/tests/bugs/quota/afr-quota-xattr-mdata-heal.t
index b7a15a31f66..486b0382d5d 100644
--- a/tests/bugs/quota/afr-quota-xattr-mdata-heal.t
+++ b/tests/bugs/quota/afr-quota-xattr-mdata-heal.t
@@ -135,4 +135,6 @@ EXPECT "$acl_access_val" echo $(getfattr -d -m. -e hex $B0/${V0}0/d | grep syste
EXPECT "$acl_file_val" echo $(getfattr -d -m. -e hex $B0/${V0}0/d | grep trusted.SGI_ACL_FILE)
EXPECT "$acl_access_val" echo $(getfattr -d -m. -e hex $B0/${V0}1/d | grep system.posix_acl_access)
EXPECT "$acl_file_val" echo $(getfattr -d -m. -e hex $B0/${V0}1/d | grep trusted.SGI_ACL_FILE)
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup
diff --git a/tests/bugs/quota/bug-1023974.t b/tests/bugs/quota/bug-1023974.t
index 017a6decf88..06b66bf35a3 100644
--- a/tests/bugs/quota/bug-1023974.t
+++ b/tests/bugs/quota/bug-1023974.t
@@ -5,6 +5,7 @@
# limit set.
. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
cleanup;
@@ -32,4 +33,6 @@ TEST dd if=/dev/urandom of=$M0/1/3/file bs=1024k count=102;
#The corresponding rename(3) should fail with EDQUOT ("Disk quota exceeded")
TEST ! mv $M0/1/3/ $M0/1/2/3_mvd;
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/bugs/quota/bug-1035576.t b/tests/bugs/quota/bug-1035576.t
index dd4f499d98e..e3d32d107d0 100644
--- a/tests/bugs/quota/bug-1035576.t
+++ b/tests/bugs/quota/bug-1035576.t
@@ -49,4 +49,6 @@ TEST cat $M0/a/f
#Now that data self-heal is done quota size value should be same
quota_size_val0=$(get_hex_xattr trusted.glusterfs.quota.size $B0/${V0}0/a)
TEST [ $quota_size_val0 == $quota_size_val1 ]
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup
diff --git a/tests/bugs/quota/bug-1038598.t b/tests/bugs/quota/bug-1038598.t
index c51bc470ce1..d930a4f62e8 100644
--- a/tests/bugs/quota/bug-1038598.t
+++ b/tests/bugs/quota/bug-1038598.t
@@ -76,5 +76,7 @@ TEST $CLI volume set $V0 features.soft-timeout 0
TEST ! dd if=/dev/zero of=$M0/test_dir/file1.txt bs=1024k count=15
EXPECT 'Yes' sl_exceeded "/test_dir";
EXPECT 'Yes' hl_exceeded "/test_dir";
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/bugs/quota/bug-1040423.t b/tests/bugs/quota/bug-1040423.t
index 4e7b5642c94..c6dbdb1ff81 100755
--- a/tests/bugs/quota/bug-1040423.t
+++ b/tests/bugs/quota/bug-1040423.t
@@ -65,8 +65,6 @@ EXPECT "1.0GB" get_hardlimit $V0
_init;
check_fattrs;
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup
-
-
-
-
diff --git a/tests/bugs/quota/bug-1049323.t b/tests/bugs/quota/bug-1049323.t
index 818c5f0e65b..95ef91d4272 100755
--- a/tests/bugs/quota/bug-1049323.t
+++ b/tests/bugs/quota/bug-1049323.t
@@ -30,19 +30,6 @@ TEST $CLI volume quota $V0 enable
sleep 3;
}
-function get_aux()
-{
-##Check if a auxiliary mount is there
-df -h | grep "/var/run/gluster/$V0" -
-
-if [ $? -eq 0 ]
-then
- echo "0"
-else
- echo "1"
-fi
-}
-
function create_data()
{
#set some limit on the volume
diff --git a/tests/bugs/quota/bug-1087198.t b/tests/bugs/quota/bug-1087198.t
index 5121f1b35a2..6eaae076fcc 100644
--- a/tests/bugs/quota/bug-1087198.t
+++ b/tests/bugs/quota/bug-1087198.t
@@ -78,4 +78,6 @@ TEST grep -e "\"Usage is above soft limit:.*used by /\"" -- $BRICK_LOG_DIR/*
## Step 7
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/bugs/quota/bug-1100050.t b/tests/bugs/quota/bug-1100050.t
index e12f64f88d8..65a1250f246 100644
--- a/tests/bugs/quota/bug-1100050.t
+++ b/tests/bugs/quota/bug-1100050.t
@@ -22,4 +22,6 @@ TEST gluster volume quota $V0 limit-usage /dir 10MB;
TEST mkdir $M0/dir/subdir;
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
diff --git a/tests/bugs/quota/bug-1104692.t b/tests/bugs/quota/bug-1104692.t
index 6f6b174aa03..3acffa4720c 100755
--- a/tests/bugs/quota/bug-1104692.t
+++ b/tests/bugs/quota/bug-1104692.t
@@ -27,6 +27,7 @@ TEST $CLI volume quota $V0 limit-usage /limit_one/limit_five 1GB
#Cleanup
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
+EXPECT "1" get_aux
TEST $CLI volume delete $V0
cleanup;
diff --git a/tests/bugs/quota/bug-1153964.t b/tests/bugs/quota/bug-1153964.t
index c923b71ca73..cf5b07c1329 100644
--- a/tests/bugs/quota/bug-1153964.t
+++ b/tests/bugs/quota/bug-1153964.t
@@ -78,6 +78,6 @@ TEST rm -rf $N0/test_dir/
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
+TEST $CLI volume stop $V0
+EXPECT "1" get_aux
cleanup;
-
-
diff --git a/tests/bugs/quota/inode-quota.t b/tests/bugs/quota/inode-quota.t
index 12a18945d8b..58376d5058f 100644
--- a/tests/bugs/quota/inode-quota.t
+++ b/tests/bugs/quota/inode-quota.t
@@ -127,6 +127,7 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0" quota_object_list_field "/test_dir" 4
TEST $CLI volume quota $V0 remove-objects /test_dir
TEST $CLI volume stop $V0
+EXPECT "1" get_aux
TEST $CLI volume delete $V0
cleanup;
diff --git a/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t b/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t
index 300b300febe..366937245f2 100644
--- a/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t
+++ b/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t
@@ -27,6 +27,7 @@ EXPECT '1' get_snap_count CLI_1 $V0
TEST $CLI_1 volume stop $V0
EXPECT 'Stopped' volinfo_field $V0 'Status'
+EXPECT "1" get_aux
TEST $CLI_1 snapshot restore $($CLI_1 snapshot list)
EXPECT '0' get_snap_count CLI_1 $V0
@@ -35,5 +36,3 @@ TEST $CLI_1 peer probe $H2
EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count
cleanup;
-
-
diff --git a/tests/volume.rc b/tests/volume.rc
index b0211cbe2fc..e7d7606ac11 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -518,3 +518,16 @@ function num_graphs
local mountpoint=$1
echo `ls $mountpoint/.meta/graphs/ | grep -v active | wc -l`
}
+
+function get_aux()
+{
+##Check if a auxiliary mount is there
+df -h 2>&1 | grep "/var/run/gluster/$V0" -
+
+if [ $? -eq 0 ]
+then
+ echo "0"
+else
+ echo "1"
+fi
+}