From eb92d389a8c3c5d84b4af2513f6e5908ecdec1e5 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 20 Oct 2014 12:38:43 +0300 Subject: [PATCH] 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 --- tests/hwsim/run-tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index 8bd16f80e..ad021606c 100755 --- a/tests/hwsim/run-tests.py +++ b/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