diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-09-04 15:26:57 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-09-04 15:26:57 +1000 |
commit | bd05609dff890e0667015d91591ef6630276804b (patch) | |
tree | b5ca22a7367744533de7f2d337cafa6c57c006c4 /regress/ssh-com-sftp.sh | |
parent | 4735115e4d966f5347e6f3ea0ea10797f37e4034 (diff) |
- [regress/ssh-com-sftp.sh] Remove dependency on /dev/stdin.
Diffstat (limited to 'regress/ssh-com-sftp.sh')
-rw-r--r-- | regress/ssh-com-sftp.sh | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/regress/ssh-com-sftp.sh b/regress/ssh-com-sftp.sh index 760cc9057..6ca7dad51 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" | |||
5 | 5 | ||
6 | DATA=/bin/ls${EXEEXT} | 6 | DATA=/bin/ls${EXEEXT} |
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 | ||
8 | 15 | ||
9 | BUFFERSIZE="5 1000 32000 64000" | 16 | BUFFERSIZE="5 1000 32000 64000" |
10 | REQUESTS="1 2 10" | 17 | REQUESTS="1 2 10" |
@@ -41,18 +48,17 @@ for v in ${VERSIONS}; do | |||
41 | for R in ${REQUESTS}; do | 48 | for R in ${REQUESTS}; do |
42 | verbose "test $tid: buffer_size $B num_requests $R" | 49 | verbose "test $tid: buffer_size $B num_requests $R" |
43 | rm -f ${COPY}.1 ${COPY}.2 | 50 | rm -f ${COPY}.1 ${COPY}.2 |
44 | ${SFTP} -P ${server} -B $B -R $R -b /dev/stdin \ | 51 | ${SFTP} -P ${server} -B $B -R $R -b $SFTPCMDFILE \ |
45 | > /dev/null 2>&1 << EOF | 52 | > /dev/null 2>&1 |
46 | version | ||
47 | get $DATA ${COPY}.1 | ||
48 | put $DATA ${COPY}.2 | ||
49 | EOF | ||
50 | r=$? | 53 | r=$? |
51 | if [ $r -ne 0 ]; then | 54 | if [ $r -ne 0 ]; then |
52 | fail "sftp failed with $r" | 55 | 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" | ||
53 | fi | 59 | fi |
54 | cmp $DATA ${COPY}.1 || fail "corrupted copy after get" | ||
55 | cmp $DATA ${COPY}.2 || fail "corrupted copy after put" | ||
56 | done | 60 | done |
57 | done | 61 | done |
58 | done | 62 | done |
63 | rm -f ${COPY}.1 ${COPY}.2 | ||
64 | rm -f $SFTPCMDFILE | ||