[netfilter-cvslog] r4141 - trunk/nfsim-testsuite
rusty at netfilter.org
rusty at netfilter.org
Thu Jul 21 03:58:45 CEST 2005
Author: rusty at netfilter.org
Date: 2005-07-21 03:58:43 +0200 (Thu, 21 Jul 2005)
New Revision: 4141
Modified:
trunk/nfsim-testsuite/test-kernel-source
Log:
Make --gcov option rather than --no-gcov option.
Unfortunately, gcov does not work with shared libs, and building things in means most tests don't pass.
Modified: trunk/nfsim-testsuite/test-kernel-source
===================================================================
--- trunk/nfsim-testsuite/test-kernel-source 2005-07-20 15:47:04 UTC (rev 4140)
+++ trunk/nfsim-testsuite/test-kernel-source 2005-07-21 01:58:43 UTC (rev 4141)
@@ -10,11 +10,7 @@
{
cd ../nfsim || return 1
make distclean >/dev/null 2>&1
- if [ -n "$NO_GCOV" ]; then
- ./configure --kerneldir=$1 || return 1
- else
- ./configure --gcov --kerneldir=$1 || return 1
- fi
+ ./configure $GCOV_OPTION --kerneldir=$1 || return 1
make --quiet || return 1
cp simulator $2
}
@@ -32,20 +28,20 @@
# Simple signature of relevent kernel source & env vars.
kernel_signature()
{
- # $CC and $GCOV effect compilation, as does .config
- (echo $CC; echo $GCOV; cat $1/.config 2>/dev/null; find $1/include/linux/netfilter_ipv4 $1/net/ipv4/netfilter -name '*.[ch]' -exec cat {} \;) | md5sum | cut -c1-32
+ # $CC and $GCOV_OPTION effect compilation, as does .config
+ (echo $CC; echo $GCOV_OPTION; cat $1/.config 2>/dev/null; find $1/include/linux/netfilter_ipv4 $1/net/ipv4/netfilter -name '*.[ch]' -exec cat {} \;) | md5sum | cut -c1-32
}
usage()
{
- echo "Usage: $0 [--no-gcov] <test.sh args> <kerneldir> [test]" >&2
+ echo "Usage: $0 [--gcov] <test.sh args> <kerneldir> [test]" >&2
echo "Compiles up nfsim for the kernel version give, and runs the tests across it" >&2
exit 1
}
while true; do
case "$1" in
- --no-gcov) NO_GCOV=1; shift;;
+ --gcov) GCOV_OPTION=--gcov; shift;;
-*) EXTRA_ARGS="$1 $EXTRA_ARGS"; shift;;
*) break;;
esac
@@ -93,11 +89,18 @@
EXTRA_ARGS="--ignore-proc-issues $EXTRA_ARGS"
fi
+# warn_if_extra_mangle ignores failures from ip_route_output_key, which
+# makes failtest complain. Suppress reporting from that in kernels with
+# warn_if_extra_mangle (it's a temporary hack).
+if grep -q warn_if_extra_mangle $1/net/ipv4/netfilter/ip_nat_rule.c; then
+ EXTRA_ARGS="--failtest-no-report=__ip_route_output_key $EXTRA_ARGS"
+fi
+
echo Running tests...
./test.sh $EXTRA_ARGS --nfsim=$NFSIM $TEST || barf Tests failed for $1
-if [ -z "$NO_GCOV" ]; then
- echo "Generating gcov results (optional)..."
+if [ -n "$GCOV_OPTION" ]; then
+ echo "Generating gcov results..."
(cd ../nfsim; make --quiet gcov > /dev/null) || barf Failed to run gcov for $1
FILES=`find ../nfsim -name '*.gcov'`
TESTED_LINES=`cat $FILES | grep -c '^[ 0-9]*:'`
More information about the netfilter-cvslog
mailing list