]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix mesh no_auto_peer=1 test cases to allow enough time for retry
authorJouni Malinen <j@w1.fi>
Tue, 23 Dec 2014 11:10:22 +0000 (13:10 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 23 Dec 2014 11:10:22 +0000 (13:10 +0200)
If the initial Authentication frame was too early for the peer (i.e.,
NEW_PEER_CANDIDATE event arrived only after the Authentication frame),
wpas_mesh_open_no_auto and wpas_mesh_secure_no_auto test cases were
failing since they waited only for 10 seconds for the connection to be
completed while the retry timer was set to 10-20 seconds on the
authenticator side.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_wpas_mesh.py

index 057e221d0c3806dc003fa8ca0c5a05734ededed2..51adc35fa00d3ac8958952075529f51ff8b7e671 100644 (file)
@@ -75,8 +75,8 @@ def check_mesh_group_removed(dev):
         raise Exception("Test exception: Couldn't leave mesh")
 
 
-def check_mesh_peer_connected(dev):
-    ev = dev.wait_event(["MESH-PEER-CONNECTED"])
+def check_mesh_peer_connected(dev, timeout=10):
+    ev = dev.wait_event(["MESH-PEER-CONNECTED"], timeout=timeout)
     if ev is None:
         raise Exception("Test exception: Remote peer did not connect.")
 
@@ -203,7 +203,7 @@ def test_wpas_mesh_open_no_auto(dev, apdev):
     check_mesh_group_added(dev[1])
 
     # Check for peer connected
-    check_mesh_peer_connected(dev[0])
+    check_mesh_peer_connected(dev[0], timeout=30)
     check_mesh_peer_connected(dev[1])
 
     # Test connectivity 0->1 and 1->0
@@ -321,7 +321,7 @@ def test_wpas_mesh_secure_no_auto(dev, apdev):
     check_mesh_group_added(dev[1])
 
     # Check for peer connected
-    check_mesh_peer_connected(dev[0])
+    check_mesh_peer_connected(dev[0], timeout=30)
     check_mesh_peer_connected(dev[1])
 
     # Test connectivity 0->1 and 1->0