From 551b7e143c98fbe771d6cebd7fecba32c503bfdb Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 19 Jul 2014 14:42:46 +0200 Subject: [PATCH] t/integration/simple_config.sh: Test reconfiguration. --- t/integration/simple_config.sh | 9 ++++++++- t/integration/test_lib.sh | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/t/integration/simple_config.sh b/t/integration/simple_config.sh index dd77055..175416d 100755 --- a/t/integration/simple_config.sh +++ b/t/integration/simple_config.sh @@ -53,7 +53,14 @@ Listen "$SOCKET_FILE" EOF run_sysdbd -D -C "$SYSDBD_CONF" - wait_for_sysdbd + +# reconfigure +cat < "$SYSDBD_CONF" +Listen "${SOCKET_FILE}-2" +EOF +kill -HUP $SYSDBD_PID +wait_for_sysdbd "${SOCKET_FILE}-2" + stop_sysdbd diff --git a/t/integration/test_lib.sh b/t/integration/test_lib.sh index 63be63b..c02feff 100644 --- a/t/integration/test_lib.sh +++ b/t/integration/test_lib.sh @@ -62,7 +62,7 @@ function run_sysdbd_foreground() { } function stop_sysdbd() { - if test -z $SYSDBD_PID; then + if test -z "$SYSDBD_PID"; then echo "Cannot stop sysdbd; PID unknown" >&2 exit 1 fi @@ -72,9 +72,13 @@ function stop_sysdbd() { } function wait_for_sysdbd() { + local socket="$SOCKET_FILE" local i + if test -n "$1"; then + socket="$1" + fi for (( i=0; i<10; i++ )); do - if test -e "$SOCKET_FILE"; then + if test -e "$socket"; then break fi sleep 1 -- 2.30.2