]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Wait a bit to get Beacon frames into capture
authorJouni Malinen <j@w1.fi>
Sat, 25 Apr 2020 14:23:24 +0000 (17:23 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 25 Apr 2020 14:23:24 +0000 (17:23 +0300)
The ap_beacon_rate_* test cases could end up terminating before the very
first Beacon frame is captured, so wait a bit after the connection to
make sure at least one Beacon frame is going to be in the capture file.

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

index 8b5fdea82acfa24e3b0d92c2443820a5d53ecdcc..7918057434512a2afdc51dedbe4151ccc0068dc6 100644 (file)
@@ -601,6 +601,7 @@ def test_ap_beacon_rate_legacy(dev, apdev):
     hapd.set('beacon_rate', '55')
     hapd.enable()
     dev[0].connect('beacon-rate', key_mgmt="NONE", scan_freq="2412")
+    time.sleep(0.5)
 
 def test_ap_beacon_rate_legacy2(dev, apdev):
     """Open AP with Beacon frame TX rate 12 Mbps in VHT BSS"""
@@ -623,6 +624,7 @@ def test_ap_beacon_rate_legacy2(dev, apdev):
         hapd.enable()
         dev[0].scan_for_bss(hapd.own_addr(), freq="5180")
         dev[0].connect('beacon-rate', key_mgmt="NONE", scan_freq="5180")
+        time.sleep(0.5)
     finally:
         dev[0].request("DISCONNECT")
         hapd.request("DISABLE")
@@ -639,6 +641,7 @@ def test_ap_beacon_rate_ht(dev, apdev):
     hapd.set('beacon_rate', 'ht:0')
     hapd.enable()
     dev[0].connect('beacon-rate', key_mgmt="NONE", scan_freq="2412")
+    time.sleep(0.5)
 
 def test_ap_beacon_rate_ht2(dev, apdev):
     """Open AP with Beacon frame TX rate HT-MCS 1 in VHT BSS"""
@@ -661,6 +664,7 @@ def test_ap_beacon_rate_ht2(dev, apdev):
         hapd.enable()
         dev[0].scan_for_bss(hapd.own_addr(), freq="5180")
         dev[0].connect('beacon-rate', key_mgmt="NONE", scan_freq="5180")
+        time.sleep(0.5)
     finally:
         dev[0].request("DISCONNECT")
         hapd.request("DISABLE")
@@ -688,6 +692,7 @@ def test_ap_beacon_rate_vht(dev, apdev):
         hapd.enable()
         dev[0].scan_for_bss(hapd.own_addr(), freq="5180")
         dev[0].connect('beacon-rate', key_mgmt="NONE", scan_freq="5180")
+        time.sleep(0.5)
     finally:
         dev[0].request("DISCONNECT")
         hapd.request("DISABLE")