head	1.14;
access;
symbols
	RELENG_8_4:1.14.0.2
	RELENG_9_1_0_RELEASE:1.13.2.1.4.2
	RELENG_9_1:1.13.2.1.0.4
	RELENG_9_1_BP:1.13.2.1
	RELENG_8_3_0_RELEASE:1.11.2.1.8.1
	RELENG_8_3:1.11.2.1.0.8
	RELENG_8_3_BP:1.11.2.1
	RELENG_9_0_0_RELEASE:1.13.2.1.2.1
	RELENG_9_0:1.13.2.1.0.2
	RELENG_9_0_BP:1.13.2.1
	RELENG_9:1.13.0.2
	RELENG_9_BP:1.13
	RELENG_8_2_0_RELEASE:1.11.2.1.6.1
	RELENG_8_2:1.11.2.1.0.6
	RELENG_8_2_BP:1.11.2.1
	RELENG_8_1_0_RELEASE:1.11.2.1.4.1
	RELENG_8_1:1.11.2.1.0.4
	RELENG_8_1_BP:1.11.2.1
	RELENG_8_0_0_RELEASE:1.11.2.1.2.1
	RELENG_8_0:1.11.2.1.0.2
	RELENG_8_0_BP:1.11.2.1
	RELENG_8:1.11.0.2
	RELENG_8_BP:1.11;
locks; strict;
comment	@# @;


1.14
date	2012.11.17.01.53.45;	author svnexp;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2009.11.20.18.53.38;	author jkim;	state Exp;
branches
	1.13.2.1;
next	1.12;

1.12
date	2009.11.19.00.00.31;	author jkim;	state Exp;
branches;
next	1.11;

1.11
date	2008.08.29.20.58.01;	author jkim;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2008.08.29.20.20.30;	author jkim;	state Exp;
branches;
next	1.9;

1.9
date	2008.08.29.02.12.45;	author jkim;	state Exp;
branches;
next	1.8;

1.8
date	2008.08.28.16.58.30;	author jkim;	state Exp;
branches;
next	1.7;

1.7
date	2008.08.26.21.54.47;	author jkim;	state Exp;
branches;
next	1.6;

1.6
date	2008.08.26.19.24.58;	author jkim;	state Exp;
branches;
next	1.5;

1.5
date	2008.08.26.00.35.04;	author jkim;	state Exp;
branches;
next	1.4;

1.4
date	2008.08.25.23.36.24;	author jkim;	state Exp;
branches;
next	1.3;

1.3
date	2008.08.25.22.45.18;	author jkim;	state Exp;
branches;
next	1.2;

1.2
date	2008.08.18.23.05.19;	author jkim;	state Exp;
branches;
next	1.1;

1.1
date	2008.08.18.19.01.58;	author jkim;	state Exp;
branches;
next	;

1.14.2.1
date	2012.11.17.01.53.45;	author svnexp;	state dead;
branches;
next	1.14.2.2;

1.14.2.2
date	2013.03.28.13.05.48;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.13.2.1.2.1
	1.13.2.1.4.1;
next	1.13.2.2;

1.13.2.2
date	2012.11.17.11.37.28;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.13.2.1.2.2;

1.13.2.1.2.2
date	2012.11.17.08.37.25;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.13.2.1.4.2;

1.13.2.1.4.2
date	2012.11.17.08.48.16;	author svnexp;	state Exp;
branches;
next	;

1.11.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.11.2.1.2.1
	1.11.2.1.4.1
	1.11.2.1.6.1
	1.11.2.1.8.1;
next	1.11.2.2;

1.11.2.2
date	2012.11.17.10.37.09;	author svnexp;	state Exp;
branches;
next	;

1.11.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.11.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.11.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.11.2.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.11.2.1.8.2;

1.11.2.1.8.2
date	2012.11.17.08.25.44;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.14
log
@Switching exporter and resync
@
text
@# $FreeBSD: head/tools/regression/bpf/bpf_filter/Makefile 199604 2009-11-20 18:53:38Z jkim $

TEST_CASES?=	test0001 test0002 test0003 test0004	\
		test0005 test0006 test0007 test0008	\
		test0009 test0010 test0011 test0012	\
		test0013 test0014 test0015 test0016	\
		test0017 test0018 test0019 test0020	\
		test0021 test0022 test0023 test0024	\
		test0025 test0026 test0027 test0028	\
		test0029 test0030 test0031 test0032	\
		test0033 test0034 test0035 test0036	\
		test0037 test0038 test0039 test0040	\
		test0041 test0042 test0043 test0044	\
		test0045 test0046 test0047 test0048	\
		test0049 test0050 test0051 test0052	\
		test0053 test0054 test0055 test0056	\
		test0057 test0058 test0059 test0060	\
		test0061 test0062 test0063 test0064	\
		test0065 test0066 test0067 test0068	\
		test0069 test0070 test0071 test0072	\
		test0073 test0074 test0075 test0076	\
		test0077 test0078 test0079 test0080	\
		test0081 test0082 test0083 test0084

