mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
tests: Stop valgrind.bin regardless of which option is started
The previous design of having to provide valgrind parameter to stop-wifi.sh did not work since the new test setup may no match the previous one. Instead of trying to figure out what needs to be stopped based on previous run, stop all wpa_supplicant/hostapd processes running under valgrind unconditionally to avoid cases where new set of processes cannot be started due to existing processed. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
e5a3983819
commit
024913a156
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user