diff options
author | jkim <jkim@FreeBSD.org> | 2008-08-26 00:35:04 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2008-08-26 00:35:04 +0000 |
commit | 12fb66e68ac5f896c6a33dd02a730c9207d099f9 (patch) | |
tree | 0c03a35b286aa4585e701016ac849a11901642ef | |
parent | 26636164302e6c1b9df4a2884118e8305176d77f (diff) | |
download | FreeBSD-src-12fb66e68ac5f896c6a33dd02a730c9207d099f9.zip FreeBSD-src-12fb66e68ac5f896c6a33dd02a730c9207d099f9.tar.gz |
Remove some hacks from regression test since bpf_filter.c builds fine now.
-rw-r--r-- | tools/regression/bpf/bpf_filter/Makefile | 8 | ||||
-rw-r--r-- | tools/regression/bpf/bpf_filter/bpf_test.c | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/tools/regression/bpf/bpf_filter/Makefile b/tools/regression/bpf/bpf_filter/Makefile index 5be486d..a777e70 100644 --- a/tools/regression/bpf/bpf_filter/Makefile +++ b/tools/regression/bpf/bpf_filter/Makefile @@ -20,11 +20,13 @@ TEST_CASES= test0001 test0002 test0003 test0004 \ test0069 test0070 test0071 test0072 \ test0073 test0074 +WARNS?= 6 + SYSDIR?= ${.CURDIR}/../../../../sys SRCS= ${.CURDIR}/bpf_test.c -CFLAGS+= -g -fno-builtin-abort -I${.CURDIR}/tests +CFLAGS+= -g -I${SYSDIR} -I${.CURDIR}/tests .if defined(BPF_BENCHMARK) CFLAGS+= -DBPF_BENCHMARK -DLOG_LEVEL=0 @@ -39,11 +41,9 @@ CFLAGS+= -DBPF_VALIDATE .if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386") && defined(BPF_JIT) SRCS+= ${SYSDIR}/net/bpf_jitter.c \ ${SYSDIR}/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c -CFLAGS+= -I${SYSDIR} -DBPF_JIT_COMPILER -WARNS?= 6 +CFLAGS+= -DBPF_JIT_COMPILER .else SRCS+= ${SYSDIR}/net/bpf_filter.c -WARNS?= 1 .endif .for TEST in ${TEST_CASES} diff --git a/tools/regression/bpf/bpf_filter/bpf_test.c b/tools/regression/bpf/bpf_filter/bpf_test.c index 31a2043..d8b46ef 100644 --- a/tools/regression/bpf/bpf_filter/bpf_test.c +++ b/tools/regression/bpf/bpf_filter/bpf_test.c @@ -52,7 +52,10 @@ __FBSDID("$FreeBSD$"); static void sig_handler(int); +#if defined(BPF_JIT_COMPILER) || defined(BPF_VALIDATE) static int nins = sizeof(pc) / sizeof(pc[0]); +#endif + static int verbose = LOG_LEVEL; #ifdef BPF_JIT_COMPILER @@ -86,10 +89,6 @@ bpf_compile_and_filter(void) return (ret); } -#else - -u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int); - #endif #ifdef BPF_VALIDATE @@ -155,7 +154,7 @@ bpf_validate(const struct bpf_insn *f, int len) int main(void) { -#if !defined(BPF_JIT_COMPILER) +#ifndef BPF_JIT_COMPILER u_int i; #endif u_int ret; |