tests: Clear scan cache at the end of ap_wps_per_station_psk
It was possible for the WPS PBC state to get cached through to the following test cases and that would trigger false failures. Fix this by explicitly clearing the scan cache at the end of ap_wps_per_station_psk. This issue was triggered with the following test case sequence: ap_wps_per_station_psk autogo_pbc Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
747ba1067d
commit
4f524e99d2
1 changed files with 9 additions and 0 deletions
|
@ -2061,6 +2061,7 @@ def test_ap_wps_per_station_psk(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")
|
||||||
|
@ -2113,6 +2114,14 @@ def test_ap_wps_per_station_psk(dev, apdev):
|
||||||
raise Exception("Same PSK recorded for sta0(enrollee) and sta0(reg)")
|
raise Exception("Same PSK recorded for sta0(enrollee) and sta0(reg)")
|
||||||
finally:
|
finally:
|
||||||
os.remove(pskfile)
|
os.remove(pskfile)
|
||||||
|
if hapd:
|
||||||
|
dev[0].request("DISCONNECT")
|
||||||
|
dev[1].request("DISCONNECT")
|
||||||
|
dev[2].request("DISCONNECT")
|
||||||
|
hapd.disable()
|
||||||
|
dev[0].flush_scan_cache()
|
||||||
|
dev[1].flush_scan_cache()
|
||||||
|
dev[2].flush_scan_cache()
|
||||||
|
|
||||||
def test_ap_wps_per_station_psk_failure(dev, apdev):
|
def test_ap_wps_per_station_psk_failure(dev, apdev):
|
||||||
"""WPS PBC provisioning with per-station PSK (file not writable)"""
|
"""WPS PBC provisioning with per-station PSK (file not writable)"""
|
||||||
|
|
Loading…
Reference in a new issue