src/testsuite/tcpip-local-in-use-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 | # Tests that an "address already in use" error is handled properly. |
| 13 | |
| 14 | at_connect $SERVERPORT 1 'echo foo' \ |
| 15 | && spawn_lshd \ |
| 16 | && run_lsh "echo bar" -L $SERVERPORT:localhost:$SERVERPORT \ |
| 17 | | grep bar \ |
| 18 | && test_success |
| 19 | |
| 20 | test_done |