]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make scan_random_mac more robust
authorJouni Malinen <j@w1.fi>
Wed, 7 Jan 2015 14:29:19 +0000 (16:29 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 7 Jan 2015 14:31:22 +0000 (16:31 +0200)
There is a race condition between wlantest having received and written
the sniffer log and this test case using tshark to process it. Wait one
second before running tshark to make it less likely to get truncated
results that can result in the test case failing.

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

index 8da32636c774951d06d5eef91d1e0b9249e66a3d..96d25267b798b4c21c5f949598927912aad2bdd2 100644 (file)
@@ -707,6 +707,9 @@ def _test_scan_random_mac(dev, apdev, params):
     for args in tests:
         dev[0].request("MAC_RAND_SCAN " + args)
         dev[0].scan_for_bss(bssid, freq=2412, force_scan=True)
+    # wait a bit to make it more likely for wlantest sniffer to have captured
+    # and written the results into a file that we can process here
+    time.sleep(1)
 
     try:
         arg = [ "tshark",