- [regress/ssh-com-sftp.sh] Remove dependency on /dev/stdin.

This commit is contained in:
Darren Tucker 2003-09-04 15:26:57 +10:00
parent 4735115e4d
commit bd05609dff
2 changed files with 16 additions and 10 deletions

View File

@ -14,7 +14,7 @@
- [regress/sftp-badcmds.sh regress/sftp-cmds.sh regress/sftp.sh
regress/ssh-com-client.sh regress/ssh-com-sftp.sh regress/stderr-data.sh
regress/transfer.sh] Use ${EXEEXT} where appropriate.
- [regress/sftp.sh] Remove dependency on /dev/stdin.
- [regress/sftp.sh regress/ssh-com-sftp.sh] Remove dependency on /dev/stdin.
- [regress/agent-ptrace.sh regress/agent-timeout.sh]
"grep -q" -> "grep >/dev/null"
- [regress/agent.sh regress/proto-version.sh regress/ssh-com.sh
@ -1011,4 +1011,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.2954 2003/09/04 05:24:50 dtucker Exp $
$Id: ChangeLog,v 1.2955 2003/09/04 05:26:57 dtucker Exp $

View File

@ -5,6 +5,13 @@ tid="basic sftp put/get with ssh.com server"
DATA=/bin/ls${EXEEXT}
COPY=${OBJ}/copy
SFTPCMDFILE=${OBJ}/batch
cat >$SFTPCMDFILE <<EOF
version
get $DATA ${COPY}.1
put $DATA ${COPY}.2
EOF
BUFFERSIZE="5 1000 32000 64000"
REQUESTS="1 2 10"
@ -41,18 +48,17 @@ for v in ${VERSIONS}; do
for R in ${REQUESTS}; do
verbose "test $tid: buffer_size $B num_requests $R"
rm -f ${COPY}.1 ${COPY}.2
${SFTP} -P ${server} -B $B -R $R -b /dev/stdin \
> /dev/null 2>&1 << EOF
version
get $DATA ${COPY}.1
put $DATA ${COPY}.2
EOF
${SFTP} -P ${server} -B $B -R $R -b $SFTPCMDFILE \
> /dev/null 2>&1
r=$?
if [ $r -ne 0 ]; then
fail "sftp failed with $r"
else
cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
fi
cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
done
done
done
rm -f ${COPY}.1 ${COPY}.2
rm -f $SFTPCMDFILE