tests: Make INTERWORKING_SELECT tests more robust
It is possible for a scan to fail to see Probe Response or Beacon frame under heavy load (e.g., during a parallel-vm.sh test run) since the dwell time on a chanenl is quite short. Make the test cases using INTERWORKING_SELECT more robust by trying again if the first attempt does not find a matching BSS. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
c0333c8dd5
commit
0dee3a0a5d
1 changed files with 9 additions and 1 deletions
|
@ -67,7 +67,15 @@ def interworking_select(dev, bssid, type=None, no_match=False, freq=None):
|
||||||
raise Exception("Unexpected network match")
|
raise Exception("Unexpected network match")
|
||||||
return
|
return
|
||||||
if "INTERWORKING-NO-MATCH" in ev:
|
if "INTERWORKING-NO-MATCH" in ev:
|
||||||
raise Exception("Matching network not found")
|
logger.info("Matching network not found - try again")
|
||||||
|
dev.dump_monitor()
|
||||||
|
dev.request("INTERWORKING_SELECT" + freq_extra)
|
||||||
|
ev = dev.wait_event(["INTERWORKING-AP", "INTERWORKING-NO-MATCH"],
|
||||||
|
timeout=15)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("Network selection timed out");
|
||||||
|
if "INTERWORKING-NO-MATCH" in ev:
|
||||||
|
raise Exception("Matching network not found")
|
||||||
if bssid and bssid not in ev:
|
if bssid and bssid not in ev:
|
||||||
raise Exception("Unexpected BSSID in match")
|
raise Exception("Unexpected BSSID in match")
|
||||||
if type and "type=" + type not in ev:
|
if type and "type=" + type not in ev:
|
||||||
|
|
Loading…
Reference in a new issue