Skip to content

Commit

Permalink
contest: vmksft-p: number vms from 1
Browse files Browse the repository at this point in the history
VM IDs are what we start from + 1, so the first VM in each
thread will have ID number 2:

vm-start-thr0-2
vm-start-thr1-2
vm-stop-thr0-2
vm-stop-thr1-2

(the "-2" at the end). This is pretty odd. Start from 0, like thread ID.
Note that the initial value of vm_id is the "previous ID", so init to -1.

Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
kuba-moo committed Feb 24, 2024
1 parent 0407fbd commit 400bc5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contest/remote/lib/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def bash_prev_retcode(self):
def new_vm(results_path, vm_id, thr=None, vm=None, config=None, cwd=None):
thr_pfx = f"thr{thr}-" if thr is not None else ""
if vm is None:
vm = VM(config, vm_name=f"{thr_pfx}{vm_id}")
vm = VM(config, vm_name=f"{thr_pfx}{vm_id + 1}")
# For whatever reason starting sometimes hangs / crashes
i = 0
while True:
Expand Down
2 changes: 1 addition & 1 deletion contest/remote/vmksft-p.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _parse_nested_tests(full_run):
def _vm_thread(config, results_path, thr_id, hard_stop, in_queue, out_queue):
target = config.get('ksft', 'target')
vm = None
vm_id = 1
vm_id = -1

while True:
try:
Expand Down

0 comments on commit 400bc5e

Please sign in to comment.