Parcourir la 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 il y a 10 ans
Parent
commit
eb92d389a8
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  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