diff --git a/tests/hwsim/run-all.sh b/tests/hwsim/run-all.sh index 984d75474..45d2b66da 100755 --- a/tests/hwsim/run-all.sh +++ b/tests/hwsim/run-all.sh @@ -11,7 +11,7 @@ if [ "x$1" = "xconcurrent-valgrind" ]; then ./run-tests.py -l logs/$DATE-run-$i -e logs/$DATE-failed-$i -f test_p2p_$i.py || errors=1 cat logs/$DATE-run-$i >> logs/last-debug done - ./stop-wifi.sh valgrind + ./stop-wifi.sh failures=`grep "ERROR SUMMARY" logs/$DATE-valgrind-* | grep -v " 0 errors" | wc -l` if [ $failures -gt 0 ]; then echo "Mark as failed due to valgrind errors" @@ -39,7 +39,7 @@ elif [ "x$1" = "xvalgrind" ]; then DATE=`ls -1tr logs | tail -1 | cut -f1 -d-` ./run-tests.py -l logs/$DATE-run -e logs/$DATE-failed || errors=1 cat logs/$DATE-run > logs/last-debug - ./stop-wifi.sh valgrind + ./stop-wifi.sh failures=`grep "ERROR SUMMARY" logs/$DATE-valgrind-* | grep -v " 0 errors" | wc -l` if [ $failures -gt 0 ]; then echo "Mark as failed due to valgrind errors" diff --git a/tests/hwsim/stop-wifi.sh b/tests/hwsim/stop-wifi.sh index a9f286503..a4255bada 100755 --- a/tests/hwsim/stop-wifi.sh +++ b/tests/hwsim/stop-wifi.sh @@ -2,9 +2,11 @@ sudo killall -q hostapd sudo killall -q wpa_supplicant -if [ "x$1" = "xvalgrind" ]; then - sudo kill `pidof valgrind.bin` -fi +for i in `pidof valgrind.bin`; do + if ps $i | grep -q -E "wpa_supplicant|hostapd"; then + sudo kill $i + fi +done sudo killall -q wlantest sudo killall -q tcpdump if grep -q hwsim0 /proc/net/dev; then