aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-01-29 14:27:07 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-29 14:27:07 (GMT)
commit3ca712028db75f2a33bd9401092c05ffdaf21f93 (patch)
treeba39ebc60b69bd6d4f1345bb8b001d602828f59a /tests
parent8b1940167901bd97963c451cce9cba8e11897d71 (diff)
downloadhostap-3ca712028db75f2a33bd9401092c05ffdaf21f93.zip
hostap-3ca712028db75f2a33bd9401092c05ffdaf21f93.tar.gz
hostap-3ca712028db75f2a33bd9401092c05ffdaf21f93.tar.bz2
tests: Remove mesh before trying to clear BSS cache
The flush_scan_cache() operations in the finally part of these test cases ended up getting called when the mesh group was still operating. This could result in unexpected behavior due to offchannel scan being performed before the device becomes idle. Clean this up by explicitly removing the mesh group before cleaning up. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_wpas_mesh.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py
index cd820bb..7c4ad2e 100644
--- a/tests/hwsim/test_wpas_mesh.py
+++ b/tests/hwsim/test_wpas_mesh.py
@@ -748,6 +748,8 @@ def test_wpas_mesh_open_5ghz(dev, apdev):
try:
_test_wpas_mesh_open_5ghz(dev, apdev)
finally:
+ dev[0].request("MESH_GROUP_REMOVE " + dev[0].ifname)
+ dev[1].request("MESH_GROUP_REMOVE " + dev[1].ifname)
subprocess.call(['iw', 'reg', 'set', '00'])
dev[0].flush_scan_cache()
dev[1].flush_scan_cache()
@@ -775,11 +777,20 @@ def _test_wpas_mesh_open_5ghz(dev, apdev):
# Test connectivity 0->1 and 1->0
hwsim_utils.test_connectivity(dev[0], dev[1])
+ dev[0].mesh_group_remove()
+ dev[1].mesh_group_remove()
+ check_mesh_group_removed(dev[0])
+ check_mesh_group_removed(dev[1])
+ dev[0].dump_monitor()
+ dev[1].dump_monitor()
+
def test_wpas_mesh_open_5ghz_coex(dev, apdev):
"""Mesh network on 5 GHz band and 20/40 coex change"""
try:
_test_wpas_mesh_open_5ghz_coex(dev, apdev)
finally:
+ dev[0].request("MESH_GROUP_REMOVE " + dev[0].ifname)
+ dev[1].request("MESH_GROUP_REMOVE " + dev[1].ifname)
set_world_reg(apdev0=apdev[0], dev0=dev[0])
dev[0].flush_scan_cache()
dev[1].flush_scan_cache()
@@ -820,12 +831,20 @@ def _test_wpas_mesh_open_5ghz_coex(dev, apdev):
raise Exception("Unexpected SIGNAL_POLL output: " + str(sig))
hapd.disable()
+ dev[0].mesh_group_remove()
+ dev[1].mesh_group_remove()
+ check_mesh_group_removed(dev[0])
+ check_mesh_group_removed(dev[1])
+ dev[0].dump_monitor()
+ dev[1].dump_monitor()
def test_wpas_mesh_open_vht_80p80(dev, apdev):
"""wpa_supplicant open MESH network on VHT 80+80 MHz channel"""
try:
_test_wpas_mesh_open_vht_80p80(dev, apdev)
finally:
+ dev[0].request("MESH_GROUP_REMOVE " + dev[0].ifname)
+ dev[1].request("MESH_GROUP_REMOVE " + dev[1].ifname)
subprocess.call(['iw', 'reg', 'set', '00'])
dev[0].flush_scan_cache()
dev[1].flush_scan_cache()
@@ -869,11 +888,20 @@ def _test_wpas_mesh_open_vht_80p80(dev, apdev):
if "CENTER_FRQ2=5775" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(4b): " + str(sig))
+ dev[0].mesh_group_remove()
+ dev[1].mesh_group_remove()
+ check_mesh_group_removed(dev[0])
+ check_mesh_group_removed(dev[1])
+ dev[0].dump_monitor()
+ dev[1].dump_monitor()
+
def test_mesh_open_vht_160(dev, apdev):
"""Open mesh network on VHT 160 MHz channel"""
try:
_test_mesh_open_vht_160(dev, apdev)
finally:
+ dev[0].request("MESH_GROUP_REMOVE " + dev[0].ifname)
+ dev[1].request("MESH_GROUP_REMOVE " + dev[1].ifname)
subprocess.call(['iw', 'reg', 'set', '00'])
dev[0].flush_scan_cache()
dev[1].flush_scan_cache()
@@ -908,6 +936,8 @@ def _test_mesh_open_vht_160(dev, apdev):
# Check for peer connected
check_mesh_peer_connected(dev[0])
check_mesh_peer_connected(dev[1])
+ dev[0].dump_monitor()
+ dev[1].dump_monitor()
# Test connectivity 0->1 and 1->0
hwsim_utils.test_connectivity(dev[0], dev[1])
@@ -924,6 +954,13 @@ def _test_mesh_open_vht_160(dev, apdev):
if "FREQUENCY=5520" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(3b): " + str(sig))
+ dev[0].mesh_group_remove()
+ dev[1].mesh_group_remove()
+ check_mesh_group_removed(dev[0])
+ check_mesh_group_removed(dev[1])
+ dev[0].dump_monitor()
+ dev[1].dump_monitor()
+
def test_wpas_mesh_password_mismatch(dev, apdev):
"""Mesh network and one device with mismatching password"""
check_mesh_support(dev[0], secure=True)