summaryrefslogtreecommitdiff
path: root/regress/ssh-com-sftp.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-09-04 15:26:57 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-09-04 15:26:57 +1000
commitbd05609dff890e0667015d91591ef6630276804b (patch)
treeb5ca22a7367744533de7f2d337cafa6c57c006c4 /regress/ssh-com-sftp.sh
parent4735115e4d966f5347e6f3ea0ea10797f37e4034 (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.sh22
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
6DATA=/bin/ls${EXEEXT} 6DATA=/bin/ls${EXEEXT}
7COPY=${OBJ}/copy 7COPY=${OBJ}/copy
8SFTPCMDFILE=${OBJ}/batch
9
10cat >$SFTPCMDFILE <<EOF
11version
12get $DATA ${COPY}.1
13put $DATA ${COPY}.2
14EOF
8 15
9BUFFERSIZE="5 1000 32000 64000" 16BUFFERSIZE="5 1000 32000 64000"
10REQUESTS="1 2 10" 17REQUESTS="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
49EOF
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
58done 62done
63rm -f ${COPY}.1 ${COPY}.2
64rm -f $SFTPCMDFILE