summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-06-19 13:51:41 +0530
committerVijay Bellur <vbellur@redhat.com>2014-06-23 03:13:28 -0700
commit8d92734f289ab55910045ba7b92bbef1d0dd123c (patch)
tree3db8b723f2068006a17d33676b230a65944a5a6e
parent1e4a046828ea11cb4c7738a2a00fb715f84dc1ff (diff)
tests: Change umount with force_umount with 5 retries
Change-Id: I0e2dbdfd34080328dfa6b4eebef0366f2b0fcb04 BUG: 1092850 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8117 Tested-by: Justin Clift <justin@gluster.org> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--tests/basic/afr/gfid-mismatch.t3
-rw-r--r--tests/basic/afr/read-subvol-data.t2
-rw-r--r--tests/basic/afr/read-subvol-entry.t2
-rwxr-xr-xtests/basic/bd.t5
-rwxr-xr-xtests/basic/cdc.t4
-rw-r--r--tests/basic/mount-options.disabled62
-rwxr-xr-xtests/basic/posixonly.t3
-rw-r--r--tests/basic/pump.t2
-rwxr-xr-xtests/basic/quota.t2
-rw-r--r--tests/basic/uss.t2
-rwxr-xr-xtests/basic/volume-snapshot.t6
-rw-r--r--tests/bugs/bug-1004744.t2
-rw-r--r--tests/bugs/bug-1030208.t2
-rw-r--r--tests/bugs/bug-1034716.t2
-rw-r--r--tests/bugs/bug-1042725.t2
-rwxr-xr-xtests/bugs/bug-1053579.t5
-rw-r--r--tests/bugs/bug-1058663.t2
-rw-r--r--tests/bugs/bug-1058797.t2
-rw-r--r--tests/bugs/bug-1087198.t3
-rwxr-xr-xtests/bugs/bug-1104692.t3
-rw-r--r--tests/bugs/bug-765564.t2
-rwxr-xr-xtests/bugs/bug-797171.t3
-rwxr-xr-xtests/bugs/bug-802417.t2
-rwxr-xr-xtests/bugs/bug-808400-dist.t5
-rwxr-xr-xtests/bugs/bug-808400-repl.t5
-rwxr-xr-xtests/bugs/bug-808400-stripe.t5
-rwxr-xr-xtests/bugs/bug-808400.t5
-rwxr-xr-xtests/bugs/bug-830665.t4
-rwxr-xr-xtests/bugs/bug-834465.t2
-rwxr-xr-xtests/bugs/bug-844688.t2
-rw-r--r--tests/bugs/bug-846240.t2
-rwxr-xr-xtests/bugs/bug-847622.t3
-rwxr-xr-xtests/bugs/bug-847624.t3
-rw-r--r--tests/bugs/bug-848251.t3
-rwxr-xr-xtests/bugs/bug-853680.t3
-rwxr-xr-xtests/bugs/bug-853690.t3
-rwxr-xr-xtests/bugs/bug-857330/normal.t4
-rwxr-xr-xtests/bugs/bug-857330/xml.t3
-rw-r--r--tests/bugs/bug-861015-index.t2
-rwxr-xr-xtests/bugs/bug-864222.t3
-rwxr-xr-xtests/bugs/bug-865825.t2
-rw-r--r--tests/bugs/bug-867253.t2
-rwxr-xr-xtests/bugs/bug-872923.t2
-rwxr-xr-xtests/bugs/bug-873367.t5
-rwxr-xr-xtests/bugs/bug-873962.t4
-rwxr-xr-xtests/bugs/bug-877293.t4
-rwxr-xr-xtests/bugs/bug-877885.t5
-rwxr-xr-xtests/bugs/bug-882278.t3
-rw-r--r--tests/bugs/bug-884452.t3
-rwxr-xr-xtests/bugs/bug-884597.t3
-rw-r--r--tests/bugs/bug-887098-gmount-crash.t2
-rwxr-xr-xtests/bugs/bug-892730.t3
-rwxr-xr-xtests/bugs/bug-904065.t7
-rwxr-xr-xtests/bugs/bug-904300.t9
-rwxr-xr-xtests/bugs/bug-907072.t3
-rwxr-xr-xtests/bugs/bug-915280.t2
-rwxr-xr-xtests/bugs/bug-915554.t3
-rwxr-xr-xtests/bugs/bug-921072.t19
-rwxr-xr-xtests/bugs/bug-921408.t3
-rw-r--r--tests/bugs/bug-949242.t3
-rw-r--r--tests/bugs/bug-958691.t2
-rw-r--r--tests/bugs/bug-961669.t2
-rw-r--r--tests/bugs/bug-963678.t3
-rw-r--r--tests/bugs/bug-966018.t2
-rw-r--r--tests/bugs/bug-974007.t2
-rwxr-xr-xtests/bugs/bug-974972.t2
-rwxr-xr-xtests/bugs/bug-979365.t2
-rwxr-xr-xtests/bugs/bug-983477.t8
-rw-r--r--tests/bugs/bug-985074.t4
69 files changed, 162 insertions, 132 deletions
diff --git a/tests/basic/afr/gfid-mismatch.t b/tests/basic/afr/gfid-mismatch.t
index 05f48d43a2c..29951354a04 100644
--- a/tests/basic/afr/gfid-mismatch.t
+++ b/tests/basic/afr/gfid-mismatch.t
@@ -2,6 +2,7 @@
#Test that GFID mismatches result in EIO
. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
cleanup;
#Init
@@ -20,7 +21,7 @@ TEST setfattr -n trusted.gfid -v 0sBfz5vAdHTEK1GZ99qjqTIg== $B0/brick0/file
TEST ! "find $M0/file | xargs stat"
#Cleanup
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
TEST rm -rf $B0/*
diff --git a/tests/basic/afr/read-subvol-data.t b/tests/basic/afr/read-subvol-data.t
index 25ae3e63c64..2fa20a2c181 100644
--- a/tests/basic/afr/read-subvol-data.t
+++ b/tests/basic/afr/read-subvol-data.t
@@ -27,7 +27,7 @@ TEST $CLI volume start $V0 force
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "10485760" echo `ls -l $M0/afr_success_5.txt | awk '{ print $5}'`
#Cleanup
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
TEST rm -rf $B0/*
diff --git a/tests/basic/afr/read-subvol-entry.t b/tests/basic/afr/read-subvol-entry.t
index 3e7ee3f35dd..f64276fabd4 100644
--- a/tests/basic/afr/read-subvol-entry.t
+++ b/tests/basic/afr/read-subvol-entry.t
@@ -29,7 +29,7 @@ TEST $CLI volume start $V0 force
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "ghi" echo `ls $M0/abc/def/`
#Cleanup
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
TEST rm -rf $B0/*
diff --git a/tests/basic/bd.t b/tests/basic/bd.t
index eb6305414f5..717daa5a54c 100755
--- a/tests/basic/bd.t
+++ b/tests/basic/bd.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
function execute()
{
@@ -106,7 +107,7 @@ TEST stat /dev/$V0/${gfid}
sleep 1
## Check mounting
TEST mount -o loop $M0/lv $M1
-umount $M1
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
# Snapshot
TEST touch $M0/lv_sn
@@ -123,7 +124,7 @@ TEST ! stat /dev/$V0/${gfid}
rm $M0/* -f
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop ${V0}
EXPECT 'Stopped' volinfo_field $V0 'Status';
TEST $CLI volume delete ${V0}
diff --git a/tests/basic/cdc.t b/tests/basic/cdc.t
index 70d2171a84d..f7c117063f8 100755
--- a/tests/basic/cdc.t
+++ b/tests/basic/cdc.t
@@ -89,7 +89,7 @@ TEST test ${checksum[client-file]} = ${checksum[dump-file-readv]}
## Cleanup files and unmount
TEST rm -f /tmp/cdc* $M0/cdc*
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
## Stop the volume
TEST $CLI volume stop $V0;
@@ -115,7 +115,7 @@ TEST ! test -e /tmp/cdcdump.gz
## Cleanup files and unmount
TEST rm -f /tmp/cdc* $M0/cdc*
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
## Reset the network.compression options
TEST $CLI volume reset $V0 network.compression.debug
diff --git a/tests/basic/mount-options.disabled b/tests/basic/mount-options.disabled
index 86d945ac5b3..67f893ca488 100644
--- a/tests/basic/mount-options.disabled
+++ b/tests/basic/mount-options.disabled
@@ -16,97 +16,97 @@ TEST $CLI volume start $V0
#being removed in future breaking backward-compatibility.
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --entry-timeout=0
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile=/var/lib/glusterd/vols/$V0/${V0}-fuse.vol $M0
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 --log-file=/tmp/a.txt --log-level=DEBUG $M0
EXPECT_NOT "0" wc -l /tmp/a.txt
TEST grep " D " /tmp/a.txt
TEST rm -f /tmp/a.txt
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --acl
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --aux-gfid-mount
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --enable-ino32
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --fopen-keep-cache=yes
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --fopen-keep-cache=no
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --fopen-keep-cache=fail
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --mac-compat=yes
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --mac-compat=no
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --mac-compat=fail
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --use-readdirp=yes
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --use-readdirp=no
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --use-readdirp=fail
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --direct-io-mode=yes
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --direct-io-mode=no
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --direct-io-mode=fail
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --read-only
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --selinux
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --worm
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --volfile-check
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --dump-fuse=/tmp/a.txt
EXPECT "0" stat /tmp/a.txt
TEST rm -f /tmp/a.txt
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --gid-timeout=0
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --gid-timeout=-1
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --gid-timeout=abc
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --background-qlen=16
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --background-qlen=abc
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --background-qlen=-1
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --congestion-threshold=12
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --congestion-threshold=abc
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --congestion=threshold=-1
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --negative-timeout=10
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --negative-timeout=abc
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --negative-timeout=-1
@@ -114,23 +114,23 @@ TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --negative-timeout=-
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --pid-file=/tmp/a.txt
EXPECT_NOT "0" wc -l /tmp/a.txt
TEST rm -f /tmp/a.txt
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --volfile-server-port=24007
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --volfile-server-port=2400
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --volfile-server-transport=tcp
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --volfile-server-transport=ib-verbs
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --volfile-server-port=socket
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --volume-name=$V0
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --volume-name=abcd
diff --git a/tests/basic/posixonly.t b/tests/basic/posixonly.t
index b9de317a4d0..4844818fcc3 100755
--- a/tests/basic/posixonly.t
+++ b/tests/basic/posixonly.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -25,6 +26,6 @@ TEST chown 100:100 $M0/dirname/filename;
TEST chown 100:100 $M0/dirname;
TEST rm -rf $M0/filename $M0/dirname;
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
cleanup;
diff --git a/tests/basic/pump.t b/tests/basic/pump.t
index 23bdc187d90..a2e4fad7470 100644
--- a/tests/basic/pump.t
+++ b/tests/basic/pump.t
@@ -20,7 +20,7 @@ do
mkdir dir$i && cd dir$i
done
cd
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1 start
EXPECT_WITHIN 600 "Y" gd_is_replace_brick_completed $H0 $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1
TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1 commit
diff --git a/tests/basic/quota.t b/tests/basic/quota.t
index 60dd5549627..1f6febd73a5 100755
--- a/tests/basic/quota.t
+++ b/tests/basic/quota.t
@@ -183,7 +183,7 @@ TEST getfattr -d -m "trusted.glusterfs.quota.limit-set" -e hex \
## </Test quota functionality in add-brick senarios>
## -------------------------------------------------
-umount -l $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
TEST $CLI volume quota $V0 disable
TEST $CLI volume stop $V0;
diff --git a/tests/basic/uss.t b/tests/basic/uss.t
index 23a6bf33125..004395660b5 100644
--- a/tests/basic/uss.t
+++ b/tests/basic/uss.t
@@ -44,7 +44,7 @@ TEST $CLI snapshot create snap4 $V0;
TEST $CLI volume set $V0 features.uss enable;
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0;
diff --git a/tests/basic/volume-snapshot.t b/tests/basic/volume-snapshot.t
index 21d6ea3b939..bb483850eeb 100755
--- a/tests/basic/volume-snapshot.t
+++ b/tests/basic/volume-snapshot.t
@@ -108,11 +108,9 @@ TEST $CLI_1 snapshot config $V0 snap-max-hard-limit 100
TEST $CLI_1 snapshot config $V1 snap-max-hard-limit 100
TEST glusterfs -s $H1 --volfile-id=/snaps/${V0}_snap/${V0} $M0
-sleep 2
-TEST umount -f $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs -s $H2 --volfile-id=/snaps/${V1}_snap/${V1} $M0
-sleep 2
-TEST umount -f $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
#Clean up
stop_force_volumes 2
diff --git a/tests/bugs/bug-1004744.t b/tests/bugs/bug-1004744.t
index 089cb35a184..6b1bb9d19f9 100644
--- a/tests/bugs/bug-1004744.t
+++ b/tests/bugs/bug-1004744.t
@@ -38,7 +38,7 @@ TEST $CLI volume rebalance $V0 fix-layout start
EXPECT_WITHIN $REBALANCE_TIMEOUT "fix-layout completed" rebalance_status_field $V0;
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0;
TEST ! $CLI volume info $V0;
diff --git a/tests/bugs/bug-1030208.t b/tests/bugs/bug-1030208.t
index 866999692e3..1ab41070663 100644
--- a/tests/bugs/bug-1030208.t
+++ b/tests/bugs/bug-1030208.t
@@ -27,7 +27,7 @@ TEST ls $M0/
TEST ln $M0/foo $M0/bar
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0;
TEST ! $CLI volume info $V0;
diff --git a/tests/bugs/bug-1034716.t b/tests/bugs/bug-1034716.t
index 5f98f7ae787..e6260fca8cb 100644
--- a/tests/bugs/bug-1034716.t
+++ b/tests/bugs/bug-1034716.t
@@ -52,7 +52,7 @@ EXPECT 1 remove_xattr $M0/ 'trusted.glusterfs.volume-id'
## Finish up
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0;
TEST ! $CLI volume info $V0;
diff --git a/tests/bugs/bug-1042725.t b/tests/bugs/bug-1042725.t
index f3154e06dbf..a954019d004 100644
--- a/tests/bugs/bug-1042725.t
+++ b/tests/bugs/bug-1042725.t
@@ -41,7 +41,7 @@ function verify_duplicate {
}
EXPECT 0 verify_duplicate
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0;
TEST ! $CLI volume info $V0;
diff --git a/tests/bugs/bug-1053579.t b/tests/bugs/bug-1053579.t
index 7a8ea192adc..a736e2de748 100755
--- a/tests/bugs/bug-1053579.t
+++ b/tests/bugs/bug-1053579.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
cleanup
@@ -65,8 +66,8 @@ do
done
rm -f $N0/README
-TEST umount $N0
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
diff --git a/tests/bugs/bug-1058663.t b/tests/bugs/bug-1058663.t
index 5ca348e773c..bf8dc6cabca 100644
--- a/tests/bugs/bug-1058663.t
+++ b/tests/bugs/bug-1058663.t
@@ -20,7 +20,7 @@ gcc $(dirname $0)/bug-1058663.c -o $(dirname $0)/bug-1058663;
TEST $(dirname $0)/bug-1058663 $M0/bug-1058663.bin;
rm -f $(dirname $0)/M0/bug-1058663.bin;
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0;
TEST $CLI volume delete $V0;
diff --git a/tests/bugs/bug-1058797.t b/tests/bugs/bug-1058797.t
index c48f19b9aa8..74de859441a 100644
--- a/tests/bugs/bug-1058797.t
+++ b/tests/bugs/bug-1058797.t
@@ -38,7 +38,7 @@ EXPECT "s" echo $setuid_bit2
#Also compare the entire permission string,just to be sure
EXPECT $file_permissions1 echo $file_permissions2
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0;
diff --git a/tests/bugs/bug-1087198.t b/tests/bugs/bug-1087198.t
index 6d3802ed088..e34334b61f5 100644
--- a/tests/bugs/bug-1087198.t
+++ b/tests/bugs/bug-1087198.t
@@ -14,6 +14,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../fileio.rc
+. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
cleanup;
@@ -71,6 +72,6 @@ TEST grep -e "\"Usage is above soft limit:.*used by /\"" -- $BRICK_LOG_DIR/*
#25
## Step 7
-TEST umount -f $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
cleanup;
diff --git a/tests/bugs/bug-1104692.t b/tests/bugs/bug-1104692.t
index 11dcc546410..79ed32ce803 100755
--- a/tests/bugs/bug-1104692.t
+++ b/tests/bugs/bug-1104692.t
@@ -1,5 +1,6 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -24,7 +25,7 @@ TEST $CLI volume quota $V0 limit-usage /limit_four 1GB
TEST $CLI volume quota $V0 limit-usage /limit_one/limit_five 1GB
#Cleanup
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
diff --git a/tests/bugs/bug-765564.t b/tests/bugs/bug-765564.t
index b21bade9478..5e931d2d04c 100644
--- a/tests/bugs/bug-765564.t
+++ b/tests/bugs/bug-765564.t
@@ -80,6 +80,6 @@ EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status $V0 1;
find $M0 | xargs stat 2>/dev/null 1>/dev/null;
TEST rm_mv_correctness;
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
cleanup;
diff --git a/tests/bugs/bug-797171.t b/tests/bugs/bug-797171.t
index 93809eb1f40..f160e418c2b 100755
--- a/tests/bugs/bug-797171.t
+++ b/tests/bugs/bug-797171.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -32,7 +33,7 @@ TEST $CLI volume statedump $V0 history;
file_name=$(ls $statedumpdir/statedump_tmp);
TEST grep "xlator.debug.trace.history" $statedumpdir/statedump_tmp/$file_name;
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
rm -rf $statedumpdir/statedump_tmp;
rm -f $statedumpdir/glusterdump.options;
diff --git a/tests/bugs/bug-802417.t b/tests/bugs/bug-802417.t
index 3a6db22edbf..d8f9ca26148 100755
--- a/tests/bugs/bug-802417.t
+++ b/tests/bugs/bug-802417.t
@@ -98,7 +98,7 @@ if [ "$EXIT_EARLY" = "1" ]; then
fi
## Finish up
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0;
EXPECT 'Stopped' volinfo_field $V0 'Status';
diff --git a/tests/bugs/bug-808400-dist.t b/tests/bugs/bug-808400-dist.t
index 6a29eb626ef..d201b0424f5 100755
--- a/tests/bugs/bug-808400-dist.t
+++ b/tests/bugs/bug-808400-dist.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -26,6 +27,6 @@ TEST $(dirname $0)/bug-808400-fcntl $MOUNTDIR/testfile \'gluster volume set $V0
TEST rm -rf $MOUNTDIR/*
TEST rm -rf $(dirname $0)/bug-808400-flock $(dirname $0)/bug-808400-fcntl $(dirname $0)/glusterfs.log
-TEST umount $MOUNTDIR -l
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
-cleanup; \ No newline at end of file
+cleanup;
diff --git a/tests/bugs/bug-808400-repl.t b/tests/bugs/bug-808400-repl.t
index 69cd9379be0..d1e1c4977c4 100755
--- a/tests/bugs/bug-808400-repl.t
+++ b/tests/bugs/bug-808400-repl.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -25,6 +26,6 @@ TEST $(dirname $0)/bug-808400-fcntl $MOUNTDIR/testfile \'gluster volume set $V0
TEST rm -rf $MOUNTDIR/*
TEST rm -rf $(dirname $0)/bug-808400-flock $(dirname $0)/bug-808400-fcntl $(dirname $0)/glusterfs.log
-TEST umount $MOUNTDIR -l
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
-cleanup; \ No newline at end of file
+cleanup;
diff --git a/tests/bugs/bug-808400-stripe.t b/tests/bugs/bug-808400-stripe.t
index 3ab6f738e42..fce6b8a9348 100755
--- a/tests/bugs/bug-808400-stripe.t
+++ b/tests/bugs/bug-808400-stripe.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -26,6 +27,6 @@ TEST $(dirname $0)/bug-808400-fcntl $MOUNTDIR/testfile \'gluster volume set $V0
TEST rm -rf $MOUNTDIR/*
TEST rm -rf $(dirname $0)/bug-808400-flock $(dirname $0)/bug-808400-fcntl $(dirname $0)/glusterfs.log
-TEST umount $MOUNTDIR -l
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
-cleanup; \ No newline at end of file
+cleanup;
diff --git a/tests/bugs/bug-808400.t b/tests/bugs/bug-808400.t
index 49d88afd69b..55881b92fa9 100755
--- a/tests/bugs/bug-808400.t
+++ b/tests/bugs/bug-808400.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -28,7 +29,7 @@ TEST $(dirname $0)/bug-808400-fcntl $MOUNTDIR/testfile \'gluster volume set $V0
TEST rm -rf $MOUNTDIR/*
TEST rm -rf $(dirname $0)/bug-808400-flock $(dirname $0)/bug-808400-fcntl $(dirname $0)/glusterfs.log
-TEST umount $MOUNTDIR -l
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
TEST rm -rf $MOUNTDIR
-cleanup; \ No newline at end of file
+cleanup;
diff --git a/tests/bugs/bug-830665.t b/tests/bugs/bug-830665.t
index b0ffd070a3b..2a84f9b6045 100755
--- a/tests/bugs/bug-830665.t
+++ b/tests/bugs/bug-830665.t
@@ -64,7 +64,7 @@ mkdir $N0/a_dir;
echo "more_test_data" > $N0/a_dir/another_file;
## Unmount and stop the volume.
-TEST umount $N0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
TEST $CLI volume stop $V0;
# Recreate the brick. Note that because of http://review.gluster.org/#change,4202
@@ -110,7 +110,7 @@ if [ "$EXIT_EARLY" = "1" ]; then
fi
## Finish up
-TEST umount $N0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
TEST $CLI volume stop $V0;
EXPECT 'Stopped' volinfo_field $V0 'Status';
diff --git a/tests/bugs/bug-834465.t b/tests/bugs/bug-834465.t
index 0913d9dff60..7e2cf27e44d 100755
--- a/tests/bugs/bug-834465.t
+++ b/tests/bugs/bug-834465.t
@@ -39,6 +39,6 @@ TEST rm -rf $MOUNTDIR/*
TEST rm -rf $(dirname $0)/bug-834465
cleanup_mount_statedump $V0
-TEST umount $MOUNTDIR -l
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
cleanup;
diff --git a/tests/bugs/bug-844688.t b/tests/bugs/bug-844688.t
index 49494ea7f41..ea9efe91d8e 100755
--- a/tests/bugs/bug-844688.t
+++ b/tests/bugs/bug-844688.t
@@ -28,7 +28,7 @@ kill -SIGTERM $back_pid;
wait >/dev/null 2>&1;
TEST rm -f $M0/touchfile $M0/file;
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
rm -f $statedumpdir/glusterdump.$mount_pid.*;
cleanup
diff --git a/tests/bugs/bug-846240.t b/tests/bugs/bug-846240.t
index 12e4949ef36..14ed52c9897 100644
--- a/tests/bugs/bug-846240.t
+++ b/tests/bugs/bug-846240.t
@@ -53,6 +53,6 @@ TEST fd_close $fd;
TEST rm -rf $MOUNTDIR/*
-TEST umount $MOUNTDIR -l
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
cleanup;
diff --git a/tests/bugs/bug-847622.t b/tests/bugs/bug-847622.t
index a3e04ca2047..8412796591f 100755
--- a/tests/bugs/bug-847622.t
+++ b/tests/bugs/bug-847622.t
@@ -2,6 +2,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../nfs.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -20,6 +21,6 @@ TEST setfacl -m u:14:r testfile
TEST getfacl testfile
cd
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
cleanup
diff --git a/tests/bugs/bug-847624.t b/tests/bugs/bug-847624.t
index fcd203c7422..6b35c99b0cd 100755
--- a/tests/bugs/bug-847624.t
+++ b/tests/bugs/bug-847624.t
@@ -2,6 +2,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../nfs.rc
+. $(dirname $0)/../volume.rc
cleanup
#1
@@ -18,7 +19,7 @@ cd $N0
TEST dbench -t 10 10
TEST rm -rf $N0/*
cd
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
#10
TEST $CLI volume set $V0 nfs.drc-size 10000
cleanup
diff --git a/tests/bugs/bug-848251.t b/tests/bugs/bug-848251.t
index a5c80b1b473..3de41727e76 100644
--- a/tests/bugs/bug-848251.t
+++ b/tests/bugs/bug-848251.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -44,7 +45,7 @@ TEST name=":d1/d:1/d1:"
TEST set_quota
EXPECT "80%" quota_list
-TEST umount $MOUNTDIR
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
TEST rm -rf $MOUNTDIR
cleanup;
diff --git a/tests/bugs/bug-853680.t b/tests/bugs/bug-853680.t
index 72d53ae6c8f..bd9ee8d134f 100755
--- a/tests/bugs/bug-853680.t
+++ b/tests/bugs/bug-853680.t
@@ -7,6 +7,7 @@
# said operations take a minimum amount of time according to the limit.
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -44,7 +45,7 @@ date2=`date +%s`
optime=$(($date2 - $date1))
TEST [ $optime -ge 3 ]
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
diff --git a/tests/bugs/bug-853690.t b/tests/bugs/bug-853690.t
index c2f82d1030a..0f09eea9e40 100755
--- a/tests/bugs/bug-853690.t
+++ b/tests/bugs/bug-853690.t
@@ -13,6 +13,7 @@
########
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -81,7 +82,7 @@ xa=`getfattr -n trusted.afr.test-locks-0 -e hex $B0/test2/file 2>&1 | grep = | c
EXPECT_NOT 0x000000000000000000000000 echo $xa
TEST rm -f $M0/file
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
rm -f $B0/test.vol
rm -rf $B0/test1 $B0/test2
diff --git a/tests/bugs/bug-857330/normal.t b/tests/bugs/bug-857330/normal.t
index 24dfe52c490..44635a19e42 100755
--- a/tests/bugs/bug-857330/normal.t
+++ b/tests/bugs/bug-857330/normal.t
@@ -1,7 +1,7 @@
#!/bin/bash
. $(dirname $0)/common.rc
-
+. $(dirname $0)/../../volume.rc
cleanup;
TEST glusterd
@@ -16,7 +16,7 @@ TEST glusterfs -s $H0 --volfile-id=$V0 $M0;
TEST python2 $(dirname $0)/../../utils/create-files.py --multi -b 10 -d 10 -n 10 $M0;
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
###############
## Rebalance ##
diff --git a/tests/bugs/bug-857330/xml.t b/tests/bugs/bug-857330/xml.t
index 688f4661941..2029c343093 100755
--- a/tests/bugs/bug-857330/xml.t
+++ b/tests/bugs/bug-857330/xml.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/common.rc
+. $(dirname $0)/../../volume.rc
cleanup;
@@ -16,7 +17,7 @@ TEST glusterfs -s $H0 --volfile-id=$V0 $M0;
TEST python2 $(dirname $0)/../../utils/create-files.py --multi -b 10 -d 10 -n 10 $M0;
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
###############
diff --git a/tests/bugs/bug-861015-index.t b/tests/bugs/bug-861015-index.t
index 4ca115f8263..614d4df2fac 100644
--- a/tests/bugs/bug-861015-index.t
+++ b/tests/bugs/bug-861015-index.t
@@ -27,7 +27,7 @@ HEAL_FILES=$(($HEAL_FILES+3)) #count brick root distribute-subvol num of times
cd ~
EXPECT "$HEAL_FILES" afr_get_pending_heal_count $V0
TEST rm -f $M0/*
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume heal $V0 info
#Only root dir should be present now in the indices
EXPECT "1" afr_get_num_indices_in_brick $B0/${V0}1
diff --git a/tests/bugs/bug-864222.t b/tests/bugs/bug-864222.t
index 4fd2f9235b1..35d90abac3f 100755
--- a/tests/bugs/bug-864222.t
+++ b/tests/bugs/bug-864222.t
@@ -2,6 +2,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../nfs.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -21,6 +22,6 @@ TEST $CLI volume set $V0 nfs.enable-ino32 on
TEST ls
cd
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
cleanup
diff --git a/tests/bugs/bug-865825.t b/tests/bugs/bug-865825.t
index 9c642161988..a66ede677fb 100755
--- a/tests/bugs/bug-865825.t
+++ b/tests/bugs/bug-865825.t
@@ -49,7 +49,7 @@ TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0
echo "test_data" > $M0/a_file;
## Unmount.
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
## Mess with the flags as though brick-0 accuses brick-2 while brick-1 is
## missing its brick-2 changelog altogether.
diff --git a/tests/bugs/bug-867253.t b/tests/bugs/bug-867253.t
index ed27565ebd1..560ff11a28e 100644
--- a/tests/bugs/bug-867253.t
+++ b/tests/bugs/bug-867253.t
@@ -56,6 +56,6 @@ NEW_FILE_COUNT1=`echo $?`;
EXPECT "0" file_count $NEW_FILE_COUNT $NEW_FILE_COUNT1
-TEST umount -l $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
cleanup
diff --git a/tests/bugs/bug-872923.t b/tests/bugs/bug-872923.t
index be7babc0bc8..afbf6aca222 100755
--- a/tests/bugs/bug-872923.t
+++ b/tests/bugs/bug-872923.t
@@ -49,7 +49,7 @@ do
done;
cd
-umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
EXPECT "0" echo $RET;
diff --git a/tests/bugs/bug-873367.t b/tests/bugs/bug-873367.t
index cfbbc98d0b2..56c2d30542f 100755
--- a/tests/bugs/bug-873367.t
+++ b/tests/bugs/bug-873367.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
SSL_BASE=/etc/ssl
SSL_KEY=$SSL_BASE/glusterfs.key
@@ -27,14 +28,14 @@ TEST $CLI volume start $V0
TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0
echo some_data > $M0/data_file
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
# If the bug is not fixed, the next mount will fail.
TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0
EXPECT some_data cat $M0/data_file
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
diff --git a/tests/bugs/bug-873962.t b/tests/bugs/bug-873962.t
index 47b39984cd5..80652f38abe 100755
--- a/tests/bugs/bug-873962.t
+++ b/tests/bugs/bug-873962.t
@@ -80,8 +80,8 @@ TEST dd if=$M0/b of=/dev/null bs=1M
EXPECT "def" getfattr -n trusted.mdata --only-values $M0/b 2>/dev/null
EXPECT "def" getfattr -n trusted.mdata --only-values $M1/b 2>/dev/null
-TEST umount $M0
-TEST umount $M1
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
TEST $CLI volume set $V0 cluster.data-self-heal off
TEST $CLI volume set $V0 cluster.metadata-self-heal off
diff --git a/tests/bugs/bug-877293.t b/tests/bugs/bug-877293.t
index 774c2a0cc64..d9bd8a33b12 100755
--- a/tests/bugs/bug-877293.t
+++ b/tests/bugs/bug-877293.t
@@ -32,8 +32,8 @@ TEST kill_brick $V0 $H0 $B0/${V0}-0
TEST "getfattr -n $xtime $M1 | grep -q ${xtime}="
-TEST umount $M0
-TEST umount $M1
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
TEST $CLI volume stop $V0;
TEST $CLI volume delete $V0;
diff --git a/tests/bugs/bug-877885.t b/tests/bugs/bug-877885.t
index 955d517876a..01b645e7d4c 100755
--- a/tests/bugs/bug-877885.t
+++ b/tests/bugs/bug-877885.t
@@ -2,6 +2,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../nfs.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -29,7 +30,7 @@ cd;
kill %1;
-TEST umount $N0
-TEST umount $N1;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N1
cleanup
diff --git a/tests/bugs/bug-882278.t b/tests/bugs/bug-882278.t
index 7933e1863d1..1a31cd9fa20 100755
--- a/tests/bugs/bug-882278.t
+++ b/tests/bugs/bug-882278.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup
# Is there a good reason to require --fqdn elsewhere? It's worse than useless
@@ -62,7 +63,7 @@ if [ "$EXIT_EARLY" = "1" ]; then
fi
## Finish up
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0;
EXPECT 'Stopped' volinfo_field $V0 'Status';
diff --git a/tests/bugs/bug-884452.t b/tests/bugs/bug-884452.t
index d07651e46f6..aa2921289c2 100644
--- a/tests/bugs/bug-884452.t
+++ b/tests/bugs/bug-884452.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -41,6 +42,6 @@ TEST vol-status-loop
rm -f $RUN_LS_LOOP_FILE
wait
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
cleanup;
diff --git a/tests/bugs/bug-884597.t b/tests/bugs/bug-884597.t
index 8eb1f330bfa..db8d0c33fd3 100755
--- a/tests/bugs/bug-884597.t
+++ b/tests/bugs/bug-884597.t
@@ -1,6 +1,7 @@
#!/bin/bash
. $(dirname $0)/../include.rc
. $(dirname $0)/../dht.rc
+. $(dirname $0)/../volume.rc
cleanup;
BRICK_COUNT=3
@@ -63,7 +64,7 @@ rm -rf $B0/${V0}$cached/$i
# without a unmount, we are not able to trigger a lookup based heal
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
## Mount FUSE
TEST glusterfs --attribute-timeout=0 --entry-timeout=0 -s $H0 --volfile-id $V0 $M0;
diff --git a/tests/bugs/bug-887098-gmount-crash.t b/tests/bugs/bug-887098-gmount-crash.t
index 1998b40623f..cfe1c97fb0f 100644
--- a/tests/bugs/bug-887098-gmount-crash.t
+++ b/tests/bugs/bug-887098-gmount-crash.t
@@ -37,7 +37,7 @@ done
EXPECT "$MOUNT_PID" pidgrep $MOUNT_PID
TEST rm -rf $M0/*
-umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
## Finish up
TEST $CLI volume stop $V0;
diff --git a/tests/bugs/bug-892730.t b/tests/bugs/bug-892730.t
index 0a677069eb3..2a497d0095e 100755
--- a/tests/bugs/bug-892730.t
+++ b/tests/bugs/bug-892730.t
@@ -10,6 +10,7 @@
########
. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -67,7 +68,7 @@ TEST glusterfs --volfile=$B0/test.vol --attribute-timeout=0 --entry-timeout=0 $M
TEST touch $M0/file
TEST rm $M0/file
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
rm -f $B0/test.vol
rm -rf $B0/test1 $B0/test2
diff --git a/tests/bugs/bug-904065.t b/tests/bugs/bug-904065.t
index ff677453015..01880246ef2 100755
--- a/tests/bugs/bug-904065.t
+++ b/tests/bugs/bug-904065.t
@@ -21,6 +21,7 @@ function count_lines()
. $(dirname $0)/../include.rc
. $(dirname $0)/../nfs.rc
+. $(dirname $0)/../volume.rc
cleanup
@@ -52,11 +53,11 @@ TEST mount_nfs $H0:/$V0 $N1 nolock
EXPECT '2' count_lines /var/lib/glusterd/nfs/rmtab
# removing a mount should (even if there are two) should remove the entry
-TEST umount $N1
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N1
EXPECT '0' count_lines /var/lib/glusterd/nfs/rmtab
# unmounting the other mount should work flawlessly
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
EXPECT '0' count_lines /var/lib/glusterd/nfs/rmtab
TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --volfile-server=$H0 --volfile-id=$V0 $M0
@@ -79,7 +80,7 @@ EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
TEST mount_nfs $H0:/$V0 $N0 nolock
EXPECT '4' count_lines $M0/rmtab
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
EXPECT '2' count_lines $M0/rmtab
# TODO: nfs/reconfigure() is never called and is therefor disabled. When the
diff --git a/tests/bugs/bug-904300.t b/tests/bugs/bug-904300.t
index 95be2724282..648838bbf7a 100755
--- a/tests/bugs/bug-904300.t
+++ b/tests/bugs/bug-904300.t
@@ -2,6 +2,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../nfs.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -15,7 +16,7 @@ EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
TEST mount_nfs $H0:/$V0 $N0 nolock
TEST mkdir $N0/dir1
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
#
# Case 1: Allow "dir1" to be mounted only from 127.0.0.1
@@ -24,7 +25,7 @@ TEST $CLI volume set $V0 export-dir \""/dir1(127.0.0.1)"\"
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 2 is_nfs_export_available
TEST mount_nfs localhost:/$V0/dir1 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
#
# Case 2: Allow "dir1" to be mounted only from 8.8.8.8. This is
@@ -44,7 +45,7 @@ TEST $CLI volume set $V0 export-dir \""/dir1($H0)"\"
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 2 is_nfs_export_available
TEST mount_nfs $H0:/$V0/dir1 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
# Case 4: Variation of test case1. Here we are checking with IP range
# 21-24
@@ -52,7 +53,7 @@ TEST $CLI volume set $V0 export-dir \""/dir1(127.0.0.0/24)"\"
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 2 is_nfs_export_available
TEST mount_nfs localhost:/$V0/dir1 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
## Finish up
TEST $CLI volume stop $V0;
diff --git a/tests/bugs/bug-907072.t b/tests/bugs/bug-907072.t
index 49b477767ac..a04f4c2498f 100755
--- a/tests/bugs/bug-907072.t
+++ b/tests/bugs/bug-907072.t
@@ -3,6 +3,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../fileio.rc
. $(dirname $0)/../dht.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -31,7 +32,7 @@ TEST setfattr -x trusted.glusterfs.dht $B0/${V0}2/test;
TEST $CLI volume start $V0 force;
-TEST umount $M0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST glusterfs -s $H0 --volfile-id $V0 $M0;
TEST stat $M0/test;
diff --git a/tests/bugs/bug-915280.t b/tests/bugs/bug-915280.t
index 9fdc48180fc..1a8b78f8cf3 100755
--- a/tests/bugs/bug-915280.t
+++ b/tests/bugs/bug-915280.t
@@ -46,6 +46,6 @@ fi
TEST [ $nfs_pid -eq $pid_file ]
-TEST umount $MOUNTDIR -l
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
cleanup;
diff --git a/tests/bugs/bug-915554.t b/tests/bugs/bug-915554.t
index 0425117a42d..7d6f1336e29 100755
--- a/tests/bugs/bug-915554.t
+++ b/tests/bugs/bug-915554.t
@@ -12,6 +12,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../dht.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -68,7 +69,7 @@ SIZE2=`stat -c %s $M0/$i`
TEST [ $SIZE1 -eq $SIZE2 ]
TEST rm -f $M0/$i
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
diff --git a/tests/bugs/bug-921072.t b/tests/bugs/bug-921072.t
index ea5a91c2c24..8f7a5d05362 100755
--- a/tests/bugs/bug-921072.t
+++ b/tests/bugs/bug-921072.t
@@ -2,6 +2,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../nfs.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -13,7 +14,7 @@ TEST $CLI volume create $V0 $H0:$B0/$V0
TEST $CLI volume start $V0
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
TEST mount_nfs $H0:/$V0 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
# based on ip addresses (1-4)
# case 1: allow only localhost ip
@@ -21,7 +22,7 @@ TEST $CLI volume set $V0 nfs.rpc-auth-allow 127.0.0.1
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
TEST mount_nfs localhost:/$V0 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
# case 2: allow only non-localhost ip
TEST $CLI volume set $V0 nfs.rpc-auth-allow 192.168.1.1
@@ -40,7 +41,7 @@ TEST $CLI volume set $V0 nfs.rpc-auth-reject 192.168.1.1
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
TEST mount_nfs localhost:/$V0 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
@@ -51,14 +52,14 @@ TEST $CLI volume set $V0 nfs.addr-namelookup on
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
#20
TEST mount_nfs localhost:/$V0 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
# case 5: allow only localhost
TEST $CLI volume set $V0 nfs.rpc-auth-allow localhost
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
TEST mount_nfs localhost:/$V0 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
# case 6: allow only somehost
TEST $CLI volume set $V0 nfs.rpc-auth-allow somehost
@@ -79,7 +80,7 @@ TEST $CLI volume set $V0 nfs.rpc-auth-reject somehost
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
TEST mount_nfs localhost:/$V0 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
# based on ip addresses: repeat of cases 1-4
# case 9: allow only localhost ip
@@ -90,7 +91,7 @@ EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
TEST mount_nfs localhost:/$V0 $N0 nolock
TEST mkdir -p $N0/subdir
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
# case 10: allow a non-localhost ip
TEST $CLI volume set $V0 nfs.rpc-auth-allow 192.168.1.1
@@ -112,10 +113,10 @@ TEST $CLI volume set $V0 nfs.rpc-auth-reject 192.168.1.1
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT 1 is_nfs_export_available
TEST mount_nfs localhost:/$V0 $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
TEST mount_nfs localhost:/$V0/subdir $N0 nolock
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
TEST $CLI volume stop --mode=script $V0
#52
diff --git a/tests/bugs/bug-921408.t b/tests/bugs/bug-921408.t
index 483bc6b3d3f..6490a93c8ef 100755
--- a/tests/bugs/bug-921408.t
+++ b/tests/bugs/bug-921408.t
@@ -3,6 +3,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../fileio.rc
. $(dirname $0)/../dht.rc
+. $(dirname $0)/../volume.rc
cleanup;
wait_check_status ()
@@ -82,7 +83,7 @@ done
TEST [ $ret == 0 ];
TEST fd_close $fd;
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
diff --git a/tests/bugs/bug-949242.t b/tests/bugs/bug-949242.t
index 71708467350..027c25afd88 100644
--- a/tests/bugs/bug-949242.t
+++ b/tests/bugs/bug-949242.t
@@ -9,6 +9,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../fallocate.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -46,7 +47,7 @@ TEST [ ! $(($blksz * $nblks)) -eq 0 ]
TEST unlink $M0/file
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
diff --git a/tests/bugs/bug-958691.t b/tests/bugs/bug-958691.t
index 60727fc4922..18a2fb5c87d 100644
--- a/tests/bugs/bug-958691.t
+++ b/tests/bugs/bug-958691.t
@@ -41,7 +41,7 @@ TEST [ $? -ne 0 ];
TEST $CLI volume set $V0 server.root-squash disable;
TEST rm -rf $N0/dir;
-TEST umount $N0;
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
TEST $CLI volume stop $V0;
TEST $CLI volume delete $V0;
diff --git a/tests/bugs/bug-961669.t b/tests/bugs/bug-961669.t
index 77896481c3f..2f7e48c6d31 100644
--- a/tests/bugs/bug-961669.t
+++ b/tests/bugs/bug-961669.t
@@ -40,7 +40,7 @@ EXPECT "failed" remove_brick_start;
#"volume remove-brick commit force: success"
EXPECT "success" remove_brick
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0;
TEST ! $CLI volume info $V0;
diff --git a/tests/bugs/bug-963678.t b/tests/bugs/bug-963678.t
index 14d56657940..00beccb9a39 100644
--- a/tests/bugs/bug-963678.t
+++ b/tests/bugs/bug-963678.t
@@ -14,6 +14,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../fallocate.rc
+. $(dirname $0)/../volume.rc
cleanup;
@@ -48,7 +49,7 @@ TEST cp $M0/file $M0/file.copy.post
TEST ! cmp $M0/file.copy.pre $M0/file.copy.post
TEST unlink $M0/file
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0
diff --git a/tests/bugs/bug-966018.t b/tests/bugs/bug-966018.t
index 7127189c63b..47a36c40c61 100644
--- a/tests/bugs/bug-966018.t
+++ b/tests/bugs/bug-966018.t
@@ -30,6 +30,6 @@ echo 1 > $M0/1 && chmod +x $M0/1
inodelk_max_latency=$($CLI volume profile $V0 info | grep INODELK | awk 'BEGIN {max = 0} {if ($6 > max) max=$6;} END {print max}' | cut -d. -f 1 | egrep "[0-9]{7,}")
TEST [ -z $inodelk_max_latency ]
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
cleanup;
diff --git a/tests/bugs/bug-974007.t b/tests/bugs/bug-974007.t
index 241aa6ba28e..84197ec8a0f 100644
--- a/tests/bugs/bug-974007.t
+++ b/tests/bugs/bug-974007.t
@@ -44,7 +44,7 @@ EXPECT "success" remove_brick_commit_status;
# Check the volume type
EXPECT "Replicate" echo `$CLI volume info |grep Type |awk '{print $2}'`
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0;
TEST ! $CLI volume info $V0;
diff --git a/tests/bugs/bug-974972.t b/tests/bugs/bug-974972.t
index 4d367a52cdf..28b7539a981 100755
--- a/tests/bugs/bug-974972.t
+++ b/tests/bugs/bug-974972.t
@@ -33,5 +33,5 @@ EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_nfs $V0 1
TEST ls $N0/1
TEST ! cat $N0/1
-TEST umount $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
cleanup
diff --git a/tests/bugs/bug-979365.t b/tests/bugs/bug-979365.t
index e94dc9aa8a2..7f92ea8d827 100755
--- a/tests/bugs/bug-979365.t
+++ b/tests/bugs/bug-979365.t
@@ -32,7 +32,7 @@ TEST [[ $(num_fsyncs) -ge 0 ]]
#Stop the volume to erase the profile info of old operations
TEST $CLI volume profile $V0 stop
TEST $CLI volume stop $V0
-umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
#Disable ensure-durability now to disable fsyncs in afr.
TEST $CLI volume set $V0 ensure-durability off
TEST $CLI volume start $V0
diff --git a/tests/bugs/bug-983477.t b/tests/bugs/bug-983477.t
index b9d3002be30..47d2f30833a 100755
--- a/tests/bugs/bug-983477.t
+++ b/tests/bugs/bug-983477.t
@@ -24,28 +24,28 @@ TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0
TEST cd $M0
EXPECT "1" get_use_readdirp_value $V0
TEST cd -
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
#If readdirp is enabled statedump should reflect it
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 --use-readdirp=no
TEST cd $M0
EXPECT "0" get_use_readdirp_value $V0
TEST cd -
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
#Since args are optional on this argument just specifying "--use-readdirp" should also turn it `on` not `off`
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 --use-readdirp
TEST cd $M0
EXPECT "1" get_use_readdirp_value $V0
TEST cd -
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
#By default it is enabled.
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
TEST cd $M0
EXPECT "1" get_use_readdirp_value $V0
TEST cd -
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
#Invalid values for use-readdirp should not be accepted
TEST ! glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 --use-readdirp=please-fail
diff --git a/tests/bugs/bug-985074.t b/tests/bugs/bug-985074.t
index 80052129e3c..d8f852a7587 100644
--- a/tests/bugs/bug-985074.t
+++ b/tests/bugs/bug-985074.t
@@ -46,8 +46,8 @@ TEST mv $M0/file $M0/file.link
TEST stat $M0/file.link
TEST ! stat $M0/file
-TEST umount $M1
-TEST umount $M0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
TEST $CLI volume stop $V0
TEST $CLI volume delete $V0