523926a07d
The release suite fails with no permissions to dump loopback, so let's run tests in an unshare, one per test, with and start as many syslogd as needed for each test -- also easier to debug since all are then fully stand-alone. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
29 lines
537 B
Bash
Executable File
29 lines
537 B
Bash
Executable File
#!/bin/sh
|
|
. ./start.sh
|
|
|
|
MSG="kilroy"
|
|
|
|
# Start collector in background, note: might need sudo!
|
|
#tshark -Qni lo -w ${CAP} port ${PORT} &
|
|
tshark -Qni lo -w ${CAP} port 514 &
|
|
TPID="$!"
|
|
|
|
# Wait for tshark to start up properly
|
|
sleep 3
|
|
|
|
../src/logger -u ${SOCK} ${MSG}
|
|
|
|
# Wait for any OS delays, in particular on Travis
|
|
sleep 1
|
|
|
|
# Stop tshark collector
|
|
kill -TERM ${TPID}
|
|
wait ${TPID}
|
|
|
|
# Analyze content, should have $MSG now ...
|
|
#tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG}
|
|
tshark -r ${CAP} | grep ${MSG}
|
|
rm ${CAP}
|
|
|
|
. ./stop.sh
|