]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Verify that sigma_dut is functional after startup
authorJouni Malinen <jouni@codeaurora.org>
Thu, 9 Jan 2020 22:04:43 +0000 (00:04 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 9 Jan 2020 22:04:43 +0000 (00:04 +0200)
There is no point in continuing the test ase if sigma_dut is not in
functional state.

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

index ff7db302a3b1e594098e5d403c5ae2b344535d36..3c86c00c2b43378da274026cc83f37927f64d21e 100644 (file)
@@ -124,12 +124,15 @@ def start_sigma_dut(ifname, debug=False, hostapd_logdir=None, cert_path=None,
 
     global sigma_prog
     sigma_prog = sigma
+    res = None
     for i in range(20):
         try:
             res = sigma_dut_cmd("HELLO")
             break
         except:
             time.sleep(0.05)
+    if res is None or "errorCode,Unknown command" not in res:
+        raise Exception("Failed to start sigma_dut")
     return {'cmd': sigma, 'ifname': ifname}
 
 def stop_sigma_dut(sigma):