mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ctdb-tests: Stop cross-talk between reclock tests
On a busy system the backgrounded counter reset can survive into the next test and interfere with its result. To avoid this, wait until all forks of 01.reclock exit before continuing on to the next test. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Aug 1 17:53:27 CEST 2016 on sn-devel-144
This commit is contained in:
parent
5462a1e9cd
commit
19ed8165bb
@ -1132,10 +1132,21 @@ program $_rpc_service${_ver:+ version }${_ver} is not available"
|
||||
|
||||
# Recovery lock fakery
|
||||
|
||||
cleanup_reclock ()
|
||||
{
|
||||
_pattern="${script_dir}/${script}"
|
||||
while pgrep -f "$_pattern" >/dev/null ; do
|
||||
echo "Waiting for backgrounded ${script} to exit..."
|
||||
(FAKE_SLEEP_REALLY=yes sleep 1)
|
||||
done
|
||||
}
|
||||
|
||||
setup_reclock ()
|
||||
{
|
||||
CTDB_RECOVERY_LOCK=$(mktemp --tmpdir="$EVENTSCRIPTS_TESTS_VAR_DIR")
|
||||
export CTDB_RECOVERY_LOCK
|
||||
|
||||
test_cleanup cleanup_reclock
|
||||
}
|
||||
|
||||
######################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user