From: Jouni Malinen Date: Tue, 27 Aug 2013 13:02:15 +0000 (+0300) Subject: tests: Wait longer for program deinit X-Git-Tag: aosp-kk-from-upstream~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18ece3133e02e989477cd369ff165b507a4daeb0;p=thirdparty%2Fhostap.git tests: Wait longer for program deinit Wait a bit longer for wpa_supplicant/hostapd to exit and clear control interface files separately if either any of the cleanup steps fail to do so. Signed-hostap: Jouni Malinen --- diff --git a/tests/hwsim/stop-wifi.sh b/tests/hwsim/stop-wifi.sh index 184ce8467..20efc2d9e 100755 --- a/tests/hwsim/stop-wifi.sh +++ b/tests/hwsim/stop-wifi.sh @@ -1,6 +1,6 @@ #!/bin/sh -if pidof wpa_supplicant hostapd > /dev/null; then +if pidof wpa_supplicant hostapd valgrind.bin > /dev/null; then RUNNING=yes else RUNNING=no @@ -21,7 +21,7 @@ fi if [ "$RUNNING" = "yes" ]; then # give some time for hostapd and wpa_supplicant to complete deinit - sleep 2 + sleep 4 fi if pidof wpa_supplicant hostapd > /dev/null; then @@ -38,6 +38,16 @@ 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 + if [ -e $i ]; then + sleep 1 + if [ -e $i ]; then + echo "Control interface file $i exists - remove it" + sudo rm $i + fi + fi +done + if grep -q mac80211_hwsim /proc/modules ; then sudo rmmod mac80211_hwsim # wait at the end to avoid issues starting something new immediately after