SYSDIR?=	${.CURDIR}/../../../../sys

SRCS=		${.CURDIR}/bpf_test.c

CFLAGS+=	-g -I${SYSDIR} -I${.CURDIR}/tests

.if defined(BPF_BENCHMARK)
CFLAGS+=	-DBPF_BENCHMARK -DLOG_LEVEL=0
.elif defined(LOG_LEVEL)
CFLAGS+=	-DLOG_LEVEL="${LOG_LEVEL}"
.endif

.if defined(BPF_VALIDATE)
CFLAGS+=	-DBPF_VALIDATE
.endif

.if defined(BPF_JIT) &&	\
    (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386")
SRCS+=		${SYSDIR}/net/bpf_jitter.c	\
		${SYSDIR}/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c
CFLAGS+=	-DBPF_JIT_COMPILER
LIBS+=		-lutil
WARNS?=		6
.else
SRCS+=		${SYSDIR}/net/bpf_filter.c
WARNS?=		2
.endif

.for TEST in ${TEST_CASES}
${TEST}:	${.CURDIR}/tests/${TEST}.h ${SRCS}
	@@${CC} ${CFLAGS} -DBPF_TEST_H=\"${TEST}.h\"	\
	    -o ${.CURDIR}/${TEST} ${SRCS} ${LIBS}
.endfor

all:		${TEST_CASES}
.for TEST in ${TEST_CASES}
.if defined(BPF_BENCHMARK) || !defined(LOG_LEVEL) || (${LOG_LEVEL} > 0)
	@@${ECHO} -n "${TEST}:	"
.endif
.if defined(BPF_BENCHMARK)
	@@-time ${.CURDIR}/${TEST}
.else
	@@-env MALLOC_OPTIONS=J ${.CURDIR}/${TEST}
.endif
	@@rm -f ${.CURDIR}/${TEST}
.endfor

clean:
.for TEST in ${TEST_CASES}
	@@rm -f ${.CURDIR}/${TEST}
.endfor

.include <bsd.prog.mk>
@


1.14.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:05:48 +0000
@
text
@d1 77
@


1.14.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 76
# $FreeBSD: releng/8.4/tools/regression/bpf/bpf_filter/Makefile 182464 2008-08-29 20:58:01Z jkim $

TEST_CASES?=	test0001 test0002 test0003 test0004	\
		test0005 test0006 test0007 test0008	\
		test0009 test0010 test0011 test0012	\
		test0013 test0014 test0015 test0016	\
		test0017 test0018 test0019 test0020	\
		test0021 test0022 test0023 test0024	\
		test0025 test0026 test0027 test0028	\
		test0029 test0030 test0031 test0032	\
		test0033 test0034 test0035 test0036	\
		test0037 test0038 test0039 test0040	\
		test0041 test0042 test0043 test0044	\
		test0045 test0046 test0047 test0048	\
		test0049 test0050 test0051 test0052	\
		test0053 test0054 test0055 test0056	\
		test0057 test0058 test0059 test0060	\
		test0061 test0062 test0063 test0064	\
		test0065 test0066 test0067 test0068	\
		test0069 test0070 test0071 test0072	\
		test0073 test0074 test0075 test0076	\
		test0077 test0078 test0079 test0080	\
		test0081 test0082 test0083

SYSDIR?=	${.CURDIR}/../../../../sys

SRCS=		${.CURDIR}/bpf_test.c

CFLAGS+=	-g -I${SYSDIR} -I${.CURDIR}/tests

.if defined(BPF_BENCHMARK)
CFLAGS+=	-DBPF_BENCHMARK -DLOG_LEVEL=0
.elif defined(LOG_LEVEL)
CFLAGS+=	-DLOG_LEVEL="${LOG_LEVEL}"
.endif

.if defined(BPF_VALIDATE)
CFLAGS+=	-DBPF_VALIDATE
.endif

.if defined(BPF_JIT) &&	\
    (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386")
SRCS+=		${SYSDIR}/net/bpf_jitter.c	\
		${SYSDIR}/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c
CFLAGS+=	-DBPF_JIT_COMPILER
WARNS?=		6
.else
SRCS+=		${SYSDIR}/net/bpf_filter.c
WARNS?=		2
.endif

.for TEST in ${TEST_CASES}
${TEST}:	${.CURDIR}/tests/${TEST}.h ${SRCS}
	@@${CC} ${CFLAGS} -DBPF_TEST_H=\"${TEST}.h\"	\
	    -o ${.CURDIR}/${TEST} ${SRCS}
.endfor

all:		${TEST_CASES}
.for TEST in ${TEST_CASES}
.if defined(BPF_BENCHMARK) || !defined(LOG_LEVEL) || (${LOG_LEVEL} > 0)
	@@${ECHO} -n "${TEST}:	"
.endif
.if defined(BPF_BENCHMARK)
	@@-time ${.CURDIR}/${TEST}
.else
	@@-env MALLOC_OPTIONS=J ${.CURDIR}/${TEST}
.endif
	@@rm -f ${.CURDIR}/${TEST}
.endfor

clean:
.for TEST in ${TEST_CASES}
	@@rm -f ${.CURDIR}/${TEST}
.endfor

.include <bsd.prog.mk>
@


1.13
log
@SVN rev 199604 on 2009-11-20 18:53:38Z by jkim

Adjust BPF JIT compiler regression tests to catch up with r199603.
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.13.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.13.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/tools/regression/bpf/bpf_filter/Makefile 199604 2009-11-20 18:53:38Z jkim $
@


1.13.2.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.13.2.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/tools/regression/bpf/bpf_filter/Makefile 199604 2009-11-20 18:53:38Z jkim $
@


1.13.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.13.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/tools/regression/bpf/bpf_filter/Makefile 199604 2009-11-20 18:53:38Z jkim $
@


1.12
log
@SVN rev 199499 on 2009-11-19 00:00:31Z by jkim

Add a test case for very long BPF program.
@
text
@d46 1
d56 1
a56 1
	    -o ${.CURDIR}/${TEST} ${SRCS}
@


1.11
log
@SVN rev 182464 on 2008-08-29 20:58:01Z by jkim

Connect a forgotten test case to Makefile.
@
text
@d23 1
a23 1
		test0081 test0082 test0083
@


1.11.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.11.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/tools/regression/bpf/bpf_filter/Makefile 182464 2008-08-29 20:58:01Z jkim $
@


1.11.2.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.11.2.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/tools/regression/bpf/bpf_filter/Makefile 182464 2008-08-29 20:58:01Z jkim $
@


1.11.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.11.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.11.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.10
log
@SVN rev 182459 on 2008-08-29 20:20:30Z by jkim

Do not pass validatation level since all issues are fixed now.
@
text
@d23 1
a23 1
		test0081 test0082
@


1.9
log
@SVN rev 182428 on 2008-08-29 02:12:45Z by jkim

Merge bpf_filter.c r182425 and add test cases for jump range checks.

While I am here, fix stupid typos in test0080.h and make it JIT compiler only.
@
text
@d38 1
a38 1
CFLAGS+=	-DBPF_VALIDATE=${BPF_VALIDATE}
@


1.8
log
@SVN rev 182377 on 2008-08-28 16:58:30Z by jkim

Add a test case for uninitialized scratch memory (for JIT compiler).
@
text
@d22 2
a23 1
		test0077 test0078 test0079 test0080
@


1.7
log
@SVN rev 182221 on 2008-08-26 21:54:47Z by jkim

Add a test case for null filter.
@
text
@d22 1
a22 1
		test0077 test0078 test0079
d65 1
a65 1
	@@-${.CURDIR}/${TEST}
@


1.6
log
@SVN rev 182219 on 2008-08-26 19:24:58Z by jkim

Add more test cases for invalid instructions and add comments
about bpf_validate(9) issues.
@
text
@d22 1
a22 1
		test0077 test0078
d40 2
a41 1
.if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386") && defined(BPF_JIT)
d53 2
a54 1
	@@${CC} ${CFLAGS} -DBPF_TEST_H=\"${TEST}.h\" -o ${.CURDIR}/${TEST} ${SRCS}
@


1.5
log
@SVN rev 182185 on 2008-08-26 00:35:04Z by jkim

Remove some hacks from regression test since bpf_filter.c builds fine now.
@
text
@d3 1
a3 1
TEST_CASES=	test0001 test0002 test0003 test0004	\
d21 2
a22 3
		test0073 test0074

WARNS?=		6
d37 1
a37 1
CFLAGS+=	-DBPF_VALIDATE
d44 1
d47 1
@


1.4
log
@SVN rev 182183 on 2008-08-25 23:36:24Z by jkim

Add a trivial bpf filter benchmark.
@
text
@d23 2
d29 1
a29 1
CFLAGS+=	-g -fno-builtin-abort -I${.CURDIR}/tests
d44 1
a44 2
CFLAGS+=	-I${SYSDIR} -DBPF_JIT_COMPILER
WARNS?=		6
a46 1
WARNS?=		1
@


1.3
log
@SVN rev 182182 on 2008-08-25 22:45:18Z by jkim

Use sys/net/bpf_jitter.c instead of rolling our own version
since it is compilable on user land now.
@
text
@d29 3
a31 1
.if defined(LOG_LEVEL)
d56 1
a56 1
.if !defined(LOG_LEVEL) || (${LOG_LEVEL} > 0)
d59 3
d63 1
@


1.2
log
@SVN rev 181857 on 2008-08-18 23:05:19Z by jkim

Add test case for 'divide by 0' with BPF_ALU|BPF_DIV|BPF_X instruction.
@
text
@d38 2
a39 1
SRCS+=		${SYSDIR}/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c
@


1.1
log
@SVN rev 181847 on 2008-08-18 19:01:58Z by jkim

Add simple bpf(9) regression tests and test cases.
@
text
@d21 1
a21 1
		test0073
@

