]> andersk Git - gssapi-openssh.git/blame - openssh/regress/ssh-com-sftp.sh
Import of OpenSSH 3.6.1p1
[gssapi-openssh.git] / openssh / regress / ssh-com-sftp.sh
CommitLineData
6a9b3198 1# $OpenBSD: ssh-com-sftp.sh,v 1.3 2002/07/16 08:58:16 markus Exp $
700318f3 2# Placed in the Public Domain.
3
4tid="basic sftp put/get with ssh.com server"
5
6DATA=/bin/ls
7COPY=${OBJ}/copy
8
9BUFFERSIZE="5 1000 32000 64000"
10REQUESTS="1 2 10"
11
12#TEST_COMBASE=/path/to/ssh/com/binaries
13if [ "X${TEST_COMBASE}" = "X" ]; then
14 fatal '$TEST_COMBASE is not set'
15fi
16
17VERSIONS="
18 2.0.10
19 2.0.12
20 2.0.13
21 2.1.0
22 2.2.0
23 2.3.0
24 2.3.1
25 2.4.0
26 3.0.0
6a9b3198 27 3.1.0
28 3.2.0
29 3.3.0"
700318f3 30
31# go for it
32for v in ${VERSIONS}; do
33 server=${TEST_COMBASE}/${v}/sftp-server2
34 if [ ! -x ${server} ]; then
35 continue
36 fi
37 verbose "sftp-server $v"
38 for B in ${BUFFERSIZE}; do
39 for R in ${REQUESTS}; do
40 verbose "test $tid: buffer_size $B num_requests $R"
41 rm -f ${COPY}.1 ${COPY}.2
42 ${SFTP} -P ${server} -B $B -R $R -b /dev/stdin \
43 > /dev/null 2>&1 << EOF
44 version
45 get $DATA ${COPY}.1
46 put $DATA ${COPY}.2
47EOF
48 r=$?
49 if [ $r -ne 0 ]; then
50 fail "sftp failed with $r"
51 fi
52 cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
53 cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
54 done
55 done
56done
This page took 0.06319 seconds and 5 git commands to generate.