tests: Make FT roaming and data connectivity checks more robust
Dump pending monitor interface messages between each roaming step to make the test log easier to understand and hostapd wait for the new connection more robust by ensuring that the processed event if for the very last reassociation. It looks like at least ap_ft_vlan_over_ds_many could fail due to the connectivity check being started before the final roam had been completed on the AP side even though there was an explicit hapd2ap.wait_sta() wait before the test. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
58c5bd762e
commit
6219d5a5c2
1 changed files with 14 additions and 0 deletions
|
@ -221,6 +221,10 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False,
|
||||||
dev.scan_for_bss(ap2['bssid'], freq="2412")
|
dev.scan_for_bss(ap2['bssid'], freq="2412")
|
||||||
|
|
||||||
for i in range(0, roams):
|
for i in range(0, roams):
|
||||||
|
dev.dump_monitor()
|
||||||
|
hapd1ap.dump_monitor()
|
||||||
|
hapd2ap.dump_monitor()
|
||||||
|
|
||||||
# Roaming artificially fast can make data test fail because the key is
|
# Roaming artificially fast can make data test fail because the key is
|
||||||
# set later.
|
# set later.
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
|
@ -239,11 +243,18 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False,
|
||||||
raise Exception("Did not connect to correct AP")
|
raise Exception("Did not connect to correct AP")
|
||||||
if (i == 0 or i == roams - 1) and test_connectivity:
|
if (i == 0 or i == roams - 1) and test_connectivity:
|
||||||
hapd2ap.wait_sta()
|
hapd2ap.wait_sta()
|
||||||
|
dev.dump_monitor()
|
||||||
|
hapd1ap.dump_monitor()
|
||||||
|
hapd2ap.dump_monitor()
|
||||||
if conndev:
|
if conndev:
|
||||||
hwsim_utils.test_connectivity_iface(dev, hapd2ap, conndev)
|
hwsim_utils.test_connectivity_iface(dev, hapd2ap, conndev)
|
||||||
else:
|
else:
|
||||||
hwsim_utils.test_connectivity(dev, hapd2ap)
|
hwsim_utils.test_connectivity(dev, hapd2ap)
|
||||||
|
|
||||||
|
dev.dump_monitor()
|
||||||
|
hapd1ap.dump_monitor()
|
||||||
|
hapd2ap.dump_monitor()
|
||||||
|
|
||||||
if only_one_way:
|
if only_one_way:
|
||||||
return
|
return
|
||||||
# Roaming artificially fast can make data test fail because the key is
|
# Roaming artificially fast can make data test fail because the key is
|
||||||
|
@ -262,6 +273,9 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False,
|
||||||
raise Exception("Did not connect to correct AP")
|
raise Exception("Did not connect to correct AP")
|
||||||
if (i == 0 or i == roams - 1) and test_connectivity:
|
if (i == 0 or i == roams - 1) and test_connectivity:
|
||||||
hapd1ap.wait_sta()
|
hapd1ap.wait_sta()
|
||||||
|
dev.dump_monitor()
|
||||||
|
hapd1ap.dump_monitor()
|
||||||
|
hapd2ap.dump_monitor()
|
||||||
if conndev:
|
if conndev:
|
||||||
hwsim_utils.test_connectivity_iface(dev, hapd1ap, conndev)
|
hwsim_utils.test_connectivity_iface(dev, hapd1ap, conndev)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue