Contains testing support used only by tests for 01.reclock event
script.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
--- /dev/null
+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
+}
rm -f "$_out" "$_rc_file"
}
-######################################################################
-
-# 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
-}
-
-######################################################################
# VSFTPD fakery