random-input-test 433 Bytes
Newer Older
Niels Möller's avatar
Niels Möller committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh

if [ -z "$srcdir" ] ; then
  srcdir=`pwd`
fi

. $srcdir/functions.sh

PORT=5555

werror "Testing lshd with random input"

spawn_lshd

for seed in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
    werror "Trying seed $seed"
    ../nettle/examples/lfib-stream $seed \
        | tcpconnect $INTERFACE $PORT > /dev/null \
	|| die "Connect failed"

    kill -0 `cat $PIDFILE` || die "Server died"
done

test_success