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>
This commit is contained in:
Jouni Malinen 2014-10-20 12:38:43 +03:00
parent 5f797376f2
commit eb92d389a8

View file

@ -36,7 +36,10 @@ def reset_devs(dev, apdev):
try: try:
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') 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: except Exception, e:
pass pass