summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/test/nattest
blob: c970877171907f491ed154e493245211fc1221b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
name=$1

. ./ipflib.sh

test_init

if [ $3 = hex ] ; then
	format="-xF $2"
else
	format="-F $2"
fi
if [ "$4" != "" ] ; then
	case $4 in
	-*)
		format="$4 $format"
		;;
	*)
		format="-T $4 $format"
		;;
	esac
fi

echo "$name...";
n=1
/bin/cp /dev/null results/$name
( while read rule; do
	set_core $name $n
	echo "$rule" | ../ipftest $format -DRbN - -i input/$name >>results/$name &
	back=$!
	wait $back
	test_end_leak $?
	n=`expr $n + 1`
	echo "-------------------------------" >> results/$name
done ) < regress/$name
check_results $name
exit $status
OpenPOWER on IntegriCloud