diff options
Diffstat (limited to 'regress/multiplex.sh')
-rw-r--r-- | regress/multiplex.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/regress/multiplex.sh b/regress/multiplex.sh index de357c4d5..b5e604dba 100644 --- a/regress/multiplex.sh +++ b/regress/multiplex.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: multiplex.sh,v 1.29 2019/01/01 22:20:16 djm Exp $ | 1 | # $OpenBSD: multiplex.sh,v 1.30 2019/07/05 04:03:13 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | make_tmpdir | 4 | make_tmpdir |
@@ -81,6 +81,7 @@ trace "forward over TCP/IP and check result" | |||
81 | $NC -N -l 127.0.0.1 $((${PORT} + 1)) < ${DATA} > /dev/null & | 81 | $NC -N -l 127.0.0.1 $((${PORT} + 1)) < ${DATA} > /dev/null & |
82 | netcat_pid=$! | 82 | netcat_pid=$! |
83 | ${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 | 83 | ${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 |
84 | sleep 1 # XXX remove once race fixed | ||
84 | $NC 127.0.0.1 $((${PORT} + 2)) < /dev/null > ${COPY} | 85 | $NC 127.0.0.1 $((${PORT} + 2)) < /dev/null > ${COPY} |
85 | cmp ${DATA} ${COPY} || fail "ssh: corrupted copy of ${DATA}" | 86 | cmp ${DATA} ${COPY} || fail "ssh: corrupted copy of ${DATA}" |
86 | kill $netcat_pid 2>/dev/null | 87 | kill $netcat_pid 2>/dev/null |
@@ -91,7 +92,8 @@ $NC -N -Ul $OBJ/unix-1.fwd < ${DATA} > /dev/null & | |||
91 | netcat_pid=$! | 92 | netcat_pid=$! |
92 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L$OBJ/unix-2.fwd:$OBJ/unix-1.fwd otherhost >>$TEST_SSH_LOGFILE 2>&1 | 93 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L$OBJ/unix-2.fwd:$OBJ/unix-1.fwd otherhost >>$TEST_SSH_LOGFILE 2>&1 |
93 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R$OBJ/unix-3.fwd:$OBJ/unix-2.fwd otherhost >>$TEST_SSH_LOGFILE 2>&1 | 94 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R$OBJ/unix-3.fwd:$OBJ/unix-2.fwd otherhost >>$TEST_SSH_LOGFILE 2>&1 |
94 | $NC -U $OBJ/unix-3.fwd < /dev/null > ${COPY} 2>/dev/null | 95 | sleep 1 # XXX remove once race fixed |
96 | $NC -U $OBJ/unix-3.fwd < /dev/null > ${COPY} | ||
95 | cmp ${DATA} ${COPY} || fail "ssh: corrupted copy of ${DATA}" | 97 | cmp ${DATA} ${COPY} || fail "ssh: corrupted copy of ${DATA}" |
96 | kill $netcat_pid 2>/dev/null | 98 | kill $netcat_pid 2>/dev/null |
97 | rm -f ${COPY} $OBJ/unix-[123].fwd | 99 | rm -f ${COPY} $OBJ/unix-[123].fwd |
@@ -122,6 +124,7 @@ ${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost >>$TEST_REGRESS_LOGFILE 2>&1 | |||
122 | verbose "test $tid: cmd forward local (TCP)" | 124 | verbose "test $tid: cmd forward local (TCP)" |
123 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $P:localhost:$PORT otherhost \ | 125 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $P:localhost:$PORT otherhost \ |
124 | || fail "request local forward failed" | 126 | || fail "request local forward failed" |
127 | sleep 1 # XXX remove once race fixed | ||
125 | ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ | 128 | ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ |
126 | || fail "connect to local forward port failed" | 129 | || fail "connect to local forward port failed" |
127 | ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $P:localhost:$PORT otherhost \ | 130 | ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $P:localhost:$PORT otherhost \ |
@@ -132,6 +135,7 @@ ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ | |||
132 | verbose "test $tid: cmd forward remote (TCP)" | 135 | verbose "test $tid: cmd forward remote (TCP)" |
133 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $P:localhost:$PORT otherhost \ | 136 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $P:localhost:$PORT otherhost \ |
134 | || fail "request remote forward failed" | 137 | || fail "request remote forward failed" |
138 | sleep 1 # XXX remove once race fixed | ||
135 | ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ | 139 | ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ |
136 | || fail "connect to remote forwarded port failed" | 140 | || fail "connect to remote forwarded port failed" |
137 | ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $P:localhost:$PORT otherhost \ | 141 | ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $P:localhost:$PORT otherhost \ |
@@ -142,6 +146,7 @@ ${SSH} -F $OBJ/ssh_config -p$P otherhost true \ | |||
142 | verbose "test $tid: cmd forward local (UNIX)" | 146 | verbose "test $tid: cmd forward local (UNIX)" |
143 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $OBJ/unix-1.fwd:localhost:$PORT otherhost \ | 147 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $OBJ/unix-1.fwd:localhost:$PORT otherhost \ |
144 | || fail "request local forward failed" | 148 | || fail "request local forward failed" |
149 | sleep 1 # XXX remove once race fixed | ||
145 | echo "" | $NC -U $OBJ/unix-1.fwd | \ | 150 | echo "" | $NC -U $OBJ/unix-1.fwd | \ |
146 | grep "Invalid SSH identification string" >/dev/null 2>&1 \ | 151 | grep "Invalid SSH identification string" >/dev/null 2>&1 \ |
147 | || fail "connect to local forward path failed" | 152 | || fail "connect to local forward path failed" |
@@ -154,6 +159,7 @@ rm -f $OBJ/unix-1.fwd | |||
154 | verbose "test $tid: cmd forward remote (UNIX)" | 159 | verbose "test $tid: cmd forward remote (UNIX)" |
155 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $OBJ/unix-1.fwd:localhost:$PORT otherhost \ | 160 | ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $OBJ/unix-1.fwd:localhost:$PORT otherhost \ |
156 | || fail "request remote forward failed" | 161 | || fail "request remote forward failed" |
162 | sleep 1 # XXX remove once race fixed | ||
157 | echo "" | $NC -U $OBJ/unix-1.fwd | \ | 163 | echo "" | $NC -U $OBJ/unix-1.fwd | \ |
158 | grep "Invalid SSH identification string" >/dev/null 2>&1 \ | 164 | grep "Invalid SSH identification string" >/dev/null 2>&1 \ |
159 | || fail "connect to remote forwarded path failed" | 165 | || fail "connect to remote forwarded path failed" |