]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make ap_wps_er_add_enrollee more robust under load
authorJouni Malinen <j@w1.fi>
Sat, 27 Sep 2014 13:17:17 +0000 (16:17 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 27 Sep 2014 13:17:17 +0000 (16:17 +0300)
The scan for WPS-AUTH validation may miss a Probe Response frame if the
hostapd process gets blocked under load, e.g., when testing with
parallel-vm.sh.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_wps.py

index 77b0ae52ac286e579f67f63a02a191dcf21b7c3d..7e735ae965b3ec0278acab8c381e09b05f1285de 100644 (file)
@@ -915,7 +915,12 @@ def test_ap_wps_er_add_enrollee(dev, apdev):
     dev[1].scan(freq="2412")
     bss = dev[1].get_bss(apdev[0]['bssid'])
     if "[WPS-AUTH]" not in bss['flags']:
-        raise Exception("WPS-AUTH flag missing")
+        # It is possible for scan to miss an update especially when running
+        # tests under load with multiple VMs, so allow another attempt.
+        dev[1].scan(freq="2412")
+        bss = dev[1].get_bss(apdev[0]['bssid'])
+        if "[WPS-AUTH]" not in bss['flags']:
+            raise Exception("WPS-AUTH flag missing")
 
     logger.info("Stop ER")
     dev[0].dump_monitor()