]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make mesh_missing_mic more robust
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 16 Jun 2016 23:05:10 +0000 (02:05 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 16 Jun 2016 23:05:10 +0000 (02:05 +0300)
Check for MESH-PEER-CONNECTED from dev[1] before reporting MGMT-RX
timeout errors from dev[0]. This avoids false failures in case the short
0.01 s timeout at the end of the loop was not long enough to catch the
message.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_wpas_mesh.py

index 69762ab28b221747422b1ec30f1af8b16ccf9397..582ad736031c61026efd4683c36dbfa607a8233e 100644 (file)
@@ -1422,6 +1422,9 @@ def test_mesh_missing_mic(dev, apdev):
             raise Exception("Did not see Action frames")
         rx_msg = dev[0].mgmt_rx()
         if rx_msg is None:
+            ev = dev[1].wait_event(["MESH-PEER-CONNECTED"], timeout=0.01)
+            if ev:
+                break
             raise Exception("MGMT-RX timeout")
         if rx_msg['subtype'] == 13:
             payload = rx_msg['payload']