Browse Source

tests: Remove wlan5-related interfaces based on list

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>
Jouni Malinen 10 years ago
parent
commit
eb92d389a8
1 changed files with 4 additions and 1 deletions
  1. 4 1
      tests/hwsim/run-tests.py

+ 4 - 1
tests/hwsim/run-tests.py

@@ -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