Commit f1b148a5 authored by Niels Möller's avatar Niels Möller
Browse files

*** empty log message ***

Rev: doc/TODO:1.66
Rev: src/testsuite/functions.sh:1.1
Rev: src/testsuite/keygen-test:1.3
Rev: src/testsuite/lsh-1-test:1.1
Rev: src/testsuite/lsh-2-test:1.1
Rev: src/testsuite/lsh-3-test:1.1
Rev: src/testsuite/runtests:1.1
Rev: src/testsuite/tcpip-local-test:1.1
parent efdfc095
......@@ -275,10 +275,6 @@ NULL?
Figure out why -nt doesn't work.
In channel_eof() and channel_close(), don't assert() that close or eof
have not been sent already, but instead check the appropriate flags
and do the right thing.
The supplied argp is compiled even if it isn't used.
Move miscellaneous lsh_string-functions from format.c to a separate
......@@ -293,3 +289,6 @@ sexp_get_un.
Extend the GABA: (expr ...) constructions with a single parameter
could be used directly as a command_simple. Extend gaba.scm to do that
automatically.
Add -f, to fork and exit when userauthentication is done and any
tunneling is set up.
# Helper functions for the test scripts.
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
if [ -z "$SERVERFLAGS" ] ; then
SERVERFLAGS=-q
fi
if [ -z "$CLIENTFLAGS" ] ; then
CLIENTFLAGS=-q
fi
PORT=11147
ATEXIT="res=$?"
trap 'eval "$ATEXIT ; exit \$res"' EXIT
function at-exit () {
res=$?
ATEXIT="$ATEXIT ; $1"
return $res
}
function spawn-lshd () {
local delay
../lshd -h $srcdir/key-1.private --interface=localhost \
-p $PORT $SERVERFLAGS --pid-file lshd.$$.pid &
at-exit 'kill `cat lshd.$$.pid`; rm -f lshd.$$.pid'
# Wait a little for lshd to start
for delay in 1 1 1 1 1 5 5 5 20 20 60 60; do
if [ -s lshd.$$.pid ]; then
# And a little more for it to open its port
sleep 5
return
fi
sleep $delay
done
false
}
function run-lsh () {
cmd=$1
shift
echo $cmd | ../lsh $CLIENTFLAGS -nt --sloppy-host-authentication \
--capture-to /dev/null -z -p $PORT "$@" localhost
}
function spawn-lsh () {
# echo spawn-lsh "$@"
../lsh $CLIENTFLAGS -nt --sloppy-host-authentication \
--capture-to /dev/null -z -p $PORT "$@" -N localhost &
at-exit "kill $!"
}
function at-connect () {
mini-inetd -m $2 localhost:$1 -- /bin/sh sh -c "$3" &
at-exit "kill $!"
}
......@@ -3,10 +3,9 @@
# Tests the key generation programs
echo Testing lsh_writekey
echo srcdir = $srcdir
if [ -z "$srcdir" ] ; then
srcdir = `pwd`
srcdir=`pwd`
fi
rm -f foo foo.pub
......
#! /bin/sh
# Tests connecting with lsh. In order to use this, you must already
# have lsh set up so that you can login without password.
# This restriction can be fixed if we add an option to lshd to use a
# custom passwd-file.
echo lsh, test 1
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
spawn-lshd && run-lsh "exit"
#! /bin/sh
# Tests connecting with lsh. In order to use this, you must already
# have lsh set up so that you can login without password.
# This restriction can be fixed if we add an option to lshd to use a
# custom passwd-file.
echo lsh, test 2
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
spawn-lshd && run-lsh "echo Hello world."
#! /bin/sh
# Tests connecting with lsh. In order to use this, you must already
# have lsh set up so that you can login without password.
# This restriction can be fixed if we add an option to lshd to use a
# custom passwd-file.
echo lsh, test 3
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
spawn-lshd && run-lsh "echo Hello world. ; exit"
#! /bin/sh
# Runs the test programs provided on the command line.
failed=0
all=0
if [ -z "$srcdir" ] ; then
srcdir=.
fi
for t in "$@"; do
if [ -s $t ]; then
dir=.
else
dir=$srcdir
fi
if $dir/$t; then
echo "PASS: $t"
else
echo "FAIL: $t"
failed=`expr $failed + 1`
fi
all=`expr $all + 1`
done
if [ $failed -eq 0 ] ; then
banner="All $all tests passed"
else
banner="$failed of $all tests failed"
fi
dashes=`echo "$banner" | sed s/./=/g`
echo "$dashes"
echo "$banner"
echo "$dashes"
[ "$failed" -eq 0 ]
#! /bin/sh
# Tests connecting with lsh. In order to use this, you must already
# have lsh set up so that you can login without password.
# This restriction can be fixed if we add an option to lshd to use a
# custom passwd-file.
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
SERVERPORT=`expr $PORT + 1`
PROXYPORT=`expr $PORT + 2`
at-connect $SERVERPORT 1 'echo foo' \
&& spawn-lshd \
&& spawn-lsh -L $PROXYPORT:localhost:$SERVERPORT \
&& sleep 30; tcpconnect -r </dev/null localhost $PROXYPORT
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