tests: Work around invalid ap_wps_ie_fragmentation failures
This can fail if Probe Response frame is missed and Beacon frame was used to fill in the BSS entry. This can happen, e.g., during heavy load every now and then and is not really an error, so try to workaround by runnign another scan. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
2b46e69811
commit
cf3f0ec81c
1 changed files with 10 additions and 1 deletions
|
@ -1222,6 +1222,15 @@ def test_ap_wps_ie_fragmentation(dev, apdev):
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Association with the AP timed out")
|
raise Exception("Association with the AP timed out")
|
||||||
bss = dev[0].get_bss(apdev[0]['bssid'])
|
bss = dev[0].get_bss(apdev[0]['bssid'])
|
||||||
|
if "wps_device_name" not in bss or bss['wps_device_name'] != "1234567890abcdef1234567890abcdef":
|
||||||
|
logger.info("Device Name not received correctly")
|
||||||
|
logger.info(bss)
|
||||||
|
# This can fail if Probe Response frame is missed and Beacon frame was
|
||||||
|
# used to fill in the BSS entry. This can happen, e.g., during heavy
|
||||||
|
# load every now and then and is not really an error, so try to
|
||||||
|
# workaround by runnign another scan.
|
||||||
|
dev[0].scan(freq="2412", only_new=True)
|
||||||
|
bss = dev[0].get_bss(apdev[0]['bssid'])
|
||||||
if "wps_device_name" not in bss or bss['wps_device_name'] != "1234567890abcdef1234567890abcdef":
|
if "wps_device_name" not in bss or bss['wps_device_name'] != "1234567890abcdef1234567890abcdef":
|
||||||
logger.info(bss)
|
logger.info(bss)
|
||||||
raise Exception("Device Name not received correctly")
|
raise Exception("Device Name not received correctly")
|
||||||
|
|
Loading…
Reference in a new issue