test: Add --MARK-- test to verify idle functionality works
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
4556901a2b
commit
799b03447a
@ -1,5 +1,5 @@
|
||||
EXTRA_DIST = test.rc start.sh stop.sh
|
||||
EXTRA_DIST += api.sh local.sh remote.sh fwd.sh
|
||||
EXTRA_DIST += api.sh local.sh remote.sh fwd.sh mark.sh
|
||||
CLEANFILES = *~ *.trs *.log
|
||||
TEST_EXTENSIONS = .sh
|
||||
|
||||
@ -14,6 +14,7 @@ TESTS += local.sh
|
||||
TESTS += remote.sh
|
||||
TESTS += api.sh
|
||||
TESTS += fwd.sh
|
||||
TESTS += mark.sh
|
||||
TESTS += stop.sh
|
||||
|
||||
programs: $(check_PROGRAMS)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Test FWD between two syslogd, second binds 127.0.0.2:4444
|
||||
# Test FWD between two syslogd, second binds 127.0.0.2:5555
|
||||
set -ex
|
||||
if [ x"${srcdir}" = x ]; then
|
||||
srcdir=.
|
||||
@ -16,7 +16,7 @@ cat <<EOF >${CONFD2}/50-default.conf
|
||||
*.* ${LOG2} ;RFC5424
|
||||
EOF
|
||||
|
||||
../src/syslogd -a 127.0.0.2:* -b :${PORT2} -d -F -f ${CONF2} -p ${SOCK2} &
|
||||
../src/syslogd -a 127.0.0.2:* -b :${PORT2} -d -F -f ${CONF2} -p ${SOCK2} -m1 &
|
||||
echo "$!" > ${PID2}
|
||||
|
||||
kill -HUP `cat ${PID}`
|
||||
|
10
test/mark.sh
Executable file
10
test/mark.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh -e
|
||||
# Test '-- MARK --' in log, depends on fwd.sh
|
||||
|
||||
if [ x"${srcdir}" = x ]; then
|
||||
srcdir=.
|
||||
fi
|
||||
. ${srcdir}/test.rc
|
||||
|
||||
sleep 60
|
||||
grep "MARK" ${LOG2}
|
@ -26,7 +26,7 @@ cat <<EOF > ${CONFD}/bar.conf
|
||||
*.* @127.0.0.2
|
||||
EOF
|
||||
|
||||
../src/syslogd -b :${PORT} -d -sF -f ${CONF} -p ${SOCK} -p ${ALTSOCK} &
|
||||
../src/syslogd -m1 -b :${PORT} -d -sF -f ${CONF} -p ${SOCK} -p ${ALTSOCK} &
|
||||
echo "$!" > ${PID}
|
||||
|
||||
sleep 2
|
||||
|
@ -6,12 +6,18 @@ fi
|
||||
. ${srcdir}/test.rc
|
||||
|
||||
if [ -e ${PID} ]; then
|
||||
echo "Killing `cat ${PID}` ..."
|
||||
echo "Killing 1st syslogd, PID:`cat ${PID}` ..."
|
||||
kill `cat ${PID}`
|
||||
fi
|
||||
|
||||
if [ -e ${PID2} ]; then
|
||||
echo "Killing 2nd syslogd, PID:`cat ${PID2}` ..."
|
||||
kill `cat ${PID2}`
|
||||
fi
|
||||
|
||||
rm -f ${LOG}
|
||||
rm -f ${LOGV1}
|
||||
rm -f ${LOG2}
|
||||
rm -f ${LOGCONS}
|
||||
rm -f ${PID}
|
||||
rm -f ${CAP}
|
||||
|
Loading…
Reference in New Issue
Block a user