]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Remove wlan5-related interfaces based on list
authorJouni Malinen <j@w1.fi>
Mon, 20 Oct 2014 09:38:43 +0000 (12:38 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 20 Oct 2014 09:52:25 +0000 (12:52 +0300)
Instead of hardcoding reset_devs() to remove wlan5, remove all wlan*
interfaces renaming in the wpa_supplicant process to support the case of
dynamically added hwsim phy.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/run-tests.py

index 8bd16f80e4ea87aec038399f413e737f1d83d5ff..ad021606c4b86f6bb5436520beb6d6e9a3e75a64 100755 (executable)
@@ -36,7 +36,10 @@ def reset_devs(dev, apdev):
 
     try:
         wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
-        wpas.interface_remove("wlan5")
+        ifaces = wpas.global_request("INTERFACES").splitlines()
+        for iface in ifaces:
+            if iface.startswith("wlan"):
+                wpas.interface_remove(iface)
     except Exception, e:
         pass