From: Jouni Malinen Date: Fri, 19 Mar 2021 18:54:16 +0000 (+0200) Subject: tests: Make FT roaming and data connectivity checks more robust X-Git-Tag: hostap_2_10~380 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6219d5a5c21dc1a744ec51740ff13a080978ae2e;p=thirdparty%2Fhostap.git 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 --- diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py index c28dd26e1..ff57dfb92 100644 --- a/tests/hwsim/test_ap_ft.py +++ b/tests/hwsim/test_ap_ft.py @@ -221,6 +221,10 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False, dev.scan_for_bss(ap2['bssid'], freq="2412") 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 # set later. 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") if (i == 0 or i == roams - 1) and test_connectivity: hapd2ap.wait_sta() + dev.dump_monitor() + hapd1ap.dump_monitor() + hapd2ap.dump_monitor() if conndev: hwsim_utils.test_connectivity_iface(dev, hapd2ap, conndev) else: hwsim_utils.test_connectivity(dev, hapd2ap) + dev.dump_monitor() + hapd1ap.dump_monitor() + hapd2ap.dump_monitor() + if only_one_way: return # 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") if (i == 0 or i == roams - 1) and test_connectivity: hapd1ap.wait_sta() + dev.dump_monitor() + hapd1ap.dump_monitor() + hapd2ap.dump_monitor() if conndev: hwsim_utils.test_connectivity_iface(dev, hapd1ap, conndev) else: