Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2016 06:56:30 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307708 - in head/tools/regression/bpf/bpf_filter: . tests
Message-ID:  <201610210656.u9L6uUGl020734@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Fri Oct 21 06:56:30 2016
New Revision: 307708
URL: https://svnweb.freebsd.org/changeset/base/307708

Log:
  Clean up and add some test cases for ALU instructions.

Added:
  head/tools/regression/bpf/bpf_filter/tests/test0085.h   (contents, props changed)
  head/tools/regression/bpf/bpf_filter/tests/test0086.h   (contents, props changed)
  head/tools/regression/bpf/bpf_filter/tests/test0087.h   (contents, props changed)
  head/tools/regression/bpf/bpf_filter/tests/test0088.h   (contents, props changed)
  head/tools/regression/bpf/bpf_filter/tests/test0089.h   (contents, props changed)
  head/tools/regression/bpf/bpf_filter/tests/test0090.h   (contents, props changed)
  head/tools/regression/bpf/bpf_filter/tests/test0091.h   (contents, props changed)
Modified:
  head/tools/regression/bpf/bpf_filter/Makefile
  head/tools/regression/bpf/bpf_filter/bpf_test.c
  head/tools/regression/bpf/bpf_filter/tests/test0001.h
  head/tools/regression/bpf/bpf_filter/tests/test0002.h
  head/tools/regression/bpf/bpf_filter/tests/test0003.h
  head/tools/regression/bpf/bpf_filter/tests/test0004.h
  head/tools/regression/bpf/bpf_filter/tests/test0005.h
  head/tools/regression/bpf/bpf_filter/tests/test0006.h
  head/tools/regression/bpf/bpf_filter/tests/test0007.h
  head/tools/regression/bpf/bpf_filter/tests/test0008.h
  head/tools/regression/bpf/bpf_filter/tests/test0009.h
  head/tools/regression/bpf/bpf_filter/tests/test0010.h
  head/tools/regression/bpf/bpf_filter/tests/test0011.h
  head/tools/regression/bpf/bpf_filter/tests/test0012.h
  head/tools/regression/bpf/bpf_filter/tests/test0013.h
  head/tools/regression/bpf/bpf_filter/tests/test0014.h
  head/tools/regression/bpf/bpf_filter/tests/test0015.h
  head/tools/regression/bpf/bpf_filter/tests/test0016.h
  head/tools/regression/bpf/bpf_filter/tests/test0017.h
  head/tools/regression/bpf/bpf_filter/tests/test0018.h
  head/tools/regression/bpf/bpf_filter/tests/test0019.h
  head/tools/regression/bpf/bpf_filter/tests/test0020.h
  head/tools/regression/bpf/bpf_filter/tests/test0021.h
  head/tools/regression/bpf/bpf_filter/tests/test0022.h
  head/tools/regression/bpf/bpf_filter/tests/test0023.h
  head/tools/regression/bpf/bpf_filter/tests/test0024.h
  head/tools/regression/bpf/bpf_filter/tests/test0025.h
  head/tools/regression/bpf/bpf_filter/tests/test0026.h
  head/tools/regression/bpf/bpf_filter/tests/test0027.h
  head/tools/regression/bpf/bpf_filter/tests/test0028.h
  head/tools/regression/bpf/bpf_filter/tests/test0029.h
  head/tools/regression/bpf/bpf_filter/tests/test0030.h
  head/tools/regression/bpf/bpf_filter/tests/test0031.h
  head/tools/regression/bpf/bpf_filter/tests/test0032.h
  head/tools/regression/bpf/bpf_filter/tests/test0033.h
  head/tools/regression/bpf/bpf_filter/tests/test0034.h
  head/tools/regression/bpf/bpf_filter/tests/test0035.h
  head/tools/regression/bpf/bpf_filter/tests/test0036.h
  head/tools/regression/bpf/bpf_filter/tests/test0037.h
  head/tools/regression/bpf/bpf_filter/tests/test0038.h
  head/tools/regression/bpf/bpf_filter/tests/test0039.h
  head/tools/regression/bpf/bpf_filter/tests/test0040.h
  head/tools/regression/bpf/bpf_filter/tests/test0041.h
  head/tools/regression/bpf/bpf_filter/tests/test0042.h
  head/tools/regression/bpf/bpf_filter/tests/test0043.h
  head/tools/regression/bpf/bpf_filter/tests/test0044.h
  head/tools/regression/bpf/bpf_filter/tests/test0045.h
  head/tools/regression/bpf/bpf_filter/tests/test0046.h
  head/tools/regression/bpf/bpf_filter/tests/test0047.h
  head/tools/regression/bpf/bpf_filter/tests/test0048.h
  head/tools/regression/bpf/bpf_filter/tests/test0049.h
  head/tools/regression/bpf/bpf_filter/tests/test0050.h
  head/tools/regression/bpf/bpf_filter/tests/test0051.h
  head/tools/regression/bpf/bpf_filter/tests/test0052.h
  head/tools/regression/bpf/bpf_filter/tests/test0053.h
  head/tools/regression/bpf/bpf_filter/tests/test0054.h
  head/tools/regression/bpf/bpf_filter/tests/test0055.h
  head/tools/regression/bpf/bpf_filter/tests/test0056.h
  head/tools/regression/bpf/bpf_filter/tests/test0057.h
  head/tools/regression/bpf/bpf_filter/tests/test0058.h
  head/tools/regression/bpf/bpf_filter/tests/test0059.h
  head/tools/regression/bpf/bpf_filter/tests/test0060.h
  head/tools/regression/bpf/bpf_filter/tests/test0061.h
  head/tools/regression/bpf/bpf_filter/tests/test0062.h
  head/tools/regression/bpf/bpf_filter/tests/test0063.h
  head/tools/regression/bpf/bpf_filter/tests/test0064.h
  head/tools/regression/bpf/bpf_filter/tests/test0065.h
  head/tools/regression/bpf/bpf_filter/tests/test0066.h
  head/tools/regression/bpf/bpf_filter/tests/test0067.h
  head/tools/regression/bpf/bpf_filter/tests/test0068.h
  head/tools/regression/bpf/bpf_filter/tests/test0069.h
  head/tools/regression/bpf/bpf_filter/tests/test0070.h
  head/tools/regression/bpf/bpf_filter/tests/test0071.h
  head/tools/regression/bpf/bpf_filter/tests/test0072.h
  head/tools/regression/bpf/bpf_filter/tests/test0073.h
  head/tools/regression/bpf/bpf_filter/tests/test0074.h
  head/tools/regression/bpf/bpf_filter/tests/test0075.h
  head/tools/regression/bpf/bpf_filter/tests/test0076.h
  head/tools/regression/bpf/bpf_filter/tests/test0077.h
  head/tools/regression/bpf/bpf_filter/tests/test0078.h
  head/tools/regression/bpf/bpf_filter/tests/test0079.h
  head/tools/regression/bpf/bpf_filter/tests/test0080.h
  head/tools/regression/bpf/bpf_filter/tests/test0081.h
  head/tools/regression/bpf/bpf_filter/tests/test0082.h
  head/tools/regression/bpf/bpf_filter/tests/test0083.h
  head/tools/regression/bpf/bpf_filter/tests/test0084.h

Modified: head/tools/regression/bpf/bpf_filter/Makefile
==============================================================================
--- head/tools/regression/bpf/bpf_filter/Makefile	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/Makefile	Fri Oct 21 06:56:30 2016	(r307708)
@@ -20,9 +20,11 @@ TEST_CASES?=	test0001 test0002 test0003 
 		test0069 test0070 test0071 test0072	\
 		test0073 test0074 test0075 test0076	\
 		test0077 test0078 test0079 test0080	\
-		test0081 test0082 test0083 test0084
+		test0081 test0082 test0083 test0084	\
+		test0085 test0086 test0087 test0088	\
+		test0089 test0090 test0091
 
-SYSDIR?=	${.CURDIR}/../../../../sys
+SYSDIR?=	${SRCTOP}/sys
 
 SRCS=		${.CURDIR}/bpf_test.c
 

Modified: head/tools/regression/bpf/bpf_filter/bpf_test.c
==============================================================================
--- head/tools/regression/bpf/bpf_filter/bpf_test.c	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/bpf_test.c	Fri Oct 21 06:56:30 2016	(r307708)
@@ -105,8 +105,8 @@ static const u_short	bpf_code_map[] = {
 	0x1013,	/* 0x60-0x6f: 1100100000001000 */
 	0x1010,	/* 0x70-0x7f: 0000100000001000 */
 	0x0093,	/* 0x80-0x8f: 1100100100000000 */
-	0x0000,	/* 0x90-0x9f: 0000000000000000 */
-	0x0000,	/* 0xa0-0xaf: 0000000000000000 */
+	0x1010,	/* 0x90-0x9f: 0000100000001000 */
+	0x1010,	/* 0xa0-0xaf: 0000100000001000 */
 	0x0002,	/* 0xb0-0xbf: 0100000000000000 */
 	0x0000,	/* 0xc0-0xcf: 0000000000000000 */
 	0x0000,	/* 0xd0-0xdf: 0000000000000000 */
@@ -176,7 +176,8 @@ bpf_validate(const struct bpf_insn *f, i
 		/*
 		 * Check for constant division by 0.
 		 */
-		if (p->code == (BPF_ALU|BPF_DIV|BPF_K) && p->k == 0)
+		if ((p->code == (BPF_ALU|BPF_DIV|BPF_K) ||
+		    p->code == (BPF_ALU|BPF_MOD|BPF_K)) && p->k == 0)
 			return (0);
 	}
 	return (BPF_CLASS(f[len - 1].code) == BPF_RET);

Modified: head/tools/regression/bpf/bpf_filter/tests/test0001.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0001.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0001.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,27 +5,27 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct	bpf_insn pc[] = {
 	BPF_STMT(0x55, 0),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	1;
+static int	invalid =	1;
 
 /* Expected return value */
-u_int	expect =	0;
+static u_int	expect =	0;
 
 /* Expected signal */
-int	expect_signal =	SIGABRT;
+static int	expect_signal =	SIGABRT;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0002.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0002.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0002.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,26 +5,26 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_RET+BPF_K, 0xdeadc0de),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xdeadc0de;
+static u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0003.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0003.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0003.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,27 +5,27 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xdeadc0de;
+static u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0004.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0004.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0004.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,27 +5,27 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x01, 0x23, 0x45, 0x67, 0x89,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0x23456789;
+static u_int	expect =	0x23456789;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0005.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0005.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0005.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,27 +5,27 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 1),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x01, 0x23, 0x45,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0x2345;
+static u_int	expect =	0x2345;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0006.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0006.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0006.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,27 +5,27 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 1),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x01, 0x23,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0x23;
+static u_int	expect =	0x23;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0007.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0007.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0007.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,27 +5,27 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_W+BPF_LEN, 0),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	0xdeadc0de;
+static u_int	wirelen =	0xdeadc0de;
 
 /* Packet length passed on buffer */
-u_int	buflen =	0xdeadc0de;
+static u_int	buflen =	0xdeadc0de;
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xdeadc0de;
+static u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0008.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0008.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0008.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,28 +5,28 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LDX+BPF_W+BPF_LEN, 0),
 	BPF_STMT(BPF_MISC+BPF_TXA, 0),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	0xdeadc0de;
+static u_int	wirelen =	0xdeadc0de;
 
 /* Packet length passed on buffer */
-u_int	buflen =	0xdeadc0de;
+static u_int	buflen =	0xdeadc0de;
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xdeadc0de;
+static u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0009.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0009.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0009.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,28 +5,28 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LDX+BPF_IMM, 1),
 	BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0x456789ab;
+static u_int	expect =	0x456789ab;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0010.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0010.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0010.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,28 +5,28 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LDX+BPF_IMM, 1),
 	BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x01, 0x23, 0x45, 0x67,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0x4567;
+static u_int	expect =	0x4567;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0011.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0011.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0011.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,28 +5,28 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LDX+BPF_IMM, 1),
 	BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x01, 0x23, 0x45,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0x45;
+static u_int	expect =	0x45;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0012.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0012.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0012.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,28 +5,28 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LDX+BPF_MSH+BPF_B, 1),
 	BPF_STMT(BPF_MISC+BPF_TXA, 0),
 	BPF_STMT(BPF_RET+BPF_A, 0),
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x01, 0x23,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	(0x23 & 0xf) << 2;
+static u_int	expect =	(0x23 & 0xf) << 2;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0013.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0013.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0013.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
 	BPF_STMT(BPF_ST, 7),
 	BPF_STMT(BPF_LDX+BPF_MEM, 7),
@@ -14,21 +14,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xdeadc0de;
+static u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0014.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0014.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0014.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LDX+BPF_IMM, 0xdeadc0de),
 	BPF_STMT(BPF_STX, 7),
 	BPF_STMT(BPF_LD+BPF_MEM, 7),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xdeadc0de;
