]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix sigma_dut interaction with multiple status lines
authorJouni Malinen <quic_jouni@quicinc.com>
Thu, 2 Nov 2023 13:54:29 +0000 (15:54 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 2 Nov 2023 13:54:29 +0000 (15:54 +0200)
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 <quic_jouni@quicinc.com>
tests/hwsim/test_sigma_dut.py

index 100993cf660cd3bbd2837cb66a78d47279ebfb2d..c457f73098bf4d517db8bdd1e94156d8ba16e159 100644 (file)
@@ -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