From 38b54a60f52ac72a5d20b72f4ccb79c4f62b3ae2 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Mon, 19 Mar 2018 20:40:40 +1100 Subject: [PATCH] ctdb-tests: Create 20.multipathd.sh Contains testing support used only by tests for 20.multipathd event script. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- .../eventscripts/scripts/20.multipathd.sh | 18 +++++++++++++++ ctdb/tests/eventscripts/scripts/local.sh | 23 ------------------- 2 files changed, 18 insertions(+), 23 deletions(-) create mode 100644 ctdb/tests/eventscripts/scripts/20.multipathd.sh diff --git a/ctdb/tests/eventscripts/scripts/20.multipathd.sh b/ctdb/tests/eventscripts/scripts/20.multipathd.sh new file mode 100644 index 000000000000..be7152a2d02e --- /dev/null +++ b/ctdb/tests/eventscripts/scripts/20.multipathd.sh @@ -0,0 +1,18 @@ +setup_multipathd () +{ + for i ; do + case "$i" in + \!*) + _t="${i#!}" + echo "Marking ${_t} as having no active paths" + FAKE_MULTIPATH_FAILURES="${FAKE_MULTIPATH_FAILURES}${FAKE_MULTIPATH+FAILURES:+ }${_t}" + ;; + *) + _t="$i" + esac + CTDB_MONITOR_MPDEVICES="${CTDB_MONITOR_MPDEVICES}${CTDB_MONITOR_MPDEVICES:+ }${_t}" + done + + export CTDB_MONITOR_MPDEVICES FAKE_MULTIPATH_FAILURES + export FAKE_SLEEP_FORCE=0.1 +} diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh index d9457420e84c..9d5dff71533d 100644 --- a/ctdb/tests/eventscripts/scripts/local.sh +++ b/ctdb/tests/eventscripts/scripts/local.sh @@ -935,29 +935,6 @@ setup_httpd () ###################################################################### -# multipathd fakery - -setup_multipathd () -{ - for i ; do - case "$i" in - \!*) - _t="${i#!}" - echo "Marking ${_t} as having no active paths" - FAKE_MULTIPATH_FAILURES="${FAKE_MULTIPATH_FAILURES}${FAKE_MULTIPATH+FAILURES:+ }${_t}" - ;; - *) - _t="$i" - esac - CTDB_MONITOR_MPDEVICES="${CTDB_MONITOR_MPDEVICES}${CTDB_MONITOR_MPDEVICES:+ }${_t}" - done - - export CTDB_MONITOR_MPDEVICES FAKE_MULTIPATH_FAILURES - export FAKE_SLEEP_FORCE=0.1 -} - -###################################################################### - # Result and test functions # Set some globals and print the summary. -- 2.34.1