+static u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0015.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0015.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0015.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
 	BPF_STMT(BPF_JMP+BPF_JA, 1),
 	BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xc0decafe;
+static u_int	expect =	0xc0decafe;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0016.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0016.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0016.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
 	BPF_JUMP(BPF_JMP+BPF_JGT+BPF_K, 0x01234568, 2, 0),
 	BPF_JUMP(BPF_JMP+BPF_JGT+BPF_K, 0x01234566, 2, 1),
@@ -17,21 +17,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xc0decafe;
+static u_int	expect =	0xc0decafe;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0017.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0017.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0017.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
 	BPF_JUMP(BPF_JMP+BPF_JGE+BPF_K, 0x01234568, 2, 0),
 	BPF_JUMP(BPF_JMP+BPF_JGE+BPF_K, 0x01234567, 2, 1),
@@ -17,21 +17,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xc0decafe;
+static u_int	expect =	0xc0decafe;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0018.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0018.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0018.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
 	BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x01234568, 2, 0),
 	BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x01234567, 2, 1),
@@ -17,21 +17,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xc0decafe;
+static u_int	expect =	0xc0decafe;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0019.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0019.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0019.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
 	BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x80000000, 5, 0),
 	BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x40000000, 4, 0),
@@ -22,21 +22,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xc0decafe;
+static u_int	expect =	0xc0decafe;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0020.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0020.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0020.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
 	BPF_STMT(BPF_LDX+BPF_IMM, 0x01234568),
 	BPF_JUMP(BPF_JMP+BPF_JGT+BPF_X, 0, 3, 0),
@@ -20,21 +20,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xc0decafe;
+static u_int	expect =	0xc0decafe;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0021.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0021.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0021.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
 	BPF_STMT(BPF_LDX+BPF_IMM, 0x01234568),
 	BPF_JUMP(BPF_JMP+BPF_JGE+BPF_X, 0, 3, 0),
@@ -20,21 +20,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xc0decafe;
+static u_int	expect =	0xc0decafe;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0022.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0022.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0022.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
 	BPF_STMT(BPF_LDX+BPF_IMM, 0x01234568),
 	BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_X, 0, 3, 0),
@@ -20,21 +20,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xc0decafe;
+static u_int	expect =	0xc0decafe;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0023.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0023.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0023.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
 	BPF_STMT(BPF_LDX+BPF_IMM, 0x80000000),
 	BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0, 9, 0),
@@ -30,21 +30,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xc0decafe;
+static u_int	expect =	0xc0decafe;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0024.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0024.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0024.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0xbeadb8dd),
 	BPF_STMT(BPF_LDX+BPF_IMM, 0x20000801),
 	BPF_STMT(BPF_ALU+BPF_ADD+BPF_X, 0),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xdeadc0de;
+static u_int	expect =	0xdeadc0de;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0025.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0025.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0025.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn	pc[] = {
 	BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
 	BPF_STMT(BPF_LDX+BPF_IMM, 0x20000801),
 	BPF_STMT(BPF_ALU+BPF_SUB+BPF_X, 0),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
 };
 
 /* Packet */
-u_char	pkt[] = {
+static u_char	pkt[] = {
 	0x00,
 };
 
 /* Packet length seen on wire */
-u_int	wirelen =	sizeof(pkt);
+static u_int	wirelen =	sizeof(pkt);
 
 /* Packet length passed on buffer */
-u_int	buflen =	sizeof(pkt);
+static u_int	buflen =	sizeof(pkt);
 
 /* Invalid instruction */
-int	invalid =	0;
+static int	invalid =	0;
 
 /* Expected return value */
-u_int	expect =	0xbeadb8dd;
+static u_int	expect =	0xbeadb8dd;
 
 /* Expected signal */
-int	expect_signal =	0;
+static int	expect_signal =	0;

Modified: head/tools/regression/bpf/bpf_filter/tests/test0026.h
==============================================================================
--- head/tools/regression/bpf/bpf_filter/tests/test0026.h	Fri Oct 21 06:55:07 2016	(r307707)
+++ head/tools/regression/bpf/bpf_filter/tests/test0026.h	Fri Oct 21 06:56:30 2016	(r307708)
@@ -5,7 +5,7 @@
  */
 
 /* BPF program */

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610210656.u9L6uUGl020734>