From: Jouni Malinen Date: Tue, 23 Dec 2014 11:10:22 +0000 (+0200) Subject: tests: Fix mesh no_auto_peer=1 test cases to allow enough time for retry X-Git-Tag: hostap_2_4~686 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0cfd223c0b123d0470f07df5bf1321e82542d0a;p=thirdparty%2Fhostap.git tests: Fix mesh no_auto_peer=1 test cases to allow enough time for retry 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 --- diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 057e221d0..51adc35fa 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -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