tests: Clear scan results at the end of scan-ssid-list tests

These test cases use hidden SSIDs and left behind a BSS entry with no
SSID. That can cause issues for consecutive test cases where the BSSID
can be used as the key for finding a BSS entry. That could end up
picking the old hidden SSID BSS instead of the one that was meant to be
used in the test case.

Flush the scan cache at the end of the scan-ssid-list test cases to
reduce invalid test failures for the consecutive test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2021-02-20 16:01:32 +02:00
parent 751ce086aa
commit 6ef749ce15

View file

@ -1989,6 +1989,9 @@ def test_scan_ssid_list(dev, apdev):
break
finally:
dev[0].request("VENDOR_ELEM_REMOVE 14 *")
hapd.disable()
dev[0].flush_scan_cache(freq=2432)
dev[0].flush_scan_cache()
if not found:
raise Exception("AP not found in scan results")
@ -2014,6 +2017,9 @@ def test_scan_short_ssid_list(dev, apdev):
break
finally:
dev[0].request("VENDOR_ELEM_REMOVE 14 *")
hapd.disable()
dev[0].flush_scan_cache(freq=2432)
dev[0].flush_scan_cache()
if not found:
raise Exception("AP not found in scan results")