From: Martin Schwenke Date: Mon, 19 Mar 2018 09:40:40 +0000 (+1100) Subject: ctdb-tests: Create 20.multipathd.sh X-Git-Tag: talloc-2.1.13~178 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38b54a60f52ac72a5d20b72f4ccb79c4f62b3ae2;p=thirdparty%2Fsamba.git 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 --- diff --git a/ctdb/tests/eventscripts/scripts/20.multipathd.sh b/ctdb/tests/eventscripts/scripts/20.multipathd.sh new file mode 100644 index 00000000000..be7152a2d02 --- /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 d9457420e84..9d5dff71533 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.