From: Jouni Malinen Date: Sat, 20 Feb 2021 13:45:54 +0000 (+0200) Subject: tests: Make PASN tests more robust X-Git-Tag: hostap_2_10~545 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=751ce086aa059a41908594335e7aae1b43e8fb63;p=thirdparty%2Fhostap.git tests: Make PASN tests more robust The PASN_START command can fail if there is an old BSS entry for the same BSSID from an earlier test case. Try to avoid this by flushing the scan results before running these test cases. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_pasn.py b/tests/hwsim/test_pasn.py index 157d15955..3ee8cf52a 100644 --- a/tests/hwsim/test_pasn.py +++ b/tests/hwsim/test_pasn.py @@ -61,6 +61,7 @@ def check_pasn_ptk(dev, hapd, cipher): def check_pasn_akmp_cipher(dev, hapd, akmp="PASN", cipher="CCMP", group="19", status=0, fail=0, nid=""): + dev.flush_scan_cache() dev.scan(type="ONLY", freq=2412) cmd = "PASN_START bssid=%s akmp=%s cipher=%s group=%s" % (hapd.own_addr(), akmp, cipher, group) @@ -441,6 +442,8 @@ def pasn_fils_setup(wpas, apdev, params, key_mgmt): check_fils_capa(wpas) check_erp_capa(wpas) + wpas.flush_scan_cache() + start_erp_as(msk_dump=os.path.join(params['logdir'], "msk.lst")) bssid = apdev[0]['bssid']