aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-12-30 11:29:32 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-30 11:29:32 (GMT)
commitdafe0b642902d54b7118c6add82459774a11c657 (patch)
tree827c83b40536e89a3530733c02a6b183d7a93ade /tests
parent071e3bf1164c7eb261375f03f3665c548c1d58aa (diff)
downloadhostap-dafe0b642902d54b7118c6add82459774a11c657.zip
hostap-dafe0b642902d54b7118c6add82459774a11c657.tar.gz
hostap-dafe0b642902d54b7118c6add82459774a11c657.tar.bz2
tests: Clean up at the end of connect_cmd_disconnect_event
This test case used to leave the dynamically added wlan5 interface in a state where it was still trying to reconnect to a network. This could result in the following test cases being unable to clear the cfg80211 scan cache. Avoid this type of issues by explicitly stopping the connection attempt and making sure that there are no scan results in the cache at the end of connect_cmd_disconnect_event. The following test case sequence triggered a failure due to the remaining BSS table entry: connect_cmd_disconnect_event connect_cmd_wep ap_hs20_random_mac_addr Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_connect_cmd.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/hwsim/test_connect_cmd.py b/tests/hwsim/test_connect_cmd.py
index 56e77b6..d6252d5 100644
--- a/tests/hwsim/test_connect_cmd.py
+++ b/tests/hwsim/test_connect_cmd.py
@@ -163,6 +163,14 @@ def test_connect_cmd_disconnect_event(dev, apdev):
time.sleep(0.1)
wpas.dump_monitor()
+ # Clean up to avoid causing issue for following test cases
+ wpas.request("REMOVE_NETWORK all")
+ wpas.wait_event(["CTRL-EVENT-SCAN-RESULTS"], timeout=2)
+ wpas.flush_scan_cache()
+ wpas.dump_monitor()
+ wpas.interface_remove("wlan5")
+ del wpas
+
def test_connect_cmd_roam(dev, apdev):
"""cfg80211 connect command to trigger roam"""
params = { "ssid": "sta-connect" }