From: Jouni Malinen Date: Thu, 2 Nov 2023 13:54:29 +0000 (+0200) Subject: tests: Fix sigma_dut interaction with multiple status lines X-Git-Tag: hostap_2_11~884 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a28e0cb9c8862b661930a7e75d39af0abfba60b;p=thirdparty%2Fhostap.git tests: Fix sigma_dut interaction with multiple status lines It is possible for the sigma_dut process to be scheduled in a manner that ends up combining the status,RUNNING and status,COMPLETE lines into a single TCP message. This was supposed to be handled in the sigma_dut_cmd() implementations, but that design had been broken by code refactoring that changed the indentation level incorrectly. Fixes: d68946d510e5 ("tests: sigma_dut and DPP push button first on Enrollee") Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py index 100993cf6..c457f7309 100644 --- a/tests/hwsim/test_sigma_dut.py +++ b/tests/hwsim/test_sigma_dut.py @@ -96,9 +96,9 @@ def sigma_dut_cmd(cmd, port=9000, timeout=2, dump_dev=None): done = True res = line break - if running and not done: - # Read the actual response - res = sock.recv(1000).decode() + if running and not done: + # Read the actual response + res = sock.recv(1000).decode() except: res = '' pass