diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | regress/sftp.sh | 24 |
2 files changed, 17 insertions, 10 deletions
@@ -14,6 +14,7 @@ | |||
14 | - [regress/sftp-badcmds.sh regress/sftp-cmds.sh regress/sftp.sh | 14 | - [regress/sftp-badcmds.sh regress/sftp-cmds.sh regress/sftp.sh |
15 | regress/ssh-com-client.sh regress/ssh-com-sftp.sh regress/stderr-data.sh | 15 | regress/ssh-com-client.sh regress/ssh-com-sftp.sh regress/stderr-data.sh |
16 | regress/transfer.sh] Use ${EXEEXT} where appropriate. | 16 | regress/transfer.sh] Use ${EXEEXT} where appropriate. |
17 | - [regress/sftp.sh] Remove dependency on /dev/stdin. | ||
17 | 18 | ||
18 | 20030903 | 19 | 20030903 |
19 | - (djm) OpenBSD CVS Sync | 20 | - (djm) OpenBSD CVS Sync |
@@ -1004,4 +1005,4 @@ | |||
1004 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. | 1005 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. |
1005 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au | 1006 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au |
1006 | 1007 | ||
1007 | $Id: ChangeLog,v 1.2949 2003/09/04 04:54:39 dtucker Exp $ | 1008 | $Id: ChangeLog,v 1.2950 2003/09/04 05:00:55 dtucker Exp $ |
diff --git a/regress/sftp.sh b/regress/sftp.sh index 17a0a2b99..0e22f8f6b 100644 --- a/regress/sftp.sh +++ b/regress/sftp.sh | |||
@@ -6,24 +6,30 @@ tid="basic sftp put/get" | |||
6 | DATA=/bin/ls${EXEEXT} | 6 | DATA=/bin/ls${EXEEXT} |
7 | COPY=${OBJ}/copy | 7 | COPY=${OBJ}/copy |
8 | 8 | ||
9 | SFTPCMDFILE=${OBJ}/batch | ||
10 | cat >$SFTPCMDFILE <<EOF | ||
11 | version | ||
12 | get $DATA ${COPY}.1 | ||
13 | put $DATA ${COPY}.2 | ||
14 | EOF | ||
15 | |||
9 | BUFFERSIZE="5 1000 32000 64000" | 16 | BUFFERSIZE="5 1000 32000 64000" |
10 | REQUESTS="1 2 10" | 17 | REQUESTS="1 2 10" |
11 | 18 | ||
12 | for B in ${BUFFERSIZE}; do | 19 | for B in ${BUFFERSIZE}; do |
13 | for R in ${REQUESTS}; do | 20 | for R in ${REQUESTS}; do |
14 | verbose "test $tid: buffer_size $B num_requests $R" | 21 | verbose "test $tid: buffer_size $B num_requests $R" |
15 | rm -f ${COPY}.1 ${COPY}.2 | 22 | rm -f ${COPY}.1 ${COPY}.2 |
16 | ${SFTP} -P ${SFTPSERVER} -B $B -R $R -b /dev/stdin \ | 23 | ${SFTP} -P ${SFTPSERVER} -B $B -R $R -b $SFTPCMDFILE \ |
17 | > /dev/null 2>&1 << EOF | 24 | > /dev/null 2>&1 |
18 | version | ||
19 | get $DATA ${COPY}.1 | ||
20 | put $DATA ${COPY}.2 | ||
21 | EOF | ||
22 | r=$? | 25 | r=$? |
23 | if [ $r -ne 0 ]; then | 26 | if [ $r -ne 0 ]; then |
24 | fail "sftp failed with $r" | 27 | fail "sftp failed with $r" |
28 | else | ||
29 | cmp $DATA ${COPY}.1 || fail "corrupted copy after get" | ||
30 | cmp $DATA ${COPY}.2 || fail "corrupted copy after put" | ||
25 | fi | 31 | fi |
26 | cmp $DATA ${COPY}.1 || fail "corrupted copy after get" | ||
27 | cmp $DATA ${COPY}.2 || fail "corrupted copy after put" | ||
28 | done | 32 | done |
29 | done | 33 | done |
34 | rm -f ${COPY}.1 ${COPY}.2 | ||
35 | rm -f $SFTPCMDFILE | ||