upstream: Fix debug logging of user specific delay. Patch from
[openssh.git] / regress / stderr-data.sh
blob0ceb72b3a298b67ebeb90eb659e09110aab4dd2d
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"
6 for n in '' -n; do
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"\' \
10 2> ${COPY}
11 r=$?
12 if [ $r -ne 0 ]; then
13 fail "ssh failed with exit code $r"
15 cmp ${DATA} ${COPY} || fail "stderr corrupt"
16 rm -f ${COPY}
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}
21 r=$?
22 if [ $r -ne 0 ]; then
23 fail "ssh failed with exit code $r"
25 cmp ${DATA} ${COPY} || fail "stderr corrupt"
26 rm -f ${COPY}
27 done