Debian Codegraph @

src/testsuite/tcpip-remote-test

raw
1 #! /bin/sh
2
3 if [ -z "$srcdir" ] ; then
4 srcdir=`pwd`
5 fi
6
7 . $srcdir/functions.sh
8
9 SERVERPORT=`expr $PORT + 1`
10 PROXYPORT=`expr $PORT + 2`
11
12 # The delay is needed because -B doesn't wait for other actions, such
13 # as -R, to complete.
14
15 # For some reason, tcpconnect < /dev/null doesn't work on SunOS-5.4. Hence
16 # the appearantly unneeded use of cat.
17 at_connect $SERVERPORT 1 'echo foo' \
18 && spawn_lshd \
19 && spawn_lsh -R $PROXYPORT:localhost:$SERVERPORT \
20 && sleep 30 \
21 && cat /dev/null | ./tcpconnect localhost $PROXYPORT | grep foo \
22 && test_success
23
24 test_done