1 # $OpenBSD: ssh-com-sftp.sh,v 1.2 2002/04/10 08:45:30 markus Exp $
2 # Placed in the Public Domain.
4 tid="basic sftp put/get with ssh.com server"
9 BUFFERSIZE="5 1000 32000 64000"
12 #TEST_COMBASE=/path/to/ssh/com/binaries
13 if [ "X${TEST_COMBASE}" = "X" ]; then
14 fatal '$TEST_COMBASE is not set'
30 for v in ${VERSIONS}; do
31 server=${TEST_COMBASE}/${v}/sftp-server2
32 if [ ! -x ${server} ]; then
35 verbose "sftp-server $v"
36 for B in ${BUFFERSIZE}; do
37 for R in ${REQUESTS}; do
38 verbose "test $tid: buffer_size $B num_requests $R"
39 rm -f ${COPY}.1 ${COPY}.2
40 ${SFTP} -P ${server} -B $B -R $R -b /dev/stdin \
41 > /dev/null 2>&1 << EOF
48 fail "sftp failed with $r"
50 cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
51 cmp $DATA ${COPY}.2 || fail "corrupted copy after put"