diff options
5 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs/bitrot/1209751-bitrot-scrub-tunable-reset.t b/tests/bugs/bitrot/1209751-bitrot-scrub-tunable-reset.t index 4f98174c16f..919ffc3ba62 100644 --- a/tests/bugs/bitrot/1209751-bitrot-scrub-tunable-reset.t +++ b/tests/bugs/bitrot/1209751-bitrot-scrub-tunable-reset.t @@ -22,6 +22,8 @@ TEST $CLI volume start $V0 ## Enable bitrot on volume $V0 TEST $CLI volume bitrot $V0 enable +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" get_bitd_count + ## Set bitrot scrub-throttle value to lazy TEST $CLI volume bitrot $V0 scrub-throttle lazy diff --git a/tests/bugs/bitrot/1209818-vol-info-show-scrub-process-properly.t b/tests/bugs/bitrot/1209818-vol-info-show-scrub-process-properly.t index efba5794b08..4fe02dc7f63 100644 --- a/tests/bugs/bitrot/1209818-vol-info-show-scrub-process-properly.t +++ b/tests/bugs/bitrot/1209818-vol-info-show-scrub-process-properly.t @@ -22,6 +22,8 @@ TEST $CLI volume start $V0 ## Enable bitrot on volume $V0 TEST $CLI volume bitrot $V0 enable +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" get_bitd_count + ## Set bitrot scrubber process to pause state TEST $CLI volume bitrot $V0 scrub pause diff --git a/tests/bugs/bitrot/1210684-scrub-pause-resume-error-handling.t b/tests/bugs/bitrot/1210684-scrub-pause-resume-error-handling.t index 0a306df4698..b15b908d21a 100644 --- a/tests/bugs/bitrot/1210684-scrub-pause-resume-error-handling.t +++ b/tests/bugs/bitrot/1210684-scrub-pause-resume-error-handling.t @@ -22,6 +22,8 @@ TEST $CLI volume start $V0 ## Enable bitrot for volume $V0 TEST $CLI volume bitrot $V0 enable +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" get_bitd_count + ## Pause scrubber operation on volume $V0 TEST $CLI volume bitrot $V0 scrub pause diff --git a/tests/bugs/bitrot/bug-1207029-bitrot-daemon-should-start-on-valid-node.t b/tests/bugs/bitrot/bug-1207029-bitrot-daemon-should-start-on-valid-node.t index 263df31ff38..f2c2b340e60 100644 --- a/tests/bugs/bitrot/bug-1207029-bitrot-daemon-should-start-on-valid-node.t +++ b/tests/bugs/bitrot/bug-1207029-bitrot-daemon-should-start-on-valid-node.t @@ -34,6 +34,9 @@ TEST $CLI_1 volume start $V0 ## Enable bitrot on volume $V0 TEST $CLI_1 volume bitrot $V0 enable +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" get_bitd_count +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" get_scrubd_count + ## From node 1 Gluster volume status command should show the status of bitrot ## daemon of all the nodes. there are 2 nodes in a cluster with having brick ## ${V0}1 and ${V0}2 . So there should be 2 bitrot daemon running. diff --git a/tests/volume.rc b/tests/volume.rc index 5ba637dee54..b71fea4d503 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -524,3 +524,12 @@ else echo "1" fi } + +function get_bitd_count { + ps auxw | grep glusterfs | grep bitd.pid | grep -v grep | wc -l +} + +function get_scrubd_count { + ps auxw | grep glusterfs | grep scrub.pid | grep -v grep | wc -l +} + |