diff options
Diffstat (limited to 'regress/ssh-com-sftp.sh')
-rw-r--r-- | regress/ssh-com-sftp.sh | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/regress/ssh-com-sftp.sh b/regress/ssh-com-sftp.sh index 6ca7dad51..f08018b84 100644 --- a/regress/ssh-com-sftp.sh +++ b/regress/ssh-com-sftp.sh | |||
@@ -1,17 +1,10 @@ | |||
1 | # $OpenBSD: ssh-com-sftp.sh,v 1.4 2003/05/14 22:08:27 markus Exp $ | 1 | # $OpenBSD: ssh-com-sftp.sh,v 1.3 2002/07/16 08:58:16 markus Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="basic sftp put/get with ssh.com server" | 4 | tid="basic sftp put/get with ssh.com server" |
5 | 5 | ||
6 | DATA=/bin/ls${EXEEXT} | 6 | DATA=/bin/ls |
7 | COPY=${OBJ}/copy | 7 | COPY=${OBJ}/copy |
8 | SFTPCMDFILE=${OBJ}/batch | ||
9 | |||
10 | cat >$SFTPCMDFILE <<EOF | ||
11 | version | ||
12 | get $DATA ${COPY}.1 | ||
13 | put $DATA ${COPY}.2 | ||
14 | EOF | ||
15 | 8 | ||
16 | BUFFERSIZE="5 1000 32000 64000" | 9 | BUFFERSIZE="5 1000 32000 64000" |
17 | REQUESTS="1 2 10" | 10 | REQUESTS="1 2 10" |
@@ -33,8 +26,6 @@ VERSIONS=" | |||
33 | 3.0.0 | 26 | 3.0.0 |
34 | 3.1.0 | 27 | 3.1.0 |
35 | 3.2.0 | 28 | 3.2.0 |
36 | 3.2.2 | ||
37 | 3.2.3 | ||
38 | 3.3.0" | 29 | 3.3.0" |
39 | 30 | ||
40 | # go for it | 31 | # go for it |
@@ -48,17 +39,18 @@ for v in ${VERSIONS}; do | |||
48 | for R in ${REQUESTS}; do | 39 | for R in ${REQUESTS}; do |
49 | verbose "test $tid: buffer_size $B num_requests $R" | 40 | verbose "test $tid: buffer_size $B num_requests $R" |
50 | rm -f ${COPY}.1 ${COPY}.2 | 41 | rm -f ${COPY}.1 ${COPY}.2 |
51 | ${SFTP} -P ${server} -B $B -R $R -b $SFTPCMDFILE \ | 42 | ${SFTP} -P ${server} -B $B -R $R -b /dev/stdin \ |
52 | > /dev/null 2>&1 | 43 | > /dev/null 2>&1 << EOF |
44 | version | ||
45 | get $DATA ${COPY}.1 | ||
46 | put $DATA ${COPY}.2 | ||
47 | EOF | ||
53 | r=$? | 48 | r=$? |
54 | if [ $r -ne 0 ]; then | 49 | if [ $r -ne 0 ]; then |
55 | fail "sftp failed with $r" | 50 | fail "sftp failed with $r" |
56 | else | ||
57 | cmp $DATA ${COPY}.1 || fail "corrupted copy after get" | ||
58 | cmp $DATA ${COPY}.2 || fail "corrupted copy after put" | ||
59 | fi | 51 | fi |
52 | cmp $DATA ${COPY}.1 || fail "corrupted copy after get" | ||
53 | cmp $DATA ${COPY}.2 || fail "corrupted copy after put" | ||
60 | done | 54 | done |
61 | done | 55 | done |
62 | done | 56 | done |
63 | rm -f ${COPY}.1 ${COPY}.2 | ||
64 | rm -f $SFTPCMDFILE | ||