diff --git a/tests/p_abrt-cli/10-abrt-cli-reporting-test.sh b/tests/p_abrt-cli/10-abrt-cli-reporting-test.sh old mode 100755 new mode 100644 diff --git a/tests/p_tcpdump/00_install_tcpdump.sh b/tests/p_tcpdump/00_install_tcpdump.sh index 878cf02..11c5bf0 100755 --- a/tests/p_tcpdump/00_install_tcpdump.sh +++ b/tests/p_tcpdump/00_install_tcpdump.sh @@ -3,4 +3,5 @@ t_Log "Running $0 - install package tcpdump" t_InstallPackage tcpdump +t_InstallPackage psmisc diff --git a/tests/p_tcpdump/01_tcpdump_nic.sh b/tests/p_tcpdump/01_tcpdump_nic.sh index 9d21539..bddf9c7 100755 --- a/tests/p_tcpdump/01_tcpdump_nic.sh +++ b/tests/p_tcpdump/01_tcpdump_nic.sh @@ -5,12 +5,9 @@ t_Log "Running $0 - TCPdump test to Default-GW with IPv4" # Grabing Default-Router if NIC -IP=$(ip route list default | grep 'default via ') -regex='.*via\ (.*)\ dev.*' +def_gw=$(ip route list default|grep "default via"|head -n 1|awk '{print $3}') eth_int=$(ip addr|grep -B 1 "link/ether"|head -n 1|awk '{print $2}'|tr -d ':') -if [[ $IP =~ $regex ]] - then t_Log "Found Default-GW - starting tcpdump test" #Dumping 4 pings via NIC to file FILE='/var/tmp/nic_test.pcap' @@ -18,7 +15,7 @@ if [[ $IP =~ $regex ]] tcpdump -i $eth_int -q -n -p -w $FILE & # If we don't wait a short time, the first paket will be missed by tcpdump sleep 1 - ping -q -c $COUNT -i 0.25 ${BASH_REMATCH[1]} > /dev/null 2>&1 + ping -q -c $COUNT -i 0.25 ${def_gw} > /dev/null 2>&1 sleep 1 killall -s SIGINT tcpdump sleep 1 @@ -46,10 +43,6 @@ if [[ $IP =~ $regex ]] ret_val=1 fi fi -else - t_Log "No Default-GW found - skiping test" - ret_val=0 -fi # Remove file afterwards /bin/rm $FILE