Skip to content

Commit bef4ba6

Browse files
committed
hack/test-templates.sh: Loosen SSH over VSOCK detection tests
Detection of the SSH server on VSOCK may fail; however, a failing log indicates that controlling detection via the environment variable works as expected. Change to allow failing detection of the SSH server on VSOCK, because it will fall back to connecting SSH over existing methods and work even if it fails. Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
1 parent 4a47790 commit bef4ba6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hack/test-templates.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,17 @@ if [[ -n ${CHECKS["ssh-over-vsock"]} ]]; then
338338
set -x
339339
INFO "Testing LIMA_SSH_OVER_VSOCK=true environment"
340340
limactl stop "${NAME}"
341-
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
341+
# Detection of the SSH server on VSOCK may fail; however, a failing log indicates that controlling detection via the environment variable works as expected.
342+
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i -E "(started vsock forwarder|Failed to detect SSH server on vsock)"; then
342343
set +x
343344
diagnose "${NAME}"
344345
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
345346
exit 1
346347
fi
347348
INFO 'Testing LIMA_SSH_OVER_VSOCK="" environment'
348349
limactl stop "${NAME}"
349-
if ! LIMA_SSH_OVER_VSOCK="" limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
350+
# Detection of the SSH server on VSOCK may fail; however, a failing log indicates that controlling detection via the environment variable works as expected.
351+
if ! LIMA_SSH_OVER_VSOCK="" limactl start "${NAME}" 2>&1 | grep -i -E "(started vsock forwarder|Failed to detect SSH server on vsock)"; then
350352
set +x
351353
diagnose "${NAME}"
352354
ERROR "LIMA_SSH_OVER_VSOCK= did not enable vsock forwarder"

0 commit comments

Comments
 (0)