aboutsummaryrefslogtreecommitdiff
path: root/tools/regression
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2016-10-21 06:56:30 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2016-10-21 06:56:30 +0000
commitfadb8b98ee68013a51897e8c333d29dcb9d4aca1 (patch)
tree30d3f77c559510e49a9c0c41958b2b0855a7c256 /tools/regression
parent69d410eeb129b58de88937b39a521ee3745b810f (diff)
Notes
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/bpf/bpf_filter/Makefile6
-rw-r--r--tools/regression/bpf/bpf_filter/bpf_test.c7
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0001.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0002.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0003.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0004.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0005.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0006.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0007.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0008.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0009.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0010.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0011.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0012.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0013.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0014.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0015.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0016.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0017.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0018.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0019.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0020.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0021.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0022.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0023.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0024.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0025.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0026.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0027.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0028.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0029.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0030.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0031.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0032.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0033.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0034.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0035.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0036.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0037.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0038.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0039.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0040.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0041.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0042.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0043.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0044.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0045.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0046.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0047.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0048.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0049.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0050.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0051.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0052.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0053.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0054.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0055.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0056.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0057.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0058.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0059.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0060.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0061.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0062.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0063.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0064.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0065.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0066.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0067.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0068.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0069.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0070.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0071.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0072.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0073.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0074.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0075.h16
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0076.h16
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0077.h16
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0078.h16
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0079.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0080.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0081.h16
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0082.h16
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0083.h16
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0084.h14
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0085.h33
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0086.h33
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0087.h32
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0088.h32
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0089.h33
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0090.h32
-rw-r--r--tools/regression/bpf/bpf_filter/tests/test0091.h32
93 files changed, 830 insertions, 600 deletions
diff --git a/tools/regression/bpf/bpf_filter/Makefile b/tools/regression/bpf/bpf_filter/Makefile
index 79a2e0cb0a46..d0038f915239 100644
--- a/tools/regression/bpf/bpf_filter/Makefile
+++ b/tools/regression/bpf/bpf_filter/Makefile
@@ -20,9 +20,11 @@ TEST_CASES?= test0001 test0002 test0003 test0004 \
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
diff --git a/tools/regression/bpf/bpf_filter/bpf_test.c b/tools/regression/bpf/bpf_filter/bpf_test.c
index 6bd67cfe4ca2..9ed4828ea3e2 100644
--- a/tools/regression/bpf/bpf_filter/bpf_test.c
+++ b/tools/regression/bpf/bpf_filter/bpf_test.c
@@ -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, int len)
/*
* 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);
diff --git a/tools/regression/bpf/bpf_filter/tests/test0001.h b/tools/regression/bpf/bpf_filter/tests/test0001.h
index 76cf71dfa50a..5640f9a1cb22 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0001.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0001.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0002.h b/tools/regression/bpf/bpf_filter/tests/test0002.h
index ef92c3170660..15935505d849 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0002.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0002.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0003.h b/tools/regression/bpf/bpf_filter/tests/test0003.h
index 7a547ef763a6..9ab083a48623 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0003.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0003.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0004.h b/tools/regression/bpf/bpf_filter/tests/test0004.h
index ecb4bc216145..7eb42a125ca3 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0004.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0004.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0005.h b/tools/regression/bpf/bpf_filter/tests/test0005.h
index 6830add85434..4dae935d1357 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0005.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0005.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0006.h b/tools/regression/bpf/bpf_filter/tests/test0006.h
index f36ec3fa6720..2c7485db6ad7 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0006.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0006.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0007.h b/tools/regression/bpf/bpf_filter/tests/test0007.h
index 69757223a2b7..026c6f7d9725 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0007.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0007.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0008.h b/tools/regression/bpf/bpf_filter/tests/test0008.h
index 93462c76ce12..80e1eb0f812b 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0008.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0008.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0009.h b/tools/regression/bpf/bpf_filter/tests/test0009.h
index 644e58b8149c..7053450c4893 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0009.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0009.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0010.h b/tools/regression/bpf/bpf_filter/tests/test0010.h
index ce8488e2c806..8377804d4abb 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0010.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0010.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0011.h b/tools/regression/bpf/bpf_filter/tests/test0011.h
index c3a94f3c2306..057c224eaec4 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0011.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0011.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0012.h b/tools/regression/bpf/bpf_filter/tests/test0012.h
index 03cd1e9c7988..b1ef2b73da7d 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0012.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0012.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0013.h b/tools/regression/bpf/bpf_filter/tests/test0013.h
index 78313f6c3ed4..004e517b3296 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0013.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0013.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0014.h b/tools/regression/bpf/bpf_filter/tests/test0014.h
index bea2b4c9e342..ff1799f29eb1 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0014.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0014.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0015.h b/tools/regression/bpf/bpf_filter/tests/test0015.h
index 78187027929d..903f7325d772 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0015.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0015.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0016.h b/tools/regression/bpf/bpf_filter/tests/test0016.h
index b5b0bdd1e3e3..eeb26fa7b33c 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0016.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0016.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0017.h b/tools/regression/bpf/bpf_filter/tests/test0017.h
index 24f412fc3026..7a38d06940f2 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0017.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0017.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0018.h b/tools/regression/bpf/bpf_filter/tests/test0018.h
index ad80b47e5b60..11f3927c4e72 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0018.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0018.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0019.h b/tools/regression/bpf/bpf_filter/tests/test0019.h
index e7977b11e371..a2c27c08403c 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0019.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0019.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0020.h b/tools/regression/bpf/bpf_filter/tests/test0020.h
index 662d60b634ce..58384c66a875 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0020.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0020.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0021.h b/tools/regression/bpf/bpf_filter/tests/test0021.h
index cbc93e5c9d7b..da092b8abb78 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0021.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0021.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0022.h b/tools/regression/bpf/bpf_filter/tests/test0022.h
index 5a9fcc08aac6..9fa0d94b32d1 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0022.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0022.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0023.h b/tools/regression/bpf/bpf_filter/tests/test0023.h
index 24f5c69f091e..ac9bf25e6c85 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0023.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0023.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0024.h b/tools/regression/bpf/bpf_filter/tests/test0024.h
index d4f80ba811da..511378e7a781 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0024.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0024.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0025.h b/tools/regression/bpf/bpf_filter/tests/test0025.h
index 2d5f2b4e433d..91acfe47536a 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0025.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0025.h
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0026.h b/tools/regression/bpf/bpf_filter/tests/test0026.h
index 49c9133b818c..f881c0f8eb46 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0026.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0026.h
@@ -5,7 +5,7 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdead),
BPF_STMT(BPF_LDX+BPF_IMM, 0xc0de),
BPF_STMT(BPF_ALU+BPF_MUL+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 = 0xa7c2da06;
+static u_int expect = 0xa7c2da06;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0027.h b/tools/regression/bpf/bpf_filter/tests/test0027.h
index c26248de6a4c..bf41904368eb 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0027.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0027.h
@@ -5,7 +5,7 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
BPF_STMT(BPF_LDX+BPF_IMM, 0xdead),
BPF_STMT(BPF_ALU+BPF_DIV+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 = 0xc0de;
+static u_int expect = 0xc0de;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0028.h b/tools/regression/bpf/bpf_filter/tests/test0028.h
index 7a346456e886..f205e143ca13 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0028.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0028.h
@@ -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, 0xc0decafe),
BPF_STMT(BPF_ALU+BPF_AND+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 = 0xc08cc0de;
+static u_int expect = 0xc08cc0de;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0029.h b/tools/regression/bpf/bpf_filter/tests/test0029.h
index 65d842a7b970..f9a26a9d86f8 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0029.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0029.h
@@ -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, 0xc0decafe),
BPF_STMT(BPF_ALU+BPF_OR+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 = 0xdeffcafe;
+static u_int expect = 0xdeffcafe;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0030.h b/tools/regression/bpf/bpf_filter/tests/test0030.h
index f2197ff59a97..5574264d3eee 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0030.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0030.h
@@ -5,7 +5,7 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdefc0),
BPF_STMT(BPF_LDX+BPF_IMM, 9),
BPF_STMT(BPF_ALU+BPF_LSH+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 = 0x1bdf8000;
+static u_int expect = 0x1bdf8000;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0031.h b/tools/regression/bpf/bpf_filter/tests/test0031.h
index 7f868b053aa5..ff5fc1950a28 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0031.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0031.h
@@ -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, 13),
BPF_STMT(BPF_ALU+BPF_RSH+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 = 0x6f56e;
+static u_int expect = 0x6f56e;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0032.h b/tools/regression/bpf/bpf_filter/tests/test0032.h
index 779c48b17d29..7bde40237394 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0032.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0032.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xbeadb8dd),
BPF_STMT(BPF_ALU+BPF_ADD+BPF_K, 0x20000801),
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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0033.h b/tools/regression/bpf/bpf_filter/tests/test0033.h
index 54de1b763183..615021839522 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0033.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0033.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_ALU+BPF_SUB+BPF_K, 0x20000801),
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 = 0xbeadb8dd;
+static u_int expect = 0xbeadb8dd;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0034.h b/tools/regression/bpf/bpf_filter/tests/test0034.h
index 6bb8b6fbf818..0219eb025478 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0034.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0034.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdead),
BPF_STMT(BPF_ALU+BPF_MUL+BPF_K, 0xc0de),
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 = 0xa7c2da06;
+static u_int expect = 0xa7c2da06;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0035.h b/tools/regression/bpf/bpf_filter/tests/test0035.h
index d7f157fffdcb..0c6b69e3eaeb 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0035.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0035.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
BPF_STMT(BPF_ALU+BPF_DIV+BPF_K, 0xdead),
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 = 0xc0de;
+static u_int expect = 0xc0de;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0036.h b/tools/regression/bpf/bpf_filter/tests/test0036.h
index 0eddb61fb127..8bee25b78a74 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0036.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0036.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_ALU+BPF_AND+BPF_K, 0xc0decafe),
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 = 0xc08cc0de;
+static u_int expect = 0xc08cc0de;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0037.h b/tools/regression/bpf/bpf_filter/tests/test0037.h
index dc4c411317d4..66682c4ff8bf 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0037.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0037.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_ALU+BPF_OR+BPF_K, 0xc0decafe),
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 = 0xdeffcafe;
+static u_int expect = 0xdeffcafe;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0038.h b/tools/regression/bpf/bpf_filter/tests/test0038.h
index a27948cde99d..b9307bb73966 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0038.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0038.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdefc0),
BPF_STMT(BPF_ALU+BPF_LSH+BPF_K, 9),
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 = 0x1bdf8000;
+static u_int expect = 0x1bdf8000;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0039.h b/tools/regression/bpf/bpf_filter/tests/test0039.h
index 4e7cf7200ad3..51cfed53711c 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0039.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0039.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_ALU+BPF_RSH+BPF_K, 13),
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 = 0x6f56e;
+static u_int expect = 0x6f56e;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0040.h b/tools/regression/bpf/bpf_filter/tests/test0040.h
index 9f4e47927a87..11b71cd1c369 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0040.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0040.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0x21523f22),
BPF_STMT(BPF_ALU+BPF_NEG, 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 = 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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0041.h b/tools/regression/bpf/bpf_filter/tests/test0041.h
index 235ad9fc3c1a..28008de347d9 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0041.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0041.h
@@ -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_MISC+BPF_TAX, 0),
BPF_STMT(BPF_STX, 0),
@@ -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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0042.h b/tools/regression/bpf/bpf_filter/tests/test0042.h
index a645cb697b29..c5b5928db85a 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0042.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0042.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 2),
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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0043.h b/tools/regression/bpf/bpf_filter/tests/test0043.h
index 6971fe09d5e7..be1855d3d892 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0043.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0043.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 2),
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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0044.h b/tools/regression/bpf/bpf_filter/tests/test0044.h
index b6ae8e62bfb8..b46632ad802b 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0044.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0044.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 2),
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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0045.h b/tools/regression/bpf/bpf_filter/tests/test0045.h
index 5b420e86f973..97ae975ba37d 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0045.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0045.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 2),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0046.h b/tools/regression/bpf/bpf_filter/tests/test0046.h
index b31b351682d3..a45204d06b9e 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0046.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0046.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 2),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0047.h b/tools/regression/bpf/bpf_filter/tests/test0047.h
index 4ce86dad8780..f0d39d86dac2 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0047.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0047.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 2),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0048.h b/tools/regression/bpf/bpf_filter/tests/test0048.h
index 04eea4f5bfb9..6736d5a9fc29 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0048.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0048.h
@@ -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_MSH+BPF_B, 2),
BPF_STMT(BPF_MISC+BPF_TXA, 0),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0049.h b/tools/regression/bpf/bpf_filter/tests/test0049.h
index caa65006b091..d4091998ad84 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0049.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0049.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 6),
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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0050.h b/tools/regression/bpf/bpf_filter/tests/test0050.h
index f3c0c727829e..9a5dff68eea6 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0050.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0050.h
@@ -5,28 +5,28 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 4),
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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0051.h b/tools/regression/bpf/bpf_filter/tests/test0051.h
index b81f30c0ce41..ab48c339e6d1 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0051.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0051.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 6),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0052.h b/tools/regression/bpf/bpf_filter/tests/test0052.h
index dc80e9f5c75d..ec7016f67560 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0052.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0052.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 4),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0053.h b/tools/regression/bpf/bpf_filter/tests/test0053.h
index d841a14c926c..df81ce0e9209 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0053.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0053.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 3),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0054.h b/tools/regression/bpf/bpf_filter/tests/test0054.h
index 9b108aa5f153..45dd64ff36b5 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0054.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0054.h
@@ -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, 6),
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0055.h b/tools/regression/bpf/bpf_filter/tests/test0055.h
index 1951beee2d28..4312102028db 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0055.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0055.h
@@ -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, 4),
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0056.h b/tools/regression/bpf/bpf_filter/tests/test0056.h
index c812933c6dcf..cc3103db2fd4 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0056.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0056.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 0xffffffff),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0057.h b/tools/regression/bpf/bpf_filter/tests/test0057.h
index 6c50a6570a25..ba355a3749eb 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0057.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0057.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 0xffffffff),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0058.h b/tools/regression/bpf/bpf_filter/tests/test0058.h
index e4e5f06073d3..9ea693ea8f03 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0058.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0058.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 0xffffffff),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0059.h b/tools/regression/bpf/bpf_filter/tests/test0059.h
index 4af6adca794e..0292787f6ee5 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0059.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0059.h
@@ -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, 0xffffffff),
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0060.h b/tools/regression/bpf/bpf_filter/tests/test0060.h
index 8afdeb401090..6792fcf9c296 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0060.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0060.h
@@ -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, 0xffffffff),
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0061.h b/tools/regression/bpf/bpf_filter/tests/test0061.h
index 256e6d6f23b7..f1557a16676d 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0061.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0061.h
@@ -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, 0xffffffff),
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0062.h b/tools/regression/bpf/bpf_filter/tests/test0062.h
index 39cd978cc9bd..5689b9c4a19e 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0062.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0062.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0063.h b/tools/regression/bpf/bpf_filter/tests/test0063.h
index 886a206f63f4..b9d666130532 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0063.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0063.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0064.h b/tools/regression/bpf/bpf_filter/tests/test0064.h
index 3aa7183d1197..0f43c3690fe9 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0064.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0064.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0065.h b/tools/regression/bpf/bpf_filter/tests/test0065.h
index f5c9b09124cd..b782a8ef4c49 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0065.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0065.h
@@ -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, 0),
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0066.h b/tools/regression/bpf/bpf_filter/tests/test0066.h
index a2a83cbf60f7..1d828e150b07 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0066.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0066.h
@@ -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, 0),
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0067.h b/tools/regression/bpf/bpf_filter/tests/test0067.h
index 5bd522c0d7c6..665ce0e21b60 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0067.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0067.h
@@ -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, 0),
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0068.h b/tools/regression/bpf/bpf_filter/tests/test0068.h
index 6e8df64f6335..d2f811eda740 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0068.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0068.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 0),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0069.h b/tools/regression/bpf/bpf_filter/tests/test0069.h
index e25336c56e8b..86fdcad4caa0 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0069.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0069.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 0),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0070.h b/tools/regression/bpf/bpf_filter/tests/test0070.h
index aff1dbc24e67..3c279c4677d8 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0070.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0070.h
@@ -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, 1),
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 0),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0071.h b/tools/regression/bpf/bpf_filter/tests/test0071.h
index d476e90271e8..bca754934100 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0071.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0071.h
@@ -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, 0),
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 0),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0072.h b/tools/regression/bpf/bpf_filter/tests/test0072.h
index bb461fd07594..9bf97ea5158e 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0072.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0072.h
@@ -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, 0),
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 0),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0073.h b/tools/regression/bpf/bpf_filter/tests/test0073.h
index df8f309a369b..50b3f5693f1f 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0073.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0073.h
@@ -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, 0),
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 0),
@@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
};
/* 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 = 0;
+static u_int buflen = 0;
/* Invalid instruction */
-int invalid = 0;
+static int invalid = 0;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0074.h b/tools/regression/bpf/bpf_filter/tests/test0074.h
index 1447839ce778..febd27525e98 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0074.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0074.h
@@ -5,7 +5,7 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
BPF_STMT(BPF_LDX+BPF_IMM, 0),
BPF_STMT(BPF_ALU+BPF_DIV+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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0075.h b/tools/regression/bpf/bpf_filter/tests/test0075.h
index fa85dd0351a6..c20614b7fec9 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0075.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0075.h
@@ -5,32 +5,32 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_LD+BPF_MEM, 0x8fffffff),
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 = 0xdeadc0de;
+static u_int expect = 0xdeadc0de;
/* Expected signal */
#ifdef __amd64__
-int expect_signal = SIGBUS;
+static int expect_signal = SIGBUS;
#else
-int expect_signal = SIGSEGV;
+static int expect_signal = SIGSEGV;
#endif
diff --git a/tools/regression/bpf/bpf_filter/tests/test0076.h b/tools/regression/bpf/bpf_filter/tests/test0076.h
index 318cbea0cc15..d2b210e00cc2 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0076.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0076.h
@@ -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_MEM, 0x8fffffff),
BPF_STMT(BPF_MISC+BPF_TXA, 0),
@@ -13,25 +13,25 @@ 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 = 1;
+static int invalid = 1;
/* Expected return value */
-u_int expect = 0xdeadc0de;
+static u_int expect = 0xdeadc0de;
/* Expected signal */
#ifdef __amd64__
-int expect_signal = SIGBUS;
+static int expect_signal = SIGBUS;
#else
-int expect_signal = SIGSEGV;
+static int expect_signal = SIGSEGV;
#endif
diff --git a/tools/regression/bpf/bpf_filter/tests/test0077.h b/tools/regression/bpf/bpf_filter/tests/test0077.h
index 2af70cc9d4a5..5170c003eaaf 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0077.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0077.h
@@ -5,32 +5,32 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
BPF_STMT(BPF_ST, 0x8fffffff),
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 = 0xdeadc0de;
+static u_int expect = 0xdeadc0de;
/* Expected signal */
#ifdef __amd64__
-int expect_signal = SIGBUS;
+static int expect_signal = SIGBUS;
#else
-int expect_signal = SIGSEGV;
+static int expect_signal = SIGSEGV;
#endif
diff --git a/tools/regression/bpf/bpf_filter/tests/test0078.h b/tools/regression/bpf/bpf_filter/tests/test0078.h
index 3146de20acc3..ba830359be49 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0078.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0078.h
@@ -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_STX, 0x8fffffff),
BPF_STMT(BPF_MISC+BPF_TXA, 0),
@@ -13,25 +13,25 @@ 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 = 1;
+static int invalid = 1;
/* Expected return value */
-u_int expect = 0xdeadc0de;
+static u_int expect = 0xdeadc0de;
/* Expected signal */
#ifdef __amd64__
-int expect_signal = SIGBUS;
+static int expect_signal = SIGBUS;
#else
-int expect_signal = SIGSEGV;
+static int expect_signal = SIGSEGV;
#endif
diff --git a/tools/regression/bpf/bpf_filter/tests/test0079.h b/tools/regression/bpf/bpf_filter/tests/test0079.h
index 753661a34a88..7c65fbe42cc4 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0079.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0079.h
@@ -5,25 +5,25 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static 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 = (u_int)-1;
+static u_int expect = (u_int)-1;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0080.h b/tools/regression/bpf/bpf_filter/tests/test0080.h
index 65ae6c52dfe7..a4829085d20d 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0080.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0080.h
@@ -5,7 +5,7 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
#ifdef BPF_JIT_COMPILER_OBSOLETE
BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
BPF_STMT(BPF_LD+BPF_MEM, 0),
@@ -46,21 +46,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 = 0;
+static u_int expect = 0;
/* Expected signal */
-int expect_signal = 0;
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0081.h b/tools/regression/bpf/bpf_filter/tests/test0081.h
index 85d1a31cf516..d6ce04ff83be 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0081.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0081.h
@@ -5,7 +5,7 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0),
BPF_JUMP(BPF_JMP+BPF_JA, 2, 0, 0),
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
@@ -13,25 +13,25 @@ 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 = 1;
+static int invalid = 1;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
#ifdef BPF_JIT_COMPILER
-int expect_signal = SIGSEGV;
+static int expect_signal = SIGSEGV;
#else
-int expect_signal = SIGABRT;
+static int expect_signal = SIGABRT;
#endif
diff --git a/tools/regression/bpf/bpf_filter/tests/test0082.h b/tools/regression/bpf/bpf_filter/tests/test0082.h
index be7d63d5f572..e74171e1f0f2 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0082.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0082.h
@@ -5,7 +5,7 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_IMM, 0),
BPF_JUMP(BPF_JMP+BPF_JGT+BPF_K, 0, 1, 2),
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
@@ -13,25 +13,25 @@ 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 = 1;
+static int invalid = 1;
/* Expected return value */
-u_int expect = 0;
+static u_int expect = 0;
/* Expected signal */
#ifdef BPF_JIT_COMPILER
-int expect_signal = SIGSEGV;
+static int expect_signal = SIGSEGV;
#else
-int expect_signal = SIGABRT;
+static int expect_signal = SIGABRT;
#endif
diff --git a/tools/regression/bpf/bpf_filter/tests/test0083.h b/tools/regression/bpf/bpf_filter/tests/test0083.h
index a55780f9c5e6..3ebf1cc6d39c 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0083.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0083.h
@@ -5,30 +5,30 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD|BPF_IMM, 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 */
#ifdef BPF_JIT_COMPILER
-int expect_signal = SIGSEGV;
+static int expect_signal = SIGSEGV;
#else
-int expect_signal = SIGABRT;
+static int expect_signal = SIGABRT;
#endif
diff --git a/tools/regression/bpf/bpf_filter/tests/test0084.h b/tools/regression/bpf/bpf_filter/tests/test0084.h
index 043a68e47b0e..f6a777712099 100644
--- a/tools/regression/bpf/bpf_filter/tests/test0084.h
+++ b/tools/regression/bpf/bpf_filter/tests/test0084.h
@@ -5,7 +5,7 @@
*/
/* BPF program */
-struct bpf_insn pc[] = {
+static struct bpf_insn pc[] = {
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 0),
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1),
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 0),
@@ -1010,21 +1010,21 @@ struct bpf_insn pc[] = {
};
/* 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;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0085.h b/tools/regression/bpf/bpf_filter/tests/test0085.h
new file mode 100644
index 000000000000..3a9f77951d58
--- /dev/null
+++ b/tools/regression/bpf/bpf_filter/tests/test0085.h
@@ -0,0 +1,33 @@
+/*-
+ * Test 0085: BPF_ALU+BPF_MOD+BPF_X
+ *
+ * $FreeBSD$
+ */
+
+/* BPF program */
+static struct bpf_insn pc[] = {
+ BPF_STMT(BPF_LD+BPF_IMM, 0xdfe03de1),
+ BPF_STMT(BPF_LDX+BPF_IMM, 0xdead),
+ BPF_STMT(BPF_ALU+BPF_MOD+BPF_X, 0),
+ BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
+/* Packet */
+static u_char pkt[] = {
+ 0x00,
+};
+
+/* Packet length seen on wire */
+static u_int wirelen = sizeof(pkt);
+
+/* Packet length passed on buffer */
+static u_int buflen = sizeof(pkt);
+
+/* Invalid instruction */
+static int invalid = 0;
+
+/* Expected return value */
+static u_int expect = 0x3154;
+
+/* Expected signal */
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0086.h b/tools/regression/bpf/bpf_filter/tests/test0086.h
new file mode 100644
index 000000000000..44311bcf2ae6
--- /dev/null
+++ b/tools/regression/bpf/bpf_filter/tests/test0086.h
@@ -0,0 +1,33 @@
+/*-
+ * Test 0086: BPF_ALU+BPF_XOR+BPF_X
+ *
+ * $FreeBSD$
+ */
+
+/* BPF program */
+static struct bpf_insn pc[] = {
+ BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
+ BPF_STMT(BPF_LDX+BPF_IMM, 0xc0decafe),
+ BPF_STMT(BPF_ALU+BPF_XOR+BPF_X, 0),
+ BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
+/* Packet */
+static u_char pkt[] = {
+ 0x00,
+};
+
+/* Packet length seen on wire */
+static u_int wirelen = sizeof(pkt);
+
+/* Packet length passed on buffer */
+static u_int buflen = sizeof(pkt);
+
+/* Invalid instruction */
+static int invalid = 0;
+
+/* Expected return value */
+static u_int expect = 0x1e730a20;
+
+/* Expected signal */
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0087.h b/tools/regression/bpf/bpf_filter/tests/test0087.h
new file mode 100644
index 000000000000..5b102278e8aa
--- /dev/null
+++ b/tools/regression/bpf/bpf_filter/tests/test0087.h
@@ -0,0 +1,32 @@
+/*-
+ * Test 0087: BPF_ALU+BPF_MOD+BPF_K
+ *
+ * $FreeBSD$
+ */
+
+/* BPF program */
+static struct bpf_insn pc[] = {
+ BPF_STMT(BPF_LD+BPF_IMM, 0xdfe03de1),
+ BPF_STMT(BPF_ALU+BPF_MOD+BPF_K, 0xdead),
+ BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
+/* Packet */
+static u_char pkt[] = {
+ 0x00,
+};
+
+/* Packet length seen on wire */
+static u_int wirelen = sizeof(pkt);
+
+/* Packet length passed on buffer */
+static u_int buflen = sizeof(pkt);
+
+/* Invalid instruction */
+static int invalid = 0;
+
+/* Expected return value */
+static u_int expect = 0x3154;
+
+/* Expected signal */
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0088.h b/tools/regression/bpf/bpf_filter/tests/test0088.h
new file mode 100644
index 000000000000..9126ac020b27
--- /dev/null
+++ b/tools/regression/bpf/bpf_filter/tests/test0088.h
@@ -0,0 +1,32 @@
+/*-
+ * Test 0088: BPF_ALU+BPF_XOR+BPF_K
+ *
+ * $FreeBSD$
+ */
+
+/* BPF program */
+static struct bpf_insn pc[] = {
+ BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
+ BPF_STMT(BPF_ALU+BPF_XOR+BPF_K, 0xc0decafe),
+ BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
+/* Packet */
+static u_char pkt[] = {
+ 0x00,
+};
+
+/* Packet length seen on wire */
+static u_int wirelen = sizeof(pkt);
+
+/* Packet length passed on buffer */
+static u_int buflen = sizeof(pkt);
+
+/* Invalid instruction */
+static int invalid = 0;
+
+/* Expected return value */
+static u_int expect = 0x1e730a20;
+
+/* Expected signal */
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0089.h b/tools/regression/bpf/bpf_filter/tests/test0089.h
new file mode 100644
index 000000000000..a7b1cfaf2103
--- /dev/null
+++ b/tools/regression/bpf/bpf_filter/tests/test0089.h
@@ -0,0 +1,33 @@
+/*-
+ * Test 0089: Divide by 0 (BPF_ALU+BPF_MOD+BPF_X)
+ *
+ * $FreeBSD$
+ */
+
+/* BPF program */
+static struct bpf_insn pc[] = {
+ BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
+ BPF_STMT(BPF_LDX+BPF_IMM, 0),
+ BPF_STMT(BPF_ALU+BPF_MOD+BPF_X, 0),
+ BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
+/* Packet */
+static u_char pkt[] = {
+ 0x00,
+};
+
+/* Packet length seen on wire */
+static u_int wirelen = sizeof(pkt);
+
+/* Packet length passed on buffer */
+static u_int buflen = sizeof(pkt);
+
+/* Invalid instruction */
+static int invalid = 0;
+
+/* Expected return value */
+static u_int expect = 0;
+
+/* Expected signal */
+static int expect_signal = 0;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0090.h b/tools/regression/bpf/bpf_filter/tests/test0090.h
new file mode 100644
index 000000000000..70ccf1e2b0dc
--- /dev/null
+++ b/tools/regression/bpf/bpf_filter/tests/test0090.h
@@ -0,0 +1,32 @@
+/*-
+ * Test 0090: Divide by 0 (BPF_ALU+BPF_DIV+BPF_K)
+ *
+ * $FreeBSD$
+ */
+
+/* BPF program */
+static struct bpf_insn pc[] = {
+ BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
+ BPF_STMT(BPF_ALU+BPF_DIV+BPF_K, 0),
+ BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
+/* Packet */
+static u_char pkt[] = {
+ 0x00,
+};
+
+/* Packet length seen on wire */
+static u_int wirelen = sizeof(pkt);
+
+/* Packet length passed on buffer */
+static u_int buflen = sizeof(pkt);
+
+/* Invalid instruction */
+static int invalid = 1;
+
+/* Expected return value */
+static u_int expect = 0;
+
+/* Expected signal */
+static int expect_signal = SIGFPE;
diff --git a/tools/regression/bpf/bpf_filter/tests/test0091.h b/tools/regression/bpf/bpf_filter/tests/test0091.h
new file mode 100644
index 000000000000..1e148e9d783c
--- /dev/null
+++ b/tools/regression/bpf/bpf_filter/tests/test0091.h
@@ -0,0 +1,32 @@
+/*-
+ * Test 0091: Divide by 0 (BPF_ALU+BPF_MOD+BPF_K)
+ *
+ * $FreeBSD$
+ */
+
+/* BPF program */
+static struct bpf_insn pc[] = {
+ BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
+ BPF_STMT(BPF_ALU+BPF_MOD+BPF_K, 0),
+ BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
+/* Packet */
+static u_char pkt[] = {
+ 0x00,
+};
+
+/* Packet length seen on wire */
+static u_int wirelen = sizeof(pkt);
+
+/* Packet length passed on buffer */
+static u_int buflen = sizeof(pkt);
+
+/* Invalid instruction */
+static int invalid = 1;
+
+/* Expected return value */
+static u_int expect = 0;
+
+/* Expected signal */
+static int expect_signal = SIGFPE;