From 283b77805cca3027e333a11c9b00ac611662c9ee Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Mon, 24 Jun 2019 21:08:34 +0530 Subject: test: Fix spurious failures in bug-1040275-brick-uid-reset-on-volume-restart.t Problem: test case is failing after just starting the volume at the time of running stat command on mount point and client is getting error transport endpoint is not conencted Solution: To avoid the error make sure all brick instance should be up and mount point should be active Change-Id: I49553a04d5b13e155ee02f4a1888a07fe3ee2ff5 fixes: bz#1721590 Signed-off-by: Mohit Agrawal --- tests/bugs/posix/bug-1040275-brick-uid-reset-on-volume-restart.t | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/bugs') diff --git a/tests/bugs/posix/bug-1040275-brick-uid-reset-on-volume-restart.t b/tests/bugs/posix/bug-1040275-brick-uid-reset-on-volume-restart.t index 016e637dd0d..3839c6e3380 100755 --- a/tests/bugs/posix/bug-1040275-brick-uid-reset-on-volume-restart.t +++ b/tests/bugs/posix/bug-1040275-brick-uid-reset-on-volume-restart.t @@ -11,6 +11,10 @@ function get_gid() { stat -c '%g' $1; } +function check_stat() { + stat $1 + echo $? +} cleanup; @@ -37,7 +41,10 @@ EXPECT 100 get_uid $M0; EXPECT 101 get_gid $M0; TEST $CLI volume stop $V0; +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" online_brick_count + TEST $CLI volume start $V0; +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "6" online_brick_count EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1 @@ -46,6 +53,7 @@ EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 3 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 4 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 5 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" check_stat $M0 EXPECT 100 get_uid $M0; EXPECT 101 get_gid $M0; -- cgit