From: Jouni Malinen Date: Thu, 9 Jan 2020 22:04:43 +0000 (+0200) Subject: tests: Verify that sigma_dut is functional after startup X-Git-Tag: hostap_2_10~1950 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a04c153b9f04ea76470e27798453b1afbf26b731;p=thirdparty%2Fhostap.git tests: Verify that sigma_dut is functional after startup There is no point in continuing the test ase if sigma_dut is not in functional state. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py index ff7db302a..3c86c00c2 100644 --- a/tests/hwsim/test_sigma_dut.py +++ b/tests/hwsim/test_sigma_dut.py @@ -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):