From 939a28f6f825f06b80135ae9e9776a70ea069fc6 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 7 Nov 2019 18:58:47 +0100 Subject: [PATCH] Test with a secondary UNIX socket Signed-off-by: Joachim Nilsson --- test/local.sh | 5 ++++- test/start.sh | 4 ++-- test/test.rc | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/local.sh b/test/local.sh index af5888e..2954ac1 100755 --- a/test/local.sh +++ b/test/local.sh @@ -5,7 +5,10 @@ fi . ${srcdir}/test.rc MSG="foobar" +MSG2="xyzzy" ../src/logger -u ${SOCK} ${MSG} - grep ${MSG} ${LOG} + +../src/logger -u ${ALTSOCK} ${MSG2} +grep ${MSG2} ${LOG} diff --git a/test/start.sh b/test/start.sh index 368b5b3..f05e25c 100755 --- a/test/start.sh +++ b/test/start.sh @@ -20,9 +20,9 @@ cat < ${CONFD}/bar.conf *.* @127.0.0.2 EOF -../src/syslogd -b :${PORT} -d -n -f ${CONF} -p ${SOCK} & +../src/syslogd -b :${PORT} -d -n -f ${CONF} -p ${SOCK} -p ${ALTSOCK} & echo "$!" > ${PID} -sleep 1 +sleep 2 kill -USR1 `cat ${PID}` sleep 1 diff --git a/test/test.rc b/test/test.rc index e807d72..67dc3e4 100644 --- a/test/test.rc +++ b/test/test.rc @@ -7,6 +7,7 @@ CAP=/tmp/${NM}.pcapng CONF=/tmp/${NM}.conf CONFD=/tmp/${NM}.d SOCK=/tmp/${NM}.sock +ALTSOCK=/tmp/${NM}-alt.sock PORT=5514 export SYSLOG_UNIX_PATH=${SOCK}