]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Use a longer timeout for connection in sigma_dut DPP test cases
authorJouni Malinen <j@w1.fi>
Sat, 20 Feb 2021 14:10:47 +0000 (16:10 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 20 Feb 2021 14:10:47 +0000 (16:10 +0200)
It was possible for these test cases to fail if the first scan iteration
did not find the AP since the 10 second timeout was small enough to
terminate the second attempt before fetching the scan results. Increase
this timeout to allow at least two full scan iterations to be completed
before declaring failure.

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

index e2151cfe96c4e04e30c7369215cd0bf59e6036cf..7c70d25dc792975b0e5b537e3879d435f4de28cd 100644 (file)
@@ -2240,7 +2240,7 @@ def test_sigma_dut_ap_dpp_qr_enrollee_chirp(dev, apdev, params):
             dev[1].dpp_listen(2437)
             dev[0].dpp_auth_init(uri=uri, conf="sta-dpp", ssid="DPPNET01",
                                  configurator=conf_id)
-            dev[1].wait_connected()
+            dev[1].wait_connected(timeout=20)
 
             sigma_dut_cmd_check("ap_reset_default,program,DPP")
         finally:
@@ -2334,7 +2334,7 @@ def run_sigma_dut_ap_dpp_qr(dev, apdev, params, ap_conf, sta_conf, extra=""):
             cmd = "DPP_AUTH_INIT peer=%d conf=%s %s configurator=%d" % (id0b, sta_conf, extra, conf_id)
             if "OK" not in dev[0].request(cmd):
                 raise Exception("Failed to initiate DPP Authentication")
-            dev[1].wait_connected()
+            dev[1].wait_connected(timeout=20)
 
             sigma_dut_cmd_check("ap_reset_default")
         finally:
@@ -2389,7 +2389,7 @@ def test_sigma_dut_ap_dpp_offchannel(dev, apdev, params):
             cmd = "DPP_AUTH_INIT peer=%d conf=sta-dpp ssid=%s configurator=%d" % (id0b, to_hex("DPPNET01"), conf_id)
             if "OK" not in dev[0].request(cmd):
                 raise Exception("Failed to initiate DPP Authentication")
-            dev[1].wait_connected()
+            dev[1].wait_connected(timeout=20)
 
             sigma_dut_cmd_check("ap_reset_default")
         finally:
@@ -2914,7 +2914,7 @@ def run_sigma_dut_ap_dpp_self_config(dev, apdev):
     res = sigma_dut_cmd(cmd)
     if "BootstrapResult,OK,AuthResult,OK,ConfResult,OK" not in res:
         raise Exception("Unexpected result: " + res)
-    dev[0].wait_connected()
+    dev[0].wait_connected(timeout=20)
     dev[0].request("DISCONNECT")
     dev[0].wait_disconnected()
     sigma_dut_cmd_check("ap_reset_default")
@@ -3391,7 +3391,7 @@ def test_sigma_dut_dpp_reconfig_enrollee(dev, apdev):
         if ev is None:
             raise Exception("DPP Config Response (reconfig) not transmitted")
 
-        dev[0].wait_connected()
+        dev[0].wait_connected(timeout=20)
         ev = dev[1].wait_event(["DPP-CONN-STATUS-RESULT"], timeout=20)
         if ev is None:
             raise Exception("No connection status reported")
@@ -3413,7 +3413,7 @@ def test_sigma_dut_dpp_reconfig_enrollee(dev, apdev):
         if ev is None:
             raise Exception("DPP Config Response (reconfig) not transmitted [2]")
 
-        dev[0].wait_connected()
+        dev[0].wait_connected(timeout=20)
     finally:
         dev[0].set("dpp_config_processing", "0")
         stop_sigma_dut(sigma)