tests: Work around exception handling issue in wpas_config_file
Raising an exception while the wlan5 interface was remove (i.e., between wpas.interface_remove() and .interface_add() calls) would result in the cleanup code failing and generating yet another exception while the first one was being processed. Work around this by re-adding the wlan5 interface back temporarily if the interface is not available for the cleanup operations. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
205c35ceff
commit
468efe79a7
1 changed files with 2 additions and 0 deletions
|
@ -284,6 +284,8 @@ def test_wpas_config_file(dev, apdev, params):
|
||||||
os.rmdir(config)
|
os.rmdir(config)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
if not wpas.ifname:
|
||||||
|
wpas.interface_add("wlan5")
|
||||||
wpas.dump_monitor()
|
wpas.dump_monitor()
|
||||||
wpas.request("SET country 00")
|
wpas.request("SET country 00")
|
||||||
wpas.wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=1)
|
wpas.wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=1)
|
||||||
|
|
Loading…
Reference in a new issue