tests: Make FT test cases more robust

Scan explicitly for the AP that may be started during the test case
execution. This is needed to work around issues where under heavy CPU
load, the single active scan round may miss the delayed Probe Response
from the second AP. In addition, check for ROAM/FT_DS failures to be
able to report errors more clearly.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-05-14 17:02:32 +03:00
parent 841bed04de
commit 655bc8bfd6
2 changed files with 5 additions and 2 deletions

View file

@ -109,6 +109,7 @@ def run_roams(dev, apdev, ssid, passphrase, over_ds=False, sae=False, eap=False,
hwsim_utils.test_connectivity(dev.ifname, ap1['ifname'])
logger.info("Roam to the second AP")
dev.scan_for_bss(ap2['bssid'], freq="2412")
if over_ds:
dev.roam_over_ds(ap2['bssid'], fail_test=fail_test)
else:

View file

@ -720,7 +720,8 @@ class WpaSupplicant:
def roam(self, bssid, fail_test=False):
self.dump_monitor()
self.request("ROAM " + bssid)
if "OK" not in self.request("ROAM " + bssid):
raise Exception("ROAM failed")
if fail_test:
ev = self.wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
if ev is not None:
@ -734,7 +735,8 @@ class WpaSupplicant:
def roam_over_ds(self, bssid, fail_test=False):
self.dump_monitor()
self.request("FT_DS " + bssid)
if "OK" not in self.request("FT_DS " + bssid):
raise Exception("FT_DS failed")
if fail_test:
ev = self.wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
if ev is not None: