Skip to content

Commit bfbd135

Browse files
matttbekuba-moo
authored andcommitted
contest: vmksft-p: dump logs after subtests parsing
'vm.dump_log()' will clear 'vm.log_out', used to parse nested tests. To fix that, simply move vm.dump_log() call after the nested tests parsing. It looks find to do that at the end. While at it, also add a log message to mentioned the number of subtests that have been parsed. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 343403f commit bfbd135

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

contest/remote/vmksft-p.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ def _vm_thread(config, results_path, thr_id, in_queue, out_queue):
164164
# check VM is still in failed state
165165
if vm.fail_state:
166166
result = "fail"
167-
vm.dump_log(results_path + '/' + file_name, result=retcode,
168-
info={"thr-id": thr_id, "vm-id": vm_id, "time": (t2 - t1).seconds,
169-
"found": indicators, "vm_state": vm.fail_state})
170167

171168
print(f"INFO: thr-{thr_id} {prog} >> retcode:", retcode, "result:", result, "found", indicators)
172169

@@ -181,6 +178,12 @@ def _vm_thread(config, results_path, thr_id, in_queue, out_queue):
181178
out_queue.put({'prog': prog, 'test': namify(r_name),
182179
'file_name': file_name, 'result': r_result})
183180

181+
print(f"INFO: thr-{thr_id} {prog} >> nested tests: {len(tests)} subtests")
182+
183+
vm.dump_log(results_path + '/' + file_name, result=retcode,
184+
info={"thr-id": thr_id, "vm-id": vm_id, "time": (t2 - t1).seconds,
185+
"found": indicators, "vm_state": vm.fail_state})
186+
184187
if vm.fail_state:
185188
print(f"INFO: thr-{thr_id} VM kernel crashed, destroying it")
186189
vm.stop()

0 commit comments

Comments
 (0)