From 4a28e0cb9c8862b661930a7e75d39af0abfba60b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 2 Nov 2023 15:54:29 +0200 Subject: [PATCH] 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 --- tests/hwsim/test_sigma_dut.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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