tests: Wait a bit to get Beacon frames into capture

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>
This commit is contained in:
Jouni Malinen 2020-04-25 17:23:24 +03:00
parent c794bdf9c8
commit 83c9b69b01

View 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")