Hi Masahi, On Mon, Aug 27, 2018 at 9:03 PM Masashi Honma <masashi.honma@xxxxxxxxx> wrote: > > On 2018/08/28 06:28, peter.oh@xxxxxxxxxxxxxxxxx wrote: > > From: Peter Oh <peter.oh@xxxxxxxxxxxxxxxxx> > > * v8: fixed failed test cases in wpas_mesh. > > re-introduce a pri/sec channel swap patch > > Thank you, this patch passes existing mesh test cases on my environment > also. > > I expect this patch provides DFS-CAC-START and DFS-CAC-COMPLETED events. > To check that, I created a my test case (mesh_dfs_test.patch). > I could see DFS-CAC-START. But I saw a DFS_CAC_ABORTED event instead of > DFS-CAC-COMPLETED events. Log file is 1535428477.tar.xz. > > Could you provide working test case if possible ? Your fixed up test passes as the below: diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 8bd3557..445f32b 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -22,6 +22,8 @@ from test_ap_ht import set_world_reg from test_sae import radiotap_build, start_monitor, stop_monitor, \ build_sae_commit, sae_rx_commit_token_req from hwsim_utils import set_group_map +from test_dfs import wait_dfs_event +from test_p2p_channel import set_country def check_mesh_support(dev, secure=False): if "MESH" not in dev.get_capability("modes"): @@ -2475,3 +2477,47 @@ def run_mesh_sae_anti_clogging(dev, apdev): check_mesh_group_added(dev[2]) check_mesh_peer_connected(dev[2]) check_mesh_peer_connected(dev[0]) + +def test_wpas_mesh_open_dfs(dev, apdev): + """wpa_supplicant open MESH network with DFS""" + try: + _test_wpas_mesh_open_dfs(dev, apdev) + finally: + set_country("00") + +def _test_wpas_mesh_open_dfs(dev, apdev): + set_country("US") + for i in range(0, 2): + dev[i].request("SET country US") + check_mesh_support(dev[i]) + add_open_mesh_network(dev[i], freq="5260", basic_rates="60 120 240", + disable_ht40=True) + + for i in range(0, 2): + ev = wait_dfs_event(dev[i], "DFS-CAC-START", 5) + if "DFS-CAC-START" not in ev: + # For now, assume DFS is not supported by all kernel builds. + raise HwsimSkip("CAC did not start - assume not supported") + + ev = wait_dfs_event(dev[i], "DFS-CAC-COMPLETED", 70) + if "success=1" not in ev: + raise Exception("CAC failed") + if "freq=5260" not in ev: + raise Exception("Unexpected DFS freq result") + + # Check for mesh joined + check_mesh_group_added(dev[i]) + + # Check for peer connected + for i in range(0, 2): + check_mesh_peer_connected(dev[i]) + + # 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() -- This also needs a small change to move the MESH_GROUP_STARTED notification to after wpa_drv_join_mesh(). -- thomas _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap