From: Jouni Malinen Date: Sun, 27 Oct 2019 14:20:19 +0000 (+0200) Subject: tests: Make wpas_mesh_pmksa_caching_ext more robust X-Git-Tag: hostap_2_10~2232 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f11157604c9d87ac7702102c7c29127d70c03f94;p=thirdparty%2Fhostap.git tests: Make wpas_mesh_pmksa_caching_ext more robust Avoid race conditions in completing mesh group removal/re-addition steps and starting connectivity check. It seemed to be possible to get to the connectivity test in some cases before the mesh STA had rejoined the mesh and completed key configuration. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 12b00f746..5f9c83e94 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -1668,17 +1668,21 @@ def test_wpas_mesh_pmksa_caching_ext(dev, apdev): dev[1].mesh_group_remove() check_mesh_group_removed(dev[1]) + check_mesh_peer_disconnected(dev[0]) dev[0].dump_monitor() dev[1].dump_monitor() res = dev[1].get_pmksa(addr0) if res is not None: raise Exception("Unexpected PMKSA cache entry remaining") + time.sleep(0.1) if "OK" not in dev[1].request("MESH_PMKSA_ADD " + res2): raise Exception("MESH_PMKSA_ADD failed") dev[1].mesh_group_add(id) check_mesh_group_added(dev[1]) check_mesh_peer_connected(dev[1]) + check_mesh_peer_connected(dev[0]) + time.sleep(0.1) dev[0].dump_monitor() dev[1].dump_monitor() pmksa1b = dev[1].get_pmksa(addr0)