diff --git a/tests/p_tcpdump/tcpdump_test.sh b/tests/p_tcpdump/tcpdump_test.sh index d634a71..3e4eafc 100755 --- a/tests/p_tcpdump/tcpdump_test.sh +++ b/tests/p_tcpdump/tcpdump_test.sh @@ -9,13 +9,14 @@ tcpdump -q -n -p -i lo -w /var/tmp/centos_test.pcap & # If we don't wait a short time, the first paket will be missed by tcpdump sleep 1 ping -q -c 4 -i 0.25 127.0.0.1 -killall tcpdump +killall -s SIGINT tcpdump +sleep 1 # reading from file, for each ping we should see two pakets -WORKING=$(tcpdump -r /var/tmp/centos_test.pcap | grep -ci icmp) +WORKING=$( tcpdump -r /var/tmp/centos_test.pcap | grep -ci icmp ) if [ $WORKING == 8 ]; then ret_val=0; fi # Remove file afterwards -/bin/rm /var/tmp/centos_test.pcap +# /bin/rm /var/tmp/centos_test.pcap t_CheckExitStatus $ret_val