Commit 8dab84cd authored by Niels Möller's avatar Niels Möller

* src/testsuite/Makefile.am (TS_MORE_SH): New test

ssh1-fallback-test.

Rev: src/testsuite/Makefile.am:1.26.2.1
Rev: src/testsuite/fake-sshd1:1.1.2.1
Rev: src/testsuite/ssh1-fallback-test:1.1.2.1
parents 457bbb8e 3831bfc0
......@@ -11,7 +11,7 @@ TS_SOME = $(TS_PROGS) $(TS_SH)
# Tests that require that lsh is set up for password-less login.
TS_MORE_SH = lsh-1-test lsh-2-test lsh-3-test lsh-4-test lsh-5-test \
lsh-cat-test tcpip-local-test tcpip-remote-test \
lshg-tcpip-local-test
lshg-tcpip-local-test ssh1-fallback-test
TS_MORE_PROGS =
TS_ALL = $(TS_PROGS) $(TS_SH) $(TS_MORE_PROGS) $(TS_MORE_SH)
......
#! /bin/sh
# Fake ssh-server for use by the ssh1-fallback-test
inet_mode=no
version=''
echo 1>&2 fake-sshd1: starting
echo 1>&2 nargs = $#, args = "$@"
while [ $# -ne 0 ] ; do
case "$1" in
-i)
inet_mode=yes
;;
-V)
shift
version=$1
;;
*)
echo 1>&2 fake-sshd1: Invalid argument "$1"
exit 1
;;
esac
shift
done
echo 1>&2 fake-sshd1: Received version "$version"
echo 1>&2 fake-sshd1: inet_mode = "$inet_mode"
if [ "$inet_mode" != yes ] ; then exit 1; fi
case "$version" in
SSH-1.*)
echo SSH-1.99-fake-sshd1
echo a-packet
;;
*)
exit 1
;;
esac
#! /bin/sh
# Tests the ssh-1 fallback mechanism
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
spawn_lshd --ssh1-fallback=$srcdir/fake-sshd1 \
&& echo "SSH-1.5-ssh1-fallback-test" \
| tcpconnect localhost $PORT \
| grep -q a-packet && test_success
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment