Module Name:    src
Committed By:   pgoyette
Date:           Sat Jul  7 23:29:44 UTC 2012

Modified Files:
        src/tests/ipf: t_filter_exec.sh t_nat_ipf_exec.sh

Log Message:
Re-enable some of the ipf tests.  The only thing wrong with these tests
is that the tests were not re-imported with the rest of ipfilter 5.1.1

XXX There are still some more ipf test failures that need to get resolved,
XXX but at least we'll get some of them back just in case we have a
XXX regression.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/ipf/t_filter_exec.sh \
    src/tests/ipf/t_nat_ipf_exec.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/ipf/t_filter_exec.sh
diff -u src/tests/ipf/t_filter_exec.sh:1.6 src/tests/ipf/t_filter_exec.sh:1.7
--- src/tests/ipf/t_filter_exec.sh:1.6	Tue Mar 27 09:27:33 2012
+++ src/tests/ipf/t_filter_exec.sh	Sat Jul  7 23:29:44 2012
@@ -1,4 +1,4 @@
-# $NetBSD: t_filter_exec.sh,v 1.6 2012/03/27 09:27:33 jruoho Exp $
+# $NetBSD: t_filter_exec.sh,v 1.7 2012/07/07 23:29:44 pgoyette Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -33,10 +33,22 @@
 dotest()
 {
 	h_copydata $1
+	infmt=$2
+	outfmt=$3
+	shift
+	shift
+	shift
+	args=$@
+
+	if [ $outfmt = hex ] ; then
+		output=-x
+	else
+		output=
+	fi
 
 	{ while read rule; do
 		atf_check -x "echo \"$rule\" | ipftest -F \
-$2 -Rbr - -i in $4 $5 >>out"
+$infmt $output -Rbr - -i in $args >>out"
 		echo "--------" >>out
 	done; } <reg
 
@@ -46,8 +58,21 @@ $2 -Rbr - -i in $4 $5 >>out"
 mtest()
 {
 	h_copydata $1
+	infmt=$2
+	outfmt=$3
+	shift
+	shift
+	shift
+	args=$@
+
+	if [ $outfmt = hex ] ; then
+		output=-x
+	else
+		output=
+	fi
 
-	atf_check -o save:out ipftest -F $2 -Rbr reg -i in
+
+	atf_check -o save:out ipftest -F $infmt $output -Rbr reg -i in $args
 	echo "--------" >>out
 
 	diff -u exp out || atf_fail "results differ"
@@ -56,13 +81,26 @@ mtest()
 dotest6()
 {
 	h_copydata $(echo ${1} | tr _ .)
+	infmt=$2
+	outfmt=$3
+	shift
+	shift
+	shift
+	args=$@
+
+	if [ $outfmt = hex ] ; then
+		output=-x
+	else
+		output=
+	fi
+
 
 	ipftest -6 -r /dev/null -i /dev/null >/dev/null 2>&1 \
 	    || atf_skip "skipping IPv6 tests"
 
 	{ while read rule; do
 		atf_check -o save:save -x "echo \"$rule\" | \
-ipftest -F $2 -6br - -i in"
+ipftest -F $infmt $output -6br - -i in $args"
 		cat save >>out
 		echo "--------" >>out
 	done; } <reg
@@ -87,10 +125,14 @@ test_case f14 dotest text text
 test_case f15 mtest text text
 test_case f16 mtest text text
 test_case f17 mtest hex hex
-broken_test_case f18 mtest text text
-#broken_test_case f19 dotest text text -T fr_statemax=3
+test_case f18 mtest text text -D
+test_case f19 dotest text text -T state_max=3
 test_case f20 mtest text text
 test_case f24 mtest hex text
+test_case f25 mtest hex text -D
+test_case f26 dotest text text
+test_case f27 dotest hex text
+test_case f30 dotest text text
 test_case ipv6_1 dotest6 hex hex
 test_case ipv6_2 dotest6 hex hex
 test_case ipv6_3 dotest6 hex hex
@@ -117,13 +159,17 @@ atf_init_test_cases()
 	atf_add_test_case f16
 	atf_add_test_case f17
 	atf_add_test_case f18
+	atf_add_test_case f19
 	atf_add_test_case f20
 	atf_add_test_case f24
+	atf_add_test_case f25
+	atf_add_test_case f26
+	atf_add_test_case f27
+	atf_add_test_case f30
 	atf_add_test_case ipv6_1
 	atf_add_test_case ipv6_2
 	atf_add_test_case ipv6_3
 	atf_add_test_case ipv6_5
 	atf_add_test_case ipv6_6
 
-	#atf_add_test_case f19
 }
Index: src/tests/ipf/t_nat_ipf_exec.sh
diff -u src/tests/ipf/t_nat_ipf_exec.sh:1.6 src/tests/ipf/t_nat_ipf_exec.sh:1.7
--- src/tests/ipf/t_nat_ipf_exec.sh:1.6	Tue Mar 27 09:27:33 2012
+++ src/tests/ipf/t_nat_ipf_exec.sh	Sat Jul  7 23:29:44 2012
@@ -1,4 +1,4 @@
-# $NetBSD: t_nat_ipf_exec.sh,v 1.6 2012/03/27 09:27:33 jruoho Exp $
+# $NetBSD: t_nat_ipf_exec.sh,v 1.7 2012/07/07 23:29:44 pgoyette Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -35,24 +35,32 @@ natipftest()
 	h_copydata $1
 	cp $(atf_get_srcdir)/regress/$1.nat nat
 	cp $(atf_get_srcdir)/regress/$1.ipf ipf
+	many=$2
+	infmt=$3
+	outfmt=$4
+	shift
+	shift
+	shift
+	shift
+	args=$@
 
-	if [ $4 = hex ] ; then
-		format="-xF $3"
+	if [ $outfmt = hex ] ; then
+		format="-xF $infmt"
 	else
-		format="-F $3"
+		format="-F $infmt"
 	fi
 
-	case $2 in
+	case $many in
 	single)
 		{ while read rule; do
 			atf_check -o save:save -x "echo \"$rule\" | \
-ipftest -R $5 $6 $format -b -r ipf -N - -i in"
+ipftest -R $format -b -r ipf -N - -i in $args"
 			cat save >>out
 			echo "-------------------------------" >>out
 		done; } <nat
 		;;
 	multi)
-		atf_check -o save:out ipftest -R $5 $6 \
+		atf_check -o save:out ipftest -R $args \
 			$format -b -r ipf -N nat -i in
 		echo "-------------------------------" >>out
 		;;
@@ -61,24 +69,26 @@ ipftest -R $5 $6 $format -b -r ipf -N - 
 	diff -u exp out || atf_fail "results differ"
 }
 
-broken_test_case ni1 natipftest multi hex hex -T fr_update_ipid=1
-broken_test_case ni2 natipftest single hex hex -T fr_update_ipid=1
-broken_test_case ni3 natipftest single hex hex -T fr_update_ipid=1
-broken_test_case ni4 natipftest single hex hex -T fr_update_ipid=1
-#broken_test_case ni5 natipftest single hex hex -T fr_update_ipid=1
-broken_test_case ni6 natipftest multi hex hex -T fr_update_ipid=1
-broken_test_case ni7 natipftest single hex hex -T fr_update_ipid=1
-broken_test_case ni8 natipftest single hex hex -T fr_update_ipid=1
-broken_test_case ni9 natipftest single hex hex -T fr_update_ipid=1
-#broken_test_case ni10 natipftest single hex hex -T fr_update_ipid=1
-#broken_test_case ni11 natipftest single hex hex -T fr_update_ipid=1
-#broken_test_case ni12 natipftest single hex hex -T fr_update_ipid=1
-broken_test_case ni13 natipftest single hex hex -T fr_update_ipid=1
-broken_test_case ni14 natipftest single hex hex -T fr_update_ipid=1
-broken_test_case ni15 natipftest single hex hex -T fr_update_ipid=1
-broken_test_case ni16 natipftest single hex hex -T fr_update_ipid=1
-#broken_test_case ni19 natipftest single hex hex -T fr_update_ipid=0
-#broken_test_case ni20 natipftest single hex hex -T fr_update_ipid=0
+test_case ni1 natipftest multi hex hex -T update_ipid=1
+test_case ni2 natipftest single hex hex -T update_ipid=1
+test_case ni3 natipftest single hex hex -T update_ipid=1
+test_case ni4 natipftest single hex hex -T update_ipid=1
+test_case ni5 natipftest single hex hex -T update_ipid=1
+test_case ni6 natipftest multi hex text -T update_ipid=1 -D
+test_case ni7 natipftest single hex hex -T update_ipid=1
+test_case ni8 natipftest single hex hex -T update_ipid=1
+test_case ni9 natipftest single hex hex -T update_ipid=1
+test_case ni10 natipftest single hex hex -T update_ipid=1
+test_case ni11 natipftest single hex hex -T update_ipid=1
+test_case ni12 natipftest single hex hex -T update_ipid=1
+test_case ni13 natipftest single hex hex -T update_ipid=1
+test_case ni14 natipftest single hex hex -T update_ipid=1
+test_case ni15 natipftest single hex hex -T update_ipid=1
+test_case ni16 natipftest single hex hex -T update_ipid=1
+test_case ni17 natipftest multi text text
+test_case ni18 natipftest multi text text
+test_case ni19 natipftest single hex hex -T update_ipid=0
+test_case ni20 natipftest single hex hex -T update_ipid=0 -D
 test_case ni21 natipftest multi text text
 test_case ni23 natipftest multi text text -D
 
@@ -88,21 +98,23 @@ atf_init_test_cases()
 	atf_add_test_case ni2
 	atf_add_test_case ni3
 	atf_add_test_case ni4
+	atf_add_test_case ni5
 	atf_add_test_case ni6
 	atf_add_test_case ni7
 	atf_add_test_case ni8
 	atf_add_test_case ni9
+	atf_add_test_case ni10
+	atf_add_test_case ni11
+	atf_add_test_case ni12
 	atf_add_test_case ni13
 	atf_add_test_case ni14
 	atf_add_test_case ni15
 	atf_add_test_case ni16
+	atf_add_test_case ni17
+	atf_add_test_case ni18
+	atf_add_test_case ni19
+	atf_add_test_case ni20
 	atf_add_test_case ni21
 	atf_add_test_case ni23
 
-	#atf_add_test_case ni5
-	#atf_add_test_case ni10
-	#atf_add_test_case ni11
-	#atf_add_test_case ni12
-	#atf_add_test_case ni19
-	#atf_add_test_case ni20
 }

Reply via email to