]> andersk Git - openssh.git/blame - regress/stderr-data.sh
- djm@cvs.openbsd.org 2009/11/20 00:54:01
[openssh.git] / regress / stderr-data.sh
CommitLineData
836d58d7 1# $OpenBSD: stderr-data.sh,v 1.2 2002/03/27 22:39:52 markus Exp $
2# Placed in the Public Domain.
3
4tid="stderr data transfer"
5
83d96134 6DATA=/bin/ls${EXEEXT}
836d58d7 7COPY=${OBJ}/copy
8rm -f ${COPY}
9
10for n in '' -n; do
11for p in 1 2; do
12 verbose "test $tid: proto $p ($n)"
13 ${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \
14 exec sh -c \'"exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
15 2> ${COPY}
16 r=$?
17 if [ $r -ne 0 ]; then
18 fail "ssh failed with exit code $r"
19 fi
20 cmp ${DATA} ${COPY} || fail "stderr corrupt"
21 rm -f ${COPY}
22
23 ${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \
24 exec sh -c \'"echo a; exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
25 > /dev/null 2> ${COPY}
26 r=$?
27 if [ $r -ne 0 ]; then
28 fail "ssh failed with exit code $r"
29 fi
30 cmp ${DATA} ${COPY} || fail "stderr corrupt"
31 rm -f ${COPY}
32done
33done
This page took 0.21667 seconds and 5 git commands to generate.