1 # $OpenBSD: stderr-data.sh,v 1.5 2017/04/30 23:34:55 djm Exp $
2 # Placed in the Public Domain.
4 tid="stderr data transfer"
7 verbose "test $tid: ($n)"
8 ${SSH} $n -F $OBJ/ssh_proxy otherhost exec \
9 sh -c \'"exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
13 fail "ssh failed with exit code $r"
15 cmp ${DATA} ${COPY} || fail "stderr corrupt"
18 ${SSH} $n -F $OBJ/ssh_proxy otherhost exec \
19 sh -c \'"echo a; exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
20 > /dev/null 2> ${COPY}
23 fail "ssh failed with exit code $r"
25 cmp ${DATA} ${COPY} || fail "stderr corrupt"