summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2017-10-25 18:52:10 +1100
committerAmitay Isaacs <amitay@samba.org>2017-10-26 09:35:25 +0200
commitdcbaebc232b49e6a64228f1bb7ce7cfc5d2120e2 (patch)
treeed19c9d40eaad5aa2c5703e37328bf8fee54e170 /ctdb
parentd69899238bfe468cd3e915f6d66e279811301d66 (diff)
downloadsamba-dcbaebc232b49e6a64228f1bb7ce7cfc5d2120e2.tar.gz
ctdb-tests: Wait for ctdb_eventd to start, fail if it doesn't
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13097 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/tests/eventd/scripts/local.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/ctdb/tests/eventd/scripts/local.sh b/ctdb/tests/eventd/scripts/local.sh
index 343205ecec4..c8f7775f554 100644
--- a/ctdb/tests/eventd/scripts/local.sh
+++ b/ctdb/tests/eventd/scripts/local.sh
@@ -42,7 +42,7 @@ cleanup_eventd ()
setup_eventd ()
{
- debug "Setting up eventd"
+ echo "Setting up eventd"
if [ -n "$1" ]; then
extra_args="-D $1"
@@ -53,9 +53,8 @@ setup_eventd ()
-e "$eventd_scriptdir" \
-l "file:" -d "DEBUG" $extra_args 2>&1 | tee "$eventd_logfile" &
# Wait till eventd is running
- while [ ! -S "$eventd_socket" ] ; do
- sleep 1
- done
+ wait_until 10 test -S "$eventd_socket" || \
+ die "ctdb_eventd failed to start"
test_cleanup cleanup_eventd
}