]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix unexpected exit handling
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 17 Dec 2024 22:14:41 +0000 (00:14 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 17 Dec 2024 22:14:41 +0000 (00:14 +0200)
Calculation of remaining VMs seemed to have been messed up in some of
the earlier design changes. Iterate over all VMs instead of check the
terminated VM context data multiple times.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/vm/parallel-vm.py

index 1d3871264a70d2ee5ea41514ab0ae4b90cf5ef89..82718b89863992b6901b78e6af4e21771db236d0 100755 (executable)
@@ -288,12 +288,12 @@ def vm_terminated(_vm, scr, sel, test_queue):
     if test_queue:
         num_vm = 0
         for i in range(num_servers):
-            if _vm['proc']:
+            if vm[i]['proc']:
                 num_vm += 1
         if len(test_queue) > num_vm:
             if _vm['idx'] + 1 < status_line:
                 scr.addstr("unexpected exit")
-            logger.info("VM[%d] unexpected exit" % i)
+            logger.info("VM[%d] unexpected exit" % _vm['idx'])
             updated = True
     return updated