]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hwsim tests: Silence modprobe warnings
authorJohannes Berg <johannes.berg@intel.com>
Wed, 30 Oct 2013 22:14:55 +0000 (23:14 +0100)
committerJouni Malinen <j@w1.fi>
Thu, 31 Oct 2013 09:08:16 +0000 (11:08 +0200)
If module loading isn't enabled (e.g., in VM tests) then
don't try to load/unload the modules.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

tests/hwsim/start.sh
tests/hwsim/stop-wifi.sh

index 1f67002eb33b5289c15eea9da81caab4b0270e70..4b425481f6e78c9f58a82bc463d52685c8d27d18 100755 (executable)
@@ -48,7 +48,7 @@ else
 fi
 
 $DIR/stop-wifi.sh
-sudo modprobe mac80211_hwsim radios=5
+test -f /proc/modules && sudo modprobe mac80211_hwsim radios=5
 if [ "$CONCURRENT" = "y" ]; then
     sudo iw wlan0 interface add sta0 type station
     sudo iw wlan1 interface add sta1 type station
index eaa9d4e3badd0074991b669d9585cd2246fa0d63..d578b5bf2229c0d41729141d7dcdbdc571810736 100755 (executable)
@@ -67,7 +67,7 @@ for i in /tmp/wpas-wlan0 /tmp/wpas-wlan1 /tmp/wpas-wlan2 /var/run/hostapd-global
     fi
 done
 
-if grep -q mac80211_hwsim /proc/modules ; then
+if grep -q mac80211_hwsim /proc/modules 2>/dev/null ; then
     sudo rmmod mac80211_hwsim 
     sudo rmmod mac80211
     sudo rmmod cfg80211