]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Speed up wpas_mesh_gate_forwarding tshark operations
authorJouni Malinen <j@w1.fi>
Thu, 26 Dec 2019 22:03:24 +0000 (00:03 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 26 Dec 2019 22:03:24 +0000 (00:03 +0200)
For some reason, running tshark in the test cases can take significant
time especially with UML time-travel. Optimize this by reducing the
number of times tshark needs to be executed in the loop.

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

index 7674e7a51dd6e885ecf4680def5c5b33f5e3a759..ad8f4f5d89c2611c72b1e756674f5864db630b1c 100644 (file)
@@ -1456,12 +1456,13 @@ def test_wpas_mesh_gate_forwarding(dev, apdev, p):
     capfile = os.path.join(p['logdir'], "hwsim0.pcapng")
     filt = "wlan.sa==%s && wlan_mgt.fixed.mesh_addr5==%s" % (addr2,
                                                              external_sta)
-    for i in range(15):
+    time.sleep(4)
+    for i in range(5):
         da = run_tshark(capfile, filt, ["wlan.da"])
         if addr0 in da and addr1 in da:
             logger.debug("Frames seen in tshark iteration %d" % i)
             break
-        time.sleep(0.3)
+        time.sleep(0.5)
 
     if addr0 not in da:
         raise Exception("Frame to gate %s not observed" % addr0)