tests: Clear scan cache at the end of ap_wps_per_station_psk_failure
It was possible for ap_wps_per_station_psk_failure to leave behind scan entries with active PBC mode if cfg80211 BSS table. This could result in a following test case failing due PBC overlap. Fix this by clearing the cfg80211 BSS table explicitly. This was found with the following test case sequence: ap_wps_per_station_psk_failure autogo_pbc Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
fb748ae858
commit
3615bde6fe
1 changed files with 7 additions and 0 deletions
|
@ -2189,6 +2189,7 @@ def test_ap_wps_per_station_psk_failure(dev, apdev):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
hapd = None
|
||||||
try:
|
try:
|
||||||
with open(pskfile, "w") as f:
|
with open(pskfile, "w") as f:
|
||||||
f.write("# WPA PSKs\n")
|
f.write("# WPA PSKs\n")
|
||||||
|
@ -2222,6 +2223,12 @@ def test_ap_wps_per_station_psk_failure(dev, apdev):
|
||||||
if len(psks) > 0:
|
if len(psks) > 0:
|
||||||
raise Exception("PSK recorded unexpectedly")
|
raise Exception("PSK recorded unexpectedly")
|
||||||
finally:
|
finally:
|
||||||
|
if hapd:
|
||||||
|
for i in range(3):
|
||||||
|
dev[i].request("DISCONNECT")
|
||||||
|
hapd.disable()
|
||||||
|
for i in range(3):
|
||||||
|
dev[i].flush_scan_cache()
|
||||||
os.remove(pskfile)
|
os.remove(pskfile)
|
||||||
|
|
||||||
def test_ap_wps_pin_request_file(dev, apdev):
|
def test_ap_wps_pin_request_file(dev, apdev):
|
||||||
|
|
Loading…
Reference in a new issue