6ac6abe60e
It's a lot easier to debug the remote test with Wireshark if we log to the default service port on the remote host. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
32 lines
583 B
Bash
Executable File
32 lines
583 B
Bash
Executable File
#!/bin/sh
|
|
set -ex
|
|
if [ x"${srcdir}" = x ]; then
|
|
srcdir=.
|
|
fi
|
|
. ${srcdir}/test.rc
|
|
|
|
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="$!"
|
|
|
|
# Wait for tshark to start up properly
|
|
sleep 2
|
|
|
|
../src/logger -u ${SOCK} ${MSG}
|
|
|
|
# Wait for any OS delays, in particular on Travis
|
|
sleep 2
|
|
|
|
# Stop tshark collector
|
|
kill -TERM ${PID}
|
|
wait ${PID}
|
|
|
|
# Analyze content, should have $MSG now ...
|
|
#tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG}
|
|
tshark -r ${CAP} | grep ${MSG}
|
|
rm ${CAP}
|
|
|