mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-29 02:38:22 -05:00
024913a156
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>
63 lines
1.9 KiB
Bash
Executable File
63 lines
1.9 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
errors=0
|
|
umask 0002
|
|
|
|
if [ "x$1" = "xconcurrent-valgrind" ]; then
|
|
./start-p2p-concurrent.sh valgrind
|
|
DATE=`ls -1tr logs | tail -1 | cut -f1 -d-`
|
|
rm logs/last-debug
|
|
for i in autogo discovery grpform; do
|
|
./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
|
|
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"
|
|
errors=1
|
|
fi
|
|
if [ $errors -gt 0 ]; then
|
|
tar czf /tmp/hwsim-tests-$DATE-FAILED-concurrent-valgrind.tar.gz logs/$DATE*
|
|
exit 1
|
|
fi
|
|
elif [ "x$1" = "xconcurrent" ]; then
|
|
./start-p2p-concurrent.sh
|
|
DATE=`ls -1tr logs | tail -1 | cut -f1 -d-`
|
|
rm logs/last-debug
|
|
for i in autogo discovery grpform; do
|
|
./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
|
|
if [ $errors -gt 0 ]; then
|
|
tar czf /tmp/hwsim-tests-$DATE-FAILED-concurrent.tar.gz logs/$DATE*
|
|
exit 1
|
|
fi
|
|
elif [ "x$1" = "xvalgrind" ]; then
|
|
./start.sh valgrind
|
|
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
|
|
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"
|
|
errors=1
|
|
fi
|
|
if [ $errors -gt 0 ]; then
|
|
tar czf /tmp/hwsim-tests-$DATE-FAILED-valgrind.tar.gz logs/$DATE*
|
|
exit 1
|
|
fi
|
|
else
|
|
./start.sh
|
|
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
|
|
if [ $errors -gt 0 ]; then
|
|
tar czf /tmp/hwsim-tests-$DATE-FAILED.tar.gz logs/$DATE*
|
|
exit 1
|
|
fi
|
|
fi
|