mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-13 05:26:59 +08:00
59d928d3b4
[regress/sftp.sh regress/putty-ciphers.sh regress/cipher-speed.sh regress/test-exec.sh regress/sftp-batch.sh regress/dynamic-forward.sh regress/putty-transfer.sh regress/conch-ciphers.sh regress/sftp-cmds.sh regress/scp.sh regress/ssh-com-sftp.sh regress/rekey.sh regress/putty-kex.sh regress/stderr-data.sh regress/stderr-after-eof.sh regress/sftp-badcmds.sh regress/reexec.sh regress/ssh-com-client.sh regress/sftp-chroot.sh regress/forwarding.sh regress/transfer.sh regress/multiplex.sh] Move the setting of DATA and COPY into test-exec.sh
30 lines
746 B
Bash
30 lines
746 B
Bash
# $OpenBSD: stderr-data.sh,v 1.3 2013/05/17 04:29:14 dtucker Exp $
|
|
# Placed in the Public Domain.
|
|
|
|
tid="stderr data transfer"
|
|
|
|
for n in '' -n; do
|
|
for p in 1 2; do
|
|
verbose "test $tid: proto $p ($n)"
|
|
${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \
|
|
exec sh -c \'"exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
|
|
2> ${COPY}
|
|
r=$?
|
|
if [ $r -ne 0 ]; then
|
|
fail "ssh failed with exit code $r"
|
|
fi
|
|
cmp ${DATA} ${COPY} || fail "stderr corrupt"
|
|
rm -f ${COPY}
|
|
|
|
${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \
|
|
exec sh -c \'"echo a; exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
|
|
> /dev/null 2> ${COPY}
|
|
r=$?
|
|
if [ $r -ne 0 ]; then
|
|
fail "ssh failed with exit code $r"
|
|
fi
|
|
cmp ${DATA} ${COPY} || fail "stderr corrupt"
|
|
rm -f ${COPY}
|
|
done
|
|
done
|