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

New test case.

Rev: src/testsuite/lshg-tcpip-remote-test:1.1
parent d6013982
#! /bin/sh
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
need_tcputils
SERVERPORT=`expr $PORT + 1`
PROXYPORT=`expr $PORT + 2`
# The delay is needed because -B doesn't wait for other actions, such
# as -R, to complete.
# For some reason, tcpconnect < /dev/null doesn't work on SunOS-5.4. Hence
# the appearantly unneeded use of cat.
at_connect $SERVERPORT 1 'echo foo' \
&& spawn_lshd \
&& spawn_lsh --start-gateway \
&& spawn_lshg -R $PROXYPORT:localhost:$SERVERPORT \
&& sleep 30 \
&& cat /dev/null | tcpconnect localhost $PROXYPORT | grep foo \
&& kill `cat $LSHG_PIDFILE` \
&& sleep 5 \
&& if tcpconnect </dev/null -i localhost $PROXYPORT ; then false ; else test_success ; fi
test_done
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