Fix #39: update tests to use -P fn and -C fn
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
e381bc3620
commit
9ce3c2e8ec
@ -9,6 +9,7 @@ fi
|
||||
MSG="fwd and allow"
|
||||
|
||||
cat <<EOF >${CONFD}/fwd.conf
|
||||
kern.* /dev/null
|
||||
ntp.* @127.0.0.2:${PORT2} ;RFC5424
|
||||
EOF
|
||||
|
||||
@ -17,8 +18,7 @@ kern.* /dev/null
|
||||
*.*;kern.none ${LOG2} ;RFC5424
|
||||
EOF
|
||||
|
||||
../src/syslogd -a 127.0.0.2:* -b :${PORT2} -d -F -f ${CONF2} -p ${SOCK2} -m1 &
|
||||
echo "$!" > ${PID2}
|
||||
../src/syslogd -a 127.0.0.2:* -b :${PORT2} -d -F -f ${CONF2} -p ${SOCK2} -m1 -C ${CACHE2} -P ${PID2} &
|
||||
|
||||
kill -HUP `cat ${PID}`
|
||||
sleep 2
|
||||
|
@ -10,7 +10,7 @@ MSG="kilroy"
|
||||
# Start collector in background, note: might need sudo!
|
||||
#tshark -Qni lo -w ${CAP} port ${PORT} &
|
||||
tshark -Qni lo -w ${CAP} port 514 &
|
||||
PID="$!"
|
||||
TPID="$!"
|
||||
|
||||
# Wait for tshark to start up properly
|
||||
sleep 3
|
||||
@ -21,8 +21,8 @@ sleep 3
|
||||
sleep 1
|
||||
|
||||
# Stop tshark collector
|
||||
kill -TERM ${PID}
|
||||
wait ${PID}
|
||||
kill -TERM ${TPID}
|
||||
wait ${TPID}
|
||||
|
||||
# Analyze content, should have $MSG now ...
|
||||
#tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG}
|
||||
|
@ -26,8 +26,7 @@ cat <<EOF > ${CONFD}/bar.conf
|
||||
*.* @127.0.0.2
|
||||
EOF
|
||||
|
||||
../src/syslogd -m1 -b :${PORT} -d -sF -f ${CONF} -p ${SOCK} -p ${ALTSOCK} &
|
||||
echo "$!" > ${PID}
|
||||
../src/syslogd -m1 -b :${PORT} -d -sF -f ${CONF} -p ${SOCK} -p ${ALTSOCK} -C ${CACHE} -P ${PID} &
|
||||
|
||||
sleep 2
|
||||
kill -USR1 `cat ${PID}`
|
||||
|
@ -23,6 +23,8 @@ rm -f ${PID}
|
||||
rm -f ${PID2}
|
||||
rm -f ${CAP}
|
||||
rm -f ${SOCK}
|
||||
rm -f ${CACHE}
|
||||
rm -f ${CACHE2}
|
||||
rm -f ${CONF}
|
||||
rm -f ${CONF2}
|
||||
rm -rf ${CONFD}
|
||||
|
@ -7,6 +7,8 @@ LOGCONS=/tmp/${NM}-cons.log
|
||||
PID=/tmp/${NM}.pid
|
||||
PID2=/tmp/${NM2}.pid
|
||||
CAP=/tmp/${NM}.pcapng
|
||||
CACHE=/tmp/${NM}.cache
|
||||
CACHE2=/tmp/${NM2}.cache
|
||||
CONF=/tmp/${NM}.conf
|
||||
CONF2=/tmp/${NM2}.conf
|
||||
CONFD=/tmp/${NM}.d
|
||||
|
Loading…
Reference in New Issue
Block a user