]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make ap_ht_40mhz_intolerant_ap more robust
authorJouni Malinen <jouni@codeaurora.org>
Fri, 6 Mar 2020 15:27:40 +0000 (17:27 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 6 Mar 2020 19:44:31 +0000 (21:44 +0200)
Some test case sequences seemed to prevent the station from completing
the first OBSS scan (that scan was aborted) and that resulted in failing
the test case because the AP had not received any report in time. Wait
for scan completion and allow additional scans before timing out to
avoid indicating incorrect AP behavior in cases where the report was not
even received.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_ht.py

index 66d30b4b7df1ce12ec3abf8b17536ccf1997166d..79b15e09db00d2215488ba7f1e06a9155d98f097 100644 (file)
@@ -1005,7 +1005,10 @@ def test_ap_ht_40mhz_intolerant_ap(dev, apdev):
 
     logger.info("Waiting for co-ex report from STA")
     ok = False
-    for i in range(0, 20):
+    for i in range(4):
+        ev = dev[0].wait_event(['CTRL-EVENT-SCAN-RESULTS'], timeout=20)
+        if ev is None:
+            raise Exception("No OBSS scan seen")
         time.sleep(1)
         if hapd.get_status_field("secondary_channel") == "0":
             logger.info("AP moved to 20 MHz channel")