mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
tests: Make sure hlr_auc_gw exits and clean up sockets
If a test run is terminated forcefully, hlr_auc_gw could have been left running and/or some of the control interface files could still remain. This could result in hlr_auc_gw not starting again for the next test run. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
0d4c5494bc
commit
dfe6ce4eeb
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof wpa_supplicant hostapd valgrind.bin > /dev/null; then
|
||||
if pidof wpa_supplicant hostapd valgrind.bin hlr_auc_gw > /dev/null; then
|
||||
RUNNING=yes
|
||||
else
|
||||
RUNNING=no
|
||||
@ -25,7 +25,7 @@ if [ "$RUNNING" = "yes" ]; then
|
||||
# give some time for hostapd and wpa_supplicant to complete deinit
|
||||
sleep 0.5
|
||||
for i in `seq 1 5`; do
|
||||
if pidof wpa_supplicant hostapd valgrind.bin > /dev/null; then
|
||||
if pidof wpa_supplicant hostapd valgrind.bin hlr_auc_gw > /dev/null; then
|
||||
echo "Waiting for processes to exit (1)"
|
||||
sleep 1
|
||||
else
|
||||
@ -34,12 +34,13 @@ if [ "$RUNNING" = "yes" ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
if pidof wpa_supplicant hostapd > /dev/null; then
|
||||
echo "wpa_supplicant/hostapd did not exit - try to force them to die"
|
||||
if pidof wpa_supplicant hostapd hlr_auc_gw > /dev/null; then
|
||||
echo "wpa_supplicant/hostapd/hlr_auc_gw did not exit - try to force them to die"
|
||||
sudo killall -9 -q hostapd
|
||||
sudo killall -9 -q wpa_supplicant
|
||||
killall -9 -q hlr_auc_gw
|
||||
for i in `seq 1 5`; do
|
||||
if pidof wpa_supplicant hostapd > /dev/null; then
|
||||
if pidof wpa_supplicant hostapd hlr_auc_gw > /dev/null; then
|
||||
echo "Waiting for processes to exit (2)"
|
||||
sleep 1
|
||||
else
|
||||
@ -55,7 +56,7 @@ for i in `pidof valgrind.bin`; do
|
||||
fi
|
||||
done
|
||||
|
||||
for i in /tmp/wpas-wlan0 /tmp/wpas-wlan1 /tmp/wpas-wlan2 /var/run/hostapd-global; do
|
||||
for i in /tmp/wpas-wlan0 /tmp/wpas-wlan1 /tmp/wpas-wlan2 /var/run/hostapd-global /tmp/hlr_auc_gw.sock /tmp/wpa_ctrl_* /tmp/eap_sim_db_*; do
|
||||
if [ -e $i ]; then
|
||||
echo "Waiting for ctrl_iface $i to disappear"
|
||||
sleep 1
|
||||
|
Loading…
Reference in New Issue
Block a user