summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawal@redhat.com>2019-06-17 11:10:42 +0530
committerhari gowtham <hari.gowtham005@gmail.com>2019-07-03 06:40:51 +0000
commitb6abdb8f936f92345cc44dfdcb282691cfbd3db8 (patch)
tree784eb23b13ed1910cbc12b5b6660b99fc9c0517c /tests
parent1c32880f7af41dcd7dc4fcc38f5e8f1619de6ce1 (diff)
tests: subdir-mount.t is failing for brick_mux regrssion
To avoid the failure wait to run hook script S13create-subdir-mounts.sh after executed add-brick command by test case. Change-Id: I063b6d0f86a550ed0a0527255e4dfbe8f0a8c02e fixes: bz#1726327 > fixes: bz#1720993 > Signed-off-by: Mohit Agrawal <moagrawal@redhat.com> > (Cherry pick from commit 25ad5aca23b257cdd129cd1d4518b048fbba87bb) > (Reviewed on upstream link https://review.gluster.org/#/c/glusterfs/+/22877/)
Diffstat (limited to 'tests')
-rw-r--r--tests/features/subdir-mount.t11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/features/subdir-mount.t b/tests/features/subdir-mount.t
index 8401946fb0f..a02bd6befc4 100644
--- a/tests/features/subdir-mount.t
+++ b/tests/features/subdir-mount.t
@@ -85,12 +85,17 @@ TEST $CLI volume start $V0
TEST $GFS --subdir-mount /subdir1/subdir1.1/subdir1.2 -s $H0 --volfile-id $V0 $M2
TEST stat $M2
+initcnt=`grep -i create-subdir-mounts /var/log/glusterfs/glusterd.log | wc -l`
# mount shouldn't fail even after add-brick
TEST $CLI volume add-brick $V0 replica 2 $H0:$B0/${V0}{5,6};
-# Give time for client process to get notified and use the new
-# volfile after add-brick
-sleep 1
+# Wait to execute create-subdir-mounts.sh script by glusterd
+newcnt=`grep -i create-subdir-mounts /var/log/glusterfs/glusterd.log | wc -l`
+while [ $newcnt -eq $initcnt ]
+do
+ newcnt=`grep -i create-subdir-mounts /var/log/glusterfs/glusterd.log | wc -l`
+ sleep 1
+done
# Existing mount should still be active
mount_inode=$(stat --format "%i" "$M2")