Skip to content

Commit 5db842f

Browse files
committed
test(vsock): Do not exit with 255 in remote bash script
Exit code 255 is already used by the SSH client to communicate connection errors [1], meaning if the remote command also exits with 255 in failure cases, this will be indistinguishable from a connection error. Use exit code 1 instead in `check_guest_connections`. [1]: https://man.openbsd.org/ssh#EXIT_STATUS Signed-off-by: Patrick Roy <[email protected]>
1 parent 39b9dfa commit 5db842f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/framework/utils_vsock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def check_guest_connections(vm, server_port_path, blob_path, blob_hash):
180180
cmd += " ({})& ".format(worker_cmd)
181181
cmd += ' workers="$workers $!";'
182182
cmd += "done;"
183-
cmd += "for w in $workers; do wait $w || exit -1; done"
183+
cmd += "for w in $workers; do wait $w || exit 1; done"
184184

185185
ecode, _, stderr = vm.ssh.run(cmd)
186186
echo_server.terminate()

0 commit comments

Comments
 (0)