From: Jouni Malinen Date: Tue, 17 Dec 2024 22:14:41 +0000 (+0200) Subject: tests: Fix unexpected exit handling X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=517144359032c4c52951053423f28feb738ca0b7;p=thirdparty%2Fhostap.git tests: Fix unexpected exit handling 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 --- diff --git a/tests/hwsim/vm/parallel-vm.py b/tests/hwsim/vm/parallel-vm.py index 1d3871264..82718b898 100755 --- a/tests/hwsim/vm/parallel-vm.py +++ b/tests/hwsim/vm/parallel-vm.py @@ -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