mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +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. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109 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 (cherry picked from commit 19ed8165bbe374e1ea277fd4dd5a65ee932b4f05)
This commit is contained in:
parent
70a1836bfe
commit
a772738363
@ -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…
x
Reference in New Issue
Block a user