1 # $OpenBSD: stderr-after-eof.sh,v 1.1 2002/03/23 16:38:09 markus Exp $
2 # Placed in the Public Domain.
4 tid
="stderr data after eof"
10 if have_prog
md5sum; then
12 elif have_prog openssl
; then
13 CHECKSUM
="openssl md5"
14 elif have_prog
cksum; then
16 elif have_prog
sum; then
19 fatal
"No checksum program available, aborting $tid test"
25 for i
in 1 2 3 4 5 6; do
26 (date;echo $i) |
$CHECKSUM >> ${DATA}
29 ${SSH} -2 -F $OBJ/ssh_proxy otherhost \
30 exec sh
-c \'"exec > /dev/null; sleep 2; cat ${DATA} 1>&2 $s"\' \
34 fail
"ssh failed with exit code $r"
36 egrep 'Disconnecting: Received extended_data after EOF' ${COPY} &&
37 fail
"ext data received after eof"
38 cmp ${DATA} ${COPY} || fail
"stderr corrupt"