]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make wpas_mesh_pmksa_caching_ext more robust
authorJouni Malinen <j@w1.fi>
Sun, 27 Oct 2019 14:20:19 +0000 (16:20 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 27 Oct 2019 14:20:19 +0000 (16:20 +0200)
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 <j@w1.fi>
tests/hwsim/test_wpas_mesh.py

index 12b00f74633a38b6d77f3838a2094292fb887123..5f9c83e94d7eb9f28a3ff6751c1b0c47d7df8b4f 100644 (file)
@@ -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)