From b2df804f571d77b07059f087b90955ffbc2f67d4 Mon Sep 17 00:00:00 2001 From: "dtucker@openbsd.org" Date: Fri, 24 Jan 2020 10:08:17 +0000 Subject: upstream: Add a connection test for proxycommand. This would have caught the problem caused by ssh.c rev 1.507 wherein Host and Hostname were swapped. Prompted by beck@ OpenBSD-Regress-ID: d218500ae6aca4c479c27318fb5b09ebc00f7aae --- regress/connect.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'regress/connect.sh') diff --git a/regress/connect.sh b/regress/connect.sh index 1b344b603..5e492b86d 100644 --- a/regress/connect.sh +++ b/regress/connect.sh @@ -1,11 +1,20 @@ -# $OpenBSD: connect.sh,v 1.6 2017/04/30 23:34:55 djm Exp $ +# $OpenBSD: connect.sh,v 1.7 2020/01/24 10:08:17 dtucker Exp $ # Placed in the Public Domain. tid="simple connect" +NC=nc + start_sshd +trace "direct connect" ${SSH} -F $OBJ/ssh_config somehost true if [ $? -ne 0 ]; then - fail "ssh connect with failed" + fail "ssh direct connect failed" +fi + +trace "proxy connect" +${SSH} -F $OBJ/ssh_config -o "proxycommand $NC %h %p" somehost true +if [ $? -ne 0 ]; then + fail "ssh proxycommand connect failed" fi -- cgit v1.2.3 From a0c81d2402eedc514b9c9f25ef9604eb0576b86a Mon Sep 17 00:00:00 2001 From: "dtucker@openbsd.org" Date: Sat, 25 Jan 2020 02:57:53 +0000 Subject: upstream: Move setting $NC into test-exec since it's now used by multiple tests, and in -portable we use our own local copy to avoid portability problems. OpenBSD-Regress-ID: ceb78445fcaac317bec2fc51b3f0d9589048c114 --- regress/connect.sh | 4 +--- regress/multiplex.sh | 4 +--- regress/test-exec.sh | 5 ++++- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'regress/connect.sh') diff --git a/regress/connect.sh b/regress/connect.sh index 5e492b86d..46f12b7b3 100644 --- a/regress/connect.sh +++ b/regress/connect.sh @@ -1,10 +1,8 @@ -# $OpenBSD: connect.sh,v 1.7 2020/01/24 10:08:17 dtucker Exp $ +# $OpenBSD: connect.sh,v 1.8 2020/01/25 02:57:53 dtucker Exp $ # Placed in the Public Domain. tid="simple connect" -NC=nc - start_sshd trace "direct connect" diff --git a/regress/multiplex.sh b/regress/multiplex.sh index f93310ed8..817ddbfa8 100644 --- a/regress/multiplex.sh +++ b/regress/multiplex.sh @@ -1,4 +1,4 @@ -# $OpenBSD: multiplex.sh,v 1.31 2020/01/25 00:27:56 dtucker Exp $ +# $OpenBSD: multiplex.sh,v 1.32 2020/01/25 02:57:53 dtucker Exp $ # Placed in the Public Domain. make_tmpdir @@ -6,8 +6,6 @@ CTL=${SSH_REGRESS_TMP}/ctl-sock tid="connection multiplexing" -NC=$OBJ/netcat - trace "will use ProxyCommand $proxycmd" if config_defined DISABLE_FD_PASSING ; then echo "skipped (not supported on this platform)" diff --git a/regress/test-exec.sh b/regress/test-exec.sh index fa92ee45a..2c9c3f498 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.73 2020/01/24 01:29:23 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.74 2020/01/25 02:57:53 dtucker Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -80,6 +80,9 @@ PLINK=plink PUTTYGEN=puttygen CONCH=conch +# Tools used by multiple tests +NC=$OBJ/netcat + if [ "x$TEST_SSH_SSH" != "x" ]; then SSH="${TEST_SSH_SSH}" fi -- cgit v1.2.3