summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-06-18 22:10:12 +0530
committerVijay Bellur <vbellur@redhat.com>2014-06-18 23:45:38 -0700
commit616b0aa44fe78a362f2dca3d066be47555ceb09f (patch)
tree9284ee8800cad92db27335a499f01ed7d145fea0 /tests
parentf844e5019de872e0c138daa6257d1f6cac5a4aff (diff)
tests: Provide force_umount with 5 retries
Change-Id: I2b5784c48eedcccb17690de438addd29075926bd BUG: 1092850 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8104 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bugs/bug-859581.t4
-rw-r--r--tests/include.rc1
-rw-r--r--tests/volume.rc5
3 files changed, 8 insertions, 2 deletions
diff --git a/tests/bugs/bug-859581.t b/tests/bugs/bug-859581.t
index 4253ab5d88b..c90221291ac 100755
--- a/tests/bugs/bug-859581.t
+++ b/tests/bugs/bug-859581.t
@@ -31,7 +31,7 @@ TEST [ -d $B0/${V0}1/dir1/dir2 ]
TEST [ ! -d $(gf_get_gfid_backend_file_path $B0/${V0}1 "dir1") ]
# Stop the volume to flush caches and force symlink recreation
-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 start $V0
@@ -50,7 +50,7 @@ ls -l $M0/dir1;
TEST [ -h $(gf_get_gfid_backend_file_path $B0/${V0}1 "dir1") ]
-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/include.rc b/tests/include.rc
index 5cdc503e29d..7e552fc0716 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -18,6 +18,7 @@ REOPEN_TIMEOUT=20
HEAL_TIMEOUT=60
MARKER_UPDATE_TIMEOUT=20
JANITOR_TIMEOUT=60
+UMOUNT_TIMEOUT=5
statedumpdir=`gluster --print-statedumpdir`; # Default directory for statedump
diff --git a/tests/volume.rc b/tests/volume.rc
index 5b5c2147392..19be7ee4c92 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -382,3 +382,8 @@ function path_exists {
stat $1
if [ $? -eq 0 ]; then echo "Y"; else echo "N"; fi
}
+
+function force_umount {
+ umount -f $1
+ if [ $? -eq 0 ]; then echo "Y"; else echo "N"; fi
+}