mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-26 13:49:35 -05:00
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 <jouni@codeaurora.org>
This commit is contained in:
parent
fb0f13fbf8
commit
a04c153b9f
@ -124,12 +124,15 @@ def start_sigma_dut(ifname, debug=False, hostapd_logdir=None, cert_path=None,
|
|||||||
|
|
||||||
global sigma_prog
|
global sigma_prog
|
||||||
sigma_prog = sigma
|
sigma_prog = sigma
|
||||||
|
res = None
|
||||||
for i in range(20):
|
for i in range(20):
|
||||||
try:
|
try:
|
||||||
res = sigma_dut_cmd("HELLO")
|
res = sigma_dut_cmd("HELLO")
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
time.sleep(0.05)
|
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}
|
return {'cmd': sigma, 'ifname': ifname}
|
||||||
|
|
||||||
def stop_sigma_dut(sigma):
|
def stop_sigma_dut(sigma):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user