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
# 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
}
######################################################################