Lines Matching +full:stop +full:- +full:mode

5 CTL=${SSH_REGRESS_TMP}/ctl-sock
19 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost \
32 ${SSH} -Nn2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" somehost \
33 -E $TEST_REGRESS_LOGFILE 2>&1 &
34 # NB. $SSH_PID will be killed by test-exec.sh:cleanup on fatal errors.
43 _XXX_TEST=blah ${SSH} -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" -S$CTL otherhost sh << 'EOF'
46 if [ $? -ne 0 ]; then
52 ${SSH} -F $OBJ/ssh_config -oSetEnv="_XXX_TEST=foo" -S$CTL otherhost sh << 'EOF'
55 if [ $? -ne 0 ]; then
59 for mode in "" "-Oproxy"; do
60 verbose "test $tid: transfer $mode"
61 rm -f ${COPY}
62 trace "ssh transfer over $mode multiplexed connection and check result"
63 ${SSH} $mode -F $OBJ/ssh_config -S$CTL otherhost cat ${DATA} > ${COPY}
64 test -f ${COPY} || fail "ssh -Sctl: failed copy ${DATA}"
65 cmp ${DATA} ${COPY} || fail "ssh -Sctl: corrupted copy of ${DATA}"
67 rm -f ${COPY}
68 trace "ssh transfer over $mode multiplexed connection and check result"
69 ${SSH} $mode -F $OBJ/ssh_config -S $CTL otherhost cat ${DATA} > ${COPY}
70 test -f ${COPY} || fail "ssh -S ctl: failed copy ${DATA}"
71 cmp ${DATA} ${COPY} || fail "ssh -S ctl: corrupted copy of ${DATA}"
74 rm -f ${COPY}
77 ${SFTP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost >>$TEST_REGRESS_LOGFILE 2>&1
78 test -f ${COPY} || fail "sftp: failed copy ${DATA}"
81 rm -f ${COPY}
83 ${SCP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost:${DATA} ${COPY} >>$TEST_REGRESS_LO…
84 test -f ${COPY} || fail "scp: failed copy ${DATA}"
87 rm -f ${COPY}
90 $NC -N -l 127.0.0.1 $((${PORT} + 1)) < ${DATA} >`ssh_logfile nc` &
92 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L127.0.0.1:$((${PORT} + 2)):127.0.0.1:$((${PORT} + 1))…
97 rm -f ${COPY} $OBJ/unix-[123].fwd
100 $NC -N -Ul $OBJ/unix-1.fwd < ${DATA} > /dev/null &
102 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L$OBJ/unix-2.fwd:$OBJ/unix-1.fwd otherhost >>$TEST_SSH…
103 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R$OBJ/unix-3.fwd:$OBJ/unix-2.fwd otherhost >>$TEST_SSH…
105 $NC -U $OBJ/unix-3.fwd < /dev/null > ${COPY}
108 rm -f ${COPY} $OBJ/unix-[123].fwd
111 for mode in "" "-Oproxy"; do
112 trace "exit status $s over multiplexed connection ($mode)"
113 verbose "test $tid: status $s ($mode)"
114 ${SSH} -F $OBJ/ssh_config -S $CTL $mode otherhost exit $s
116 if [ $r -ne $s ]; then
121 trace "exit status $s with early close over multiplexed connection ($mode)"
122 ${SSH} -F $OBJ/ssh_config -S $CTL -n $mode otherhost \
123 exec sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\'
125 if [ $r -ne $s ]; then
132 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \
136 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $P:localhost:$PORT otherhost \
139 ${SSH} -F $OBJ/ssh_config -p$P otherhost true \
141 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $P:localhost:$PORT otherhost \
143 ${SSH} -F $OBJ/ssh_config -p$P otherhost true \
147 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $P:localhost:$PORT otherhost \
150 ${SSH} -F $OBJ/ssh_config -p$P otherhost true \
152 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $P:localhost:$PORT otherhost \
154 ${SSH} -F $OBJ/ssh_config -p$P otherhost true \
158 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $OBJ/unix-1.fwd:localhost:$PORT otherhost \
161 echo "" | $NC -U $OBJ/unix-1.fwd | \
164 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $OBJ/unix-1.fwd:localhost:$PORT otherhost \
166 N=$(echo "xyzzy" | $NC -U $OBJ/unix-1.fwd 2>&1 | grep "xyzzy" | wc -l)
167 test ${N} -eq 0 || fail "local forward path still listening"
168 rm -f $OBJ/unix-1.fwd
171 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $OBJ/unix-1.fwd:localhost:$PORT otherhost \
174 echo "" | $NC -U $OBJ/unix-1.fwd | \
177 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $OBJ/unix-1.fwd:localhost:$PORT otherhost \
179 N=$(echo "xyzzy" | $NC -U $OBJ/unix-1.fwd 2>&1 | grep "xyzzy" | wc -l)
180 test ${N} -eq 0 || fail "remote forward path still listening"
181 rm -f $OBJ/unix-1.fwd
184 ${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \
189 kill -0 $SSH_PID >/dev/null 2>&1 && fail "exit command failed"
191 # Restart master and test -O stop command with master using -N
192 verbose "test $tid: cmd stop"
196 # start a long-running command then immediately request a stop
197 ${SSH} -F $OBJ/ssh_config -S $CTL otherhost "sleep 10; exit 0" \
200 ${SSH} -F $OBJ/ssh_config -S $CTL -Ostop otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \
201 || fail "send stop command failed"
203 # wait until both long-running command and master have exited.
207 [ $! != 0 ] || fail "waiting for master stop"
208 kill -0 $SSH_PID >/dev/null 2>&1 && fatal "stop command failed"