Lines Matching +full:mode +full:- +full:xxx

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
61 rm -f ${COPY}
63 ${SSH} -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}
69 ${SSH} -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}"
73 rm -f ${COPY}
76 ${SFTP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost >>$TEST_REGRESS_LOGFILE 2>&1
77 test -f ${COPY} || fail "sftp: failed copy ${DATA}"
80 rm -f ${COPY}
82 ${SCP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost:${DATA} ${COPY} >>$TEST_REGRESS_LO…
83 test -f ${COPY} || fail "scp: failed copy ${DATA}"
86 rm -f ${COPY}
89 $NC -N -l 127.0.0.1 $((${PORT} + 1)) < ${DATA} >`ssh_logfile nc` &
91 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L127.0.0.1:$((${PORT} + 2)):127.0.0.1:$((${PORT} + 1))…
92 sleep 1 # XXX remove once race fixed
96 rm -f ${COPY} $OBJ/unix-[123].fwd
99 $NC -N -Ul $OBJ/unix-1.fwd < ${DATA} > /dev/null &
101 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L$OBJ/unix-2.fwd:$OBJ/unix-1.fwd otherhost >>$TEST_SSH…
102 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R$OBJ/unix-3.fwd:$OBJ/unix-2.fwd otherhost >>$TEST_SSH…
103 sleep 1 # XXX remove once race fixed
104 $NC -U $OBJ/unix-3.fwd < /dev/null > ${COPY}
107 rm -f ${COPY} $OBJ/unix-[123].fwd
110 for mode in "" "-Oproxy"; do
111 trace "exit status $s over multiplexed connection ($mode)"
112 verbose "test $tid: status $s ($mode)"
113 ${SSH} -F $OBJ/ssh_config -S $CTL $mode otherhost exit $s
115 if [ $r -ne $s ]; then
120 trace "exit status $s with early close over multiplexed connection ($mode)"
121 ${SSH} -F $OBJ/ssh_config -S $CTL -n $mode otherhost \
122 exec sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\'
124 if [ $r -ne $s ]; then
131 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \
135 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $P:localhost:$PORT otherhost \
137 sleep 1 # XXX remove once race fixed
138 ${SSH} -F $OBJ/ssh_config -p$P otherhost true \
140 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $P:localhost:$PORT otherhost \
142 ${SSH} -F $OBJ/ssh_config -p$P otherhost true \
146 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $P:localhost:$PORT otherhost \
148 sleep 1 # XXX remove once race fixed
149 ${SSH} -F $OBJ/ssh_config -p$P otherhost true \
151 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $P:localhost:$PORT otherhost \
153 ${SSH} -F $OBJ/ssh_config -p$P otherhost true \
157 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $OBJ/unix-1.fwd:localhost:$PORT otherhost \
159 sleep 1 # XXX remove once race fixed
160 echo "" | $NC -U $OBJ/unix-1.fwd | \
163 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $OBJ/unix-1.fwd:localhost:$PORT otherhost \
165 N=$(echo "xyzzy" | $NC -U $OBJ/unix-1.fwd 2>&1 | grep "xyzzy" | wc -l)
166 test ${N} -eq 0 || fail "local forward path still listening"
167 rm -f $OBJ/unix-1.fwd
170 ${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $OBJ/unix-1.fwd:localhost:$PORT otherhost \
172 sleep 1 # XXX remove once race fixed
173 echo "" | $NC -U $OBJ/unix-1.fwd | \
176 ${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $OBJ/unix-1.fwd:localhost:$PORT otherhost \
178 N=$(echo "xyzzy" | $NC -U $OBJ/unix-1.fwd 2>&1 | grep "xyzzy" | wc -l)
179 test ${N} -eq 0 || fail "remote forward path still listening"
180 rm -f $OBJ/unix-1.fwd
183 ${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \
188 kill -0 $SSH_PID >/dev/null 2>&1 && fail "exit command failed"
190 # Restart master and test -O stop command with master using -N
195 # start a long-running command then immediately request a stop
196 ${SSH} -F $OBJ/ssh_config -S $CTL otherhost "sleep 10; exit 0" \
199 ${SSH} -F $OBJ/ssh_config -S $CTL -Ostop otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \
202 # wait until both long-running command and master have exited.
207 kill -0 $SSH_PID >/dev/null 2>&1 && fatal "stop command failed"