From: Jouni Malinen Date: Sat, 12 Apr 2025 07:38:56 +0000 (+0300) Subject: tests: More scan result flushing to make testing more robust X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64414f6085e04afb9d5e2eb72fafcb31cde881ce;p=thirdparty%2Fhostap.git tests: More scan result flushing to make testing more robust Test case sequence 'scan_chan_switch ssid_utf8' was failing due to a scan result surviving from the first test case to the second and the old entry ended up breaking check for the UTF-8 flag. Fix this by explicitly flushing old scan results. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_scan.py b/tests/hwsim/test_scan.py index 302495804..c51eef770 100644 --- a/tests/hwsim/test_scan.py +++ b/tests/hwsim/test_scan.py @@ -1291,6 +1291,11 @@ def test_scan_chan_switch(dev, apdev): run_scan(dev[0], bssid, 2412) dev[0].dump_monitor() + dev[0].request("DISCONNECT") + dev[0].wait_disconnected() + hapd.disable() + dev[0].flush_scan_cache() + def test_scan_new_only(dev, apdev): """Scan and only_new=1 multiple times""" dev[0].flush_scan_cache() diff --git a/tests/hwsim/test_ssid.py b/tests/hwsim/test_ssid.py index faee75d5f..5bc813b73 100644 --- a/tests/hwsim/test_ssid.py +++ b/tests/hwsim/test_ssid.py @@ -55,6 +55,7 @@ def test_ssid_32_octets_nul_term(dev, apdev): @remote_compatible def test_ssid_utf8(dev, apdev): """SSID with UTF8 encoding""" + dev[0].flush_scan_cache() hapd = hostapd.add_ap(apdev[0], {"ssid": 'testi-åäöÅÄÖ-testi', "utf8_ssid": "1"}) dev[0].connect("testi-åäöÅÄÖ-testi", key_mgmt="NONE", scan_freq="2412")