summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--regress/ssh-com-sftp.sh22
2 files changed, 16 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 61ee5a6f..eceac5e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 $
diff --git a/regress/ssh-com-sftp.sh b/regress/ssh-com-sftp.sh
index 760cc905..6ca7dad5 100644
--- a/regress/ssh-com-sftp.sh
+++ b/regress/ssh-com-sftp.sh
@@ -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