tests: Split ap_ft_oom into separate test cases

ap_ft_oom seemed to depend on undesired wpa_supplicant behavior of
trying to do FT protocol even without being ready for reassociation.
This is going to be fixed in wpa_supplicant which would make this test
case fail, so split it into separate test cases for each failure item to
be able to avoid incorrect test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-01-04 23:19:30 +02:00
parent 04e17e5024
commit 63a7683b2d
2 changed files with 31 additions and 9 deletions

View file

@ -1106,13 +1106,17 @@ class WpaSupplicant:
if len(res.splitlines()) > 1:
logger.info("flush_scan_cache: Could not clear all BSS entries. These remain:\n" + res)
def roam(self, bssid, fail_test=False):
def roam(self, bssid, fail_test=False, assoc_reject_ok=False):
self.dump_monitor()
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:
if assoc_reject_ok:
ev = self.wait_event(["CTRL-EVENT-CONNECTED",
"CTRL-EVENT-ASSOC-REJECT"], timeout=1)
else:
ev = self.wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
if ev is not None and "CTRL-EVENT-ASSOC-REJECT" not in ev:
raise Exception("Unexpected connection")
self.dump_monitor()
return