Trim remote test, restore startup/log sleep 2
Even on my laptop it sometimes takes a bit too long for tshark to start up and syslogd to actually FWD the $MSG to remote. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
3ef86e98b1
commit
c6a19049dc
@ -4,20 +4,23 @@ set -ex
|
|||||||
|
|
||||||
MSG="kilroy"
|
MSG="kilroy"
|
||||||
|
|
||||||
/sbin/ifconfig -a
|
# Start collector in background, note: might need sudo!
|
||||||
|
|
||||||
tshark -Qni lo -w ${CAP} port ${PORT} &
|
tshark -Qni lo -w ${CAP} port ${PORT} &
|
||||||
#tcpdump -qlni lo -w ${CAP} port ${PORT} &
|
|
||||||
PID="$!"
|
PID="$!"
|
||||||
sleep 1
|
|
||||||
ps fax |grep -A3 tshark
|
# Wait for tshark to start up properly
|
||||||
|
sleep 2
|
||||||
|
|
||||||
../src/logger -u ${SOCK} ${MSG}
|
../src/logger -u ${SOCK} ${MSG}
|
||||||
|
|
||||||
sleep 1
|
# Wait for any OS delays, in particular on Travis
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
# Stop tshark collector
|
||||||
kill -TERM ${PID}
|
kill -TERM ${PID}
|
||||||
wait ${PID}
|
wait ${PID}
|
||||||
|
|
||||||
|
# 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}
|
||||||
rm ${CAP}
|
rm ${CAP}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user