From 6ef749ce15654416e9b0e81e51bc5a8bd5b4db8f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 20 Feb 2021 16:01:32 +0200 Subject: [PATCH] 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 --- tests/hwsim/test_scan.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/hwsim/test_scan.py b/tests/hwsim/test_scan.py index cbe8371b1..b0d5a64e4 100644 --- a/tests/hwsim/test_scan.py +++ b/tests/hwsim/test_scan.py @@ -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")