]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make OCV test cases more robust by clearing scan results on AP
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 23 Feb 2022 22:13:52 +0000 (00:13 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 23 Feb 2022 22:23:25 +0000 (00:23 +0200)
This is needed to avoid pri/sec channel switching based on potential
scan results from the previous test cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_ocv.py

index 015d919f6708147646eecf4e66a63bbd5302b07e..f22d227177d2a098d2530908b08c7f149d87a2d5 100644 (file)
@@ -131,6 +131,7 @@ def test_wpa2_ocv_ht40(dev, apdev):
         dev[1].flush_scan_cache()
 
 def run_wpa2_ocv_ht40(dev, apdev):
+    clear_scan_cache(apdev[0])
     for channel, capab, freq, mode in [("6", "[HT40-]", "2437", "g"),
                                        ("6", "[HT40+]", "2437", "g"),
                                        ("40", "[HT40-]", "5200", "a"),
@@ -169,6 +170,7 @@ def test_wpa2_ocv_vht40(dev, apdev):
         dev[2].flush_scan_cache()
 
 def run_wpa2_ocv_vht40(dev, apdev):
+    clear_scan_cache(apdev[0])
     for channel, capab, freq in [("40", "[HT40-]", "5200"),
                                  ("36", "[HT40+]", "5180")]:
         params = {"hw_mode": "a",
@@ -213,6 +215,7 @@ def test_wpa2_ocv_vht80(dev, apdev):
         dev[2].flush_scan_cache()
 
 def run_wpa2_ocv_vht80(dev, apdev):
+    clear_scan_cache(apdev[0])
     for channel, capab, freq in [("40", "[HT40-]", "5200"),
                                  ("36", "[HT40+]", "5180")]:
         params = {"hw_mode": "a",