Module Name:    src
Committed By:   martin
Date:           Thu May 16 07:20:29 UTC 2013

Modified Files:
        src/tests/ipf: h_common.sh t_nat_exec.sh

Log Message:
Assume that the NAT failures that happen on some architectures are endianess
bugs, so do not expect failure on LE archs for now.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/ipf/h_common.sh
cvs rdiff -u -r1.16 -r1.17 src/tests/ipf/t_nat_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/h_common.sh
diff -u src/tests/ipf/h_common.sh:1.7 src/tests/ipf/h_common.sh:1.8
--- src/tests/ipf/h_common.sh:1.7	Sat Dec  1 04:43:44 2012
+++ src/tests/ipf/h_common.sh	Thu May 16 07:20:29 2013
@@ -1,4 +1,4 @@
-# $NetBSD: h_common.sh,v 1.7 2012/12/01 04:43:44 pgoyette Exp $
+# $NetBSD: h_common.sh,v 1.8 2013/05/16 07:20:29 martin Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -75,3 +75,26 @@ failing_test_case()
 		${check_function} '${name}' " "${@}" "; \
 	}"
 }
+
+failing_test_case_be()
+{
+	# this test fails on some architectures - not fully analyzed, assume
+	# an endianess bug
+	local name="${1}"; shift
+	local check_function="${1}"; shift
+	local reason="${1}"; shift
+
+	atf_test_case "${name}"
+
+	if [ `sysctl -n hw.byteorder` = 4321 ]; then
+		eval "${name}_body() { \
+			atf_expect_fail '${reason}'; \
+			${check_function} '${name}' " "${@}" "; \
+		}"
+	else
+		eval "${name}_body() { \
+			${check_function} '${name}' " "${@}" "; \
+		}"
+	fi
+}
+

Index: src/tests/ipf/t_nat_exec.sh
diff -u src/tests/ipf/t_nat_exec.sh:1.16 src/tests/ipf/t_nat_exec.sh:1.17
--- src/tests/ipf/t_nat_exec.sh:1.16	Tue Mar 19 13:23:58 2013
+++ src/tests/ipf/t_nat_exec.sh	Thu May 16 07:20:29 2013
@@ -1,4 +1,4 @@
-# $NetBSD: t_nat_exec.sh,v 1.16 2013/03/19 13:23:58 martin Exp $
+# $NetBSD: t_nat_exec.sh,v 1.17 2013/05/16 07:20:29 martin Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -67,13 +67,13 @@ test_case n4 nattest text text
 test_case n5 nattest text text
 test_case n6 nattest text text
 test_case n7 nattest text text
-failing_test_case n8 nattest "See PR kern/47665" hex hex -T update_ipid=0
-failing_test_case n9 nattest "See PR kern/47665" hex hex -T update_ipid=0
+failing_test_case_be n8 nattest "See PR kern/47665" hex hex -T update_ipid=0
+failing_test_case_be n9 nattest "See PR kern/47665" hex hex -T update_ipid=0
 test_case n10 nattest hex hex -T update_ipid=0
 test_case n11 nattest text text
 failing_test_case n12 nattest "Known to be broken" hex hex -T update_ipid=0 -v
 test_case n13 nattest text text
-failing_test_case n14 nattest "See PR kern/47665" text text
+failing_test_case_be n14 nattest "See PR kern/47665" text text
 test_case n15 nattest text text -T update_ipid=0
 test_case n16 nattest hex hex -D
 test_case n17 nattest hex hex -D

Reply via email to