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