diff options
Diffstat (limited to 'crypto/openssh/regress/multiplex.sh')
-rw-r--r-- | crypto/openssh/regress/multiplex.sh | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/crypto/openssh/regress/multiplex.sh b/crypto/openssh/regress/multiplex.sh index 4744fa3d97d6..b992cd412149 100644 --- a/crypto/openssh/regress/multiplex.sh +++ b/crypto/openssh/regress/multiplex.sh @@ -1,4 +1,4 @@ -# $OpenBSD: multiplex.sh,v 1.33 2020/06/24 15:16:23 markus Exp $ +# $OpenBSD: multiplex.sh,v 1.36 2023/03/01 09:29:32 dtucker Exp $ # Placed in the Public Domain. make_tmpdir @@ -8,8 +8,7 @@ tid="connection multiplexing" trace "will use ProxyCommand $proxycmd" if config_defined DISABLE_FD_PASSING ; then - echo "skipped (not supported on this platform)" - exit 0 + skip "not supported on this platform (FD passing disabled)" fi P=3301 # test port @@ -24,6 +23,7 @@ wait_for_mux_master_ready() fatal "mux master never becomes ready" } +maybe_add_scp_path_to_sshd start_sshd start_mux_master() @@ -38,8 +38,8 @@ start_mux_master() start_mux_master -verbose "test $tid: envpass" -trace "env passing over multiplexed connection" +verbose "test $tid: setenv" +trace "setenv over multiplexed connection" _XXX_TEST=blah ${SSH} -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" -S$CTL otherhost sh << 'EOF' test X"$_XXX_TEST" = X"blah" EOF @@ -47,6 +47,16 @@ if [ $? -ne 0 ]; then fail "environment not found" fi +verbose "test $tid: envpass" +trace "env passing over multiplexed connection" +${SSH} -F $OBJ/ssh_config -oSetEnv="_XXX_TEST=foo" -S$CTL otherhost sh << 'EOF' + test X"$_XXX_TEST" = X"foo" +EOF +if [ $? -ne 0 ]; then + fail "environment not found" +fi + + verbose "test $tid: transfer" rm -f ${COPY} trace "ssh transfer over multiplexed connection and check result" @@ -76,7 +86,7 @@ cmp ${DATA} ${COPY} || fail "scp: corrupted copy of ${DATA}" rm -f ${COPY} verbose "test $tid: forward" trace "forward over TCP/IP and check result" -$NC -N -l 127.0.0.1 $((${PORT} + 1)) < ${DATA} > /dev/null & +$NC -N -l 127.0.0.1 $((${PORT} + 1)) < ${DATA} >`ssh_logfile nc` & netcat_pid=$! ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L127.0.0.1:$((${PORT} + 2)):127.0.0.1:$((${PORT} + 1)) otherhost >>$TEST_SSH_LOGFILE 2>&1 sleep 1 # XXX remove once race fixed |