summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
+}