diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-04-01 22:15:09 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-04-01 22:15:09 +0000 |
commit | cfa68422dd027476309a783a2d563bafee8d24fb (patch) | |
tree | a76fe6032a719e637d83a08d184bb441879d2e5c /regress | |
parent | e9935e63086cc39022a1b657d5062d7f33765768 (diff) |
sftp interop w/ ssh.com servers
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/ssh/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/ssh-com-sftp.sh | 61 |
2 files changed, 63 insertions, 2 deletions
diff --git a/regress/usr.bin/ssh/Makefile b/regress/usr.bin/ssh/Makefile index d64b696cff0..3aa0c834ae4 100644 --- a/regress/usr.bin/ssh/Makefile +++ b/regress/usr.bin/ssh/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.12 2002/03/27 22:40:27 markus Exp $ +# $OpenBSD: Makefile,v 1.13 2002/04/01 22:15:08 markus Exp $ REGRESSTARGETS= t1 t2 t3 t4 t5 t6 t7 @@ -28,7 +28,7 @@ CLEANFILES+= authorized_keys_${USER} known_hosts pidfile \ rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ ls.copy -#LTESTS+= ssh-com ssh-com-client ssh-com-keygen +#LTESTS+= ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp t1: ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv diff --git a/regress/usr.bin/ssh/ssh-com-sftp.sh b/regress/usr.bin/ssh/ssh-com-sftp.sh new file mode 100644 index 00000000000..7350960f0b1 --- /dev/null +++ b/regress/usr.bin/ssh/ssh-com-sftp.sh @@ -0,0 +1,61 @@ +# $OpenBSD: ssh-com-sftp.sh,v 1.1 2002/04/01 22:15:08 markus Exp $ +# Placed in the Public Domain. + +tid="basic sftp put/get with ssh.com server" + +DATA=/bin/ls +COPY=${OBJ}/copy + +BUFFERSIZE="5 1000 32000 64000" +REQUESTS="1 2 10" + +#TEST_COMBASE=/path/to/ssh/com/binaries +if [ "X${TEST_COMBASE}" = "X" ]; then + fatal '$TEST_COMBASE is not set' +fi + +VERSIONS=" + 2.0.10 + 2.0.12 + 2.0.13 + 2.1.0 + 2.2.0 + 2.3.0 + 2.3.1 + 2.4.0 + 3.0.0 + 3.1.0" + +# go for it +for v in ${VERSIONS}; do + server=${TEST_COMBASE}/${v}/sftp-server2 + if [ ! -x ${server} ]; then + continue + fi + verbose "sftp-server $v" + for B in ${BUFFERSIZE}; do + if [ $B -ge 32000 ] ; then + case $v in + 2.0.1[012]) + echo continue + ;; + esac + fi + for R in ${REQUESTS}; do + verbose "test $tid: buffer_size $B num_requests $R" + rm -f ${COPY}.1 ${COPY}.2 + ${SFTP} -P ${server} -B $B -R $R -b /dev/stdin \ + > /dev/null 2>&1 << EOF + version + get $DATA ${COPY}.1 + put $DATA ${COPY}.2 +EOF + r=$? + if [ $r -ne 0 ]; then + fail "sftp failed with $r" + fi + cmp $DATA ${COPY}.1 || fail "corrupted copy after get" + cmp $DATA ${COPY}.2 || fail "corrupted copy after put" + done + done +done |