Fix style consistencies and a comment.
This commit is contained in:
parent
7660701e51
commit
dfedc4d796
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182393
@ -27,5 +27,5 @@ int invalid = 1;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = SIGABRT;
|
||||
|
@ -26,5 +26,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -27,5 +27,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*-
|
||||
* Test 0004: BPF_LD|BPF_W|BPF_ABS
|
||||
* Test 0004: BPF_LD+BPF_W+BPF_ABS
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_W|BPF_ABS, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -27,5 +27,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x23456789;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*-
|
||||
* Test 0005: BPF_LD|BPF_H|BPF_ABS
|
||||
* Test 0005: BPF_LD+BPF_H+BPF_ABS
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -27,5 +27,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x2345;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*-
|
||||
* Test 0006: BPF_LD|BPF_B|BPF_ABS
|
||||
* Test 0006: BPF_LD+BPF_B+BPF_ABS
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_B|BPF_ABS, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -27,5 +27,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x23;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*-
|
||||
* Test 0007: BPF_LD|BPF_W|BPF_LEN
|
||||
* Test 0007: BPF_LD+BPF_W+BPF_LEN
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_W|BPF_LEN, 0),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_LEN, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -27,5 +27,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0008: BPF_LDX|BPF_W|BPF_LEN & BPF_MISC|BPF_TXA
|
||||
* Test 0008: BPF_LDX+BPF_W+BPF_LEN & BPF_MISC+BPF_TXA
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX|BPF_W|BPF_LEN, 0),
|
||||
BPF_STMT(BPF_MISC|BPF_TXA, 0),
|
||||
BPF_STMT(BPF_LDX+BPF_W+BPF_LEN, 0),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0009: BPF_LDX|BPF_IMM & BPF_LD|BPF_W|BPF_IND
|
||||
* Test 0009: BPF_LDX+BPF_IMM & BPF_LD+BPF_W+BPF_IND
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD|BPF_W|BPF_IND, 1),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x456789ab;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0010: BPF_LD|BPF_H|BPF_IND
|
||||
* Test 0010: BPF_LD+BPF_H+BPF_IND
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD|BPF_H|BPF_IND, 1),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x4567;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0011: BPF_LD|BPF_B|BPF_IND
|
||||
* Test 0011: BPF_LD+BPF_B+BPF_IND
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD|BPF_B|BPF_IND, 1),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x45;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0012: BPF_LDX|BPF_MSH|BPF_B
|
||||
* Test 0012: BPF_LDX+BPF_MSH+BPF_B
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX|BPF_MSH|BPF_B, 1),
|
||||
BPF_STMT(BPF_MISC|BPF_TXA, 0),
|
||||
BPF_STMT(BPF_LDX+BPF_MSH+BPF_B, 1),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = (0x23 & 0xf) << 2;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0013: BPF_ST & BPF_LDX|BPF_MEM
|
||||
* Test 0013: BPF_ST & BPF_LDX+BPF_MEM
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ST, 7),
|
||||
BPF_STMT(BPF_LDX|BPF_MEM, 7),
|
||||
BPF_STMT(BPF_MISC|BPF_TXA, 0),
|
||||
BPF_STMT(BPF_LDX+BPF_MEM, 7),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -30,5 +30,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0014: BPF_STX & BPF_LD|BPF_MEM
|
||||
* Test 0014: BPF_STX & BPF_LD+BPF_MEM
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_STX, 7),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 7),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 7),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0015: BPF_JMP|BPF_JA
|
||||
* Test 0015: BPF_JMP+BPF_JA
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_JMP+BPF_JA, 1),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*-
|
||||
* Test 0016: BPF_JMP|BPF_JGT|BPF_K
|
||||
* Test 0016: BPF_JMP+BPF_JGT+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
BPF_JUMP(BPF_JMP|BPF_JGT|BPF_K, 0x01234567, 1, 0),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xc0decafe),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGT+BPF_K, 0x01234567, 1, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -33,5 +33,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*-
|
||||
* Test 0017: BPF_JMP|BPF_JGE|BPF_K
|
||||
* Test 0017: BPF_JMP+BPF_JGE+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0x01234566, 0, 1),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xc0decafe),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGE+BPF_K, 0x01234566, 0, 1),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -33,5 +33,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*-
|
||||
* Test 0018: BPF_JMP|BPF_JEQ|BPF_K
|
||||
* Test 0018: BPF_JMP+BPF_JEQ+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, 0x01234566, 1, 0),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xc0decafe),
|
||||
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x01234566, 1, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -33,5 +33,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,23 +1,23 @@
|
||||
/*-
|
||||
* Test 0019: BPF_JMP|BPF_JSET|BPF_K
|
||||
* Test 0019: BPF_JMP+BPF_JSET+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_K, 0x20000000, 3, 0),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_K, 0x10000000, 2, 0),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_K, 0x1, 2, 1),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
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),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x20000000, 3, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x10000000, 2, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x1, 2, 1),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_K, 0x08000000, 3, 0),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_K, 0x04000000, 2, 0),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_K, 0x02000000, 1, 0),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xc0decafe),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x08000000, 3, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x04000000, 2, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x02000000, 1, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -38,5 +38,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,21 +1,21 @@
|
||||
/*-
|
||||
* Test 0020: BPF_JMP|BPF_JGT|BPF_X
|
||||
* Test 0020: BPF_JMP+BPF_JGT+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x01234566),
|
||||
BPF_JUMP(BPF_JMP|BPF_JGT|BPF_X, 0, 2, 1),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
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),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x01234566),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGT+BPF_X, 0, 2, 1),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP|BPF_JGT|BPF_X, 0, 1, 0),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGT+BPF_X, 0, 1, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -36,5 +36,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,21 +1,21 @@
|
||||
/*-
|
||||
* Test 0021: BPF_JMP|BPF_JGE|BPF_X
|
||||
* Test 0021: BPF_JMP+BPF_JGE+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_X, 0, 2, 1),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
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),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGE+BPF_X, 0, 2, 1),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x01234566),
|
||||
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_X, 0, 0, 1),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x01234566),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGE+BPF_X, 0, 0, 1),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -36,5 +36,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,21 +1,21 @@
|
||||
/*-
|
||||
* Test 0022: BPF_JMP|BPF_JEQ|BPF_X
|
||||
* Test 0022: BPF_JMP+BPF_JEQ+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_X, 0, 2, 1),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
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),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_X, 0, 2, 1),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x01234566),
|
||||
BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_X, 0, 1, 0),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x01234566),
|
||||
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_X, 0, 1, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -36,5 +36,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,31 +1,31 @@
|
||||
/*-
|
||||
* Test 0023: BPF_JMP|BPF_JSET|BPF_X
|
||||
* Test 0023: BPF_JMP+BPF_JSET+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x40000000),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 0, 7, 0),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x20000000),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 0, 5, 0),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x10000000),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 0, 3, 0),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x1),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 0x1, 2, 1),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
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),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x40000000),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0, 7, 0),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x20000000),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0, 5, 0),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x10000000),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0, 3, 0),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x1),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0x1, 2, 1),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x08000000),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 0, 5, 0),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x04000000),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 0, 3, 0),
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0x02000000),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 0, 1, 0),
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x08000000),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0, 5, 0),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x04000000),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0, 3, 0),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x02000000),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0, 1, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -46,5 +46,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0024: BPF_ALU|BPF_ADD|BPF_X
|
||||
* Test 0024: BPF_ALU+BPF_ADD+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xbeadb8dd),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x20000801),
|
||||
BPF_STMT(BPF_ALU+BPF_ADD+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0025: BPF_ALU|BPF_SUB|BPF_X
|
||||
* Test 0025: BPF_ALU+BPF_SUB+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x20000801),
|
||||
BPF_STMT(BPF_ALU+BPF_SUB+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xbeadb8dd;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0026: BPF_ALU|BPF_MUL|BPF_X
|
||||
* Test 0026: BPF_ALU+BPF_MUL+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdead),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_MUL+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xa7c2da06;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0027: BPF_ALU|BPF_DIV|BPF_X
|
||||
* Test 0027: BPF_ALU+BPF_DIV+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xdead),
|
||||
BPF_STMT(BPF_ALU+BPF_DIV+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0028: BPF_ALU|BPF_AND|BPF_X
|
||||
* Test 0028: BPF_ALU+BPF_AND+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_ALU+BPF_AND+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc08cc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0029: BPF_ALU|BPF_OR|BPF_X
|
||||
* Test 0029: BPF_ALU+BPF_OR+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_ALU+BPF_OR+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeffcafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0030: BPF_ALU|BPF_LSH|BPF_X
|
||||
* Test 0030: BPF_ALU+BPF_LSH+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdefc0),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 9),
|
||||
BPF_STMT(BPF_ALU+BPF_LSH+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x1bdf8000;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0031: BPF_ALU|BPF_RSH|BPF_X
|
||||
* Test 0031: BPF_ALU+BPF_RSH+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 13),
|
||||
BPF_STMT(BPF_ALU+BPF_RSH+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x6f56e;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0032: BPF_ALU|BPF_ADD|BPF_K
|
||||
* Test 0032: BPF_ALU+BPF_ADD+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xbeadb8dd),
|
||||
BPF_STMT(BPF_ALU+BPF_ADD+BPF_K, 0x20000801),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0033: BPF_ALU|BPF_SUB|BPF_K
|
||||
* Test 0033: BPF_ALU+BPF_SUB+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_SUB+BPF_K, 0x20000801),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xbeadb8dd;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0034: BPF_ALU|BPF_MUL|BPF_K
|
||||
* Test 0034: BPF_ALU+BPF_MUL+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdead),
|
||||
BPF_STMT(BPF_ALU+BPF_MUL+BPF_K, 0xc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xa7c2da06;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0035: BPF_ALU|BPF_DIV|BPF_K
|
||||
* Test 0035: BPF_ALU+BPF_DIV+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
|
||||
BPF_STMT(BPF_ALU+BPF_DIV+BPF_K, 0xdead),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0036: BPF_ALU|BPF_AND|BPF_K
|
||||
* Test 0036: BPF_ALU+BPF_AND+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_AND+BPF_K, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc08cc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0037: BPF_ALU|BPF_OR|BPF_K
|
||||
* Test 0037: BPF_ALU+BPF_OR+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_OR+BPF_K, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeffcafe;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0038: BPF_ALU|BPF_LSH|BPF_K
|
||||
* Test 0038: BPF_ALU+BPF_LSH+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdefc0),
|
||||
BPF_STMT(BPF_ALU+BPF_LSH+BPF_K, 9),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x1bdf8000;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0039: BPF_ALU|BPF_RSH|BPF_K
|
||||
* Test 0039: BPF_ALU+BPF_RSH+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_RSH+BPF_K, 13),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0x6f56e;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0040: BPF_ALU|BPF_NEG
|
||||
* Test 0040: BPF_ALU+BPF_NEG
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x21523f22),
|
||||
BPF_STMT(BPF_ALU+BPF_NEG, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,16 +1,16 @@
|
||||
/*-
|
||||
* Test 0041: BPF_MISC|BPF_TAX
|
||||
* Test 0041: BPF_MISC+BPF_TAX
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_MISC|BPF_TAX, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_MISC+BPF_TAX, 0),
|
||||
BPF_STMT(BPF_STX, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 0),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -30,5 +30,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0042: Check boundary conditions (BPF_LD|BPF_W|BPF_ABS)
|
||||
* Test 0042: Check boundary conditions (BPF_LD+BPF_W+BPF_ABS)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD|BPF_W|BPF_ABS, 2),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 2),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0043: Check boundary conditions (BPF_LD|BPF_H|BPF_ABS)
|
||||
* Test 0043: Check boundary conditions (BPF_LD+BPF_H+BPF_ABS)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 2),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 2),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0044: Check boundary conditions (BPF_LD|BPF_B|BPF_ABS)
|
||||
* Test 0044: Check boundary conditions (BPF_LD+BPF_B+BPF_ABS)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD|BPF_B|BPF_ABS, 2),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 2),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0045: Check boundary conditions (BPF_LD|BPF_W|BPF_IND)
|
||||
* Test 0045: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 2),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0046: Check boundary conditions (BPF_LD|BPF_H|BPF_IND)
|
||||
* Test 0046: Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 2),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0047: Check boundary conditions (BPF_LD|BPF_B|BPF_IND)
|
||||
* Test 0047: Check boundary conditions (BPF_LD+BPF_B+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 2),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0048: Check boundary conditions (BPF_LDX|BPF_MSH|BPF_B)
|
||||
* Test 0048: Check boundary conditions (BPF_LDX+BPF_MSH+BPF_B)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_MSH+BPF_B, 2),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0049: Check boundary conditions (BPF_LD|BPF_W|BPF_ABS)
|
||||
* Test 0049: Check boundary conditions (BPF_LD+BPF_W+BPF_ABS)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD|BPF_W|BPF_ABS, 6),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 6),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0050: Check boundary conditions (BPF_LD|BPF_H|BPF_ABS)
|
||||
* Test 0050: Check boundary conditions (BPF_LD+BPF_H+BPF_ABS)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 4),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 4),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,5 +28,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0051: Check boundary conditions (BPF_LD|BPF_W|BPF_IND)
|
||||
* Test 0051: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 6),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0052: Check boundary conditions (BPF_LD|BPF_H|BPF_IND)
|
||||
* Test 0052: Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 4),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0053: Check boundary conditions (BPF_LD|BPF_B|BPF_IND)
|
||||
* Test 0053: Check boundary conditions (BPF_LD+BPF_B+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 3),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0054: Check boundary conditions (BPF_LD|BPF_W|BPF_IND)
|
||||
* Test 0054: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 6),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0055: Check boundary conditions (BPF_LD|BPF_H|BPF_IND)
|
||||
* Test 0055: Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 4),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0056: Check boundary conditions (BPF_LD|BPF_W|BPF_IND)
|
||||
* Test 0056: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 0xffffffff),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0057: Check boundary conditions (BPF_LD|BPF_H|BPF_IND)
|
||||
* Test 0057: Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 0xffffffff),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0058: Check boundary conditions (BPF_LD|BPF_B|BPF_IND)
|
||||
* Test 0058: Check boundary conditions (BPF_LD+BPF_B+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 0xffffffff),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0059: Check boundary conditions (BPF_LD|BPF_W|BPF_IND)
|
||||
* Test 0059: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0060: Check boundary conditions (BPF_LD|BPF_H|BPF_IND)
|
||||
* Test 0060: Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0061: Check boundary conditions (BPF_LD|BPF_B|BPF_IND)
|
||||
* Test 0061: Check boundary conditions (BPF_LD+BPF_B+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0062: Check boundary conditions (BPF_LD|BPF_W|BPF_IND)
|
||||
* Test 0062: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0063: Check boundary conditions (BPF_LD|BPF_H|BPF_IND)
|
||||
* Test 0063: Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0064: Check boundary conditions (BPF_LD|BPF_B|BPF_IND)
|
||||
* Test 0064: Check boundary conditions (BPF_LD+BPF_B+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0065: Check boundary conditions (BPF_LD|BPF_W|BPF_IND)
|
||||
* Test 0065: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0066: Check boundary conditions (BPF_LD|BPF_H|BPF_IND)
|
||||
* Test 0066: Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0067: Check boundary conditions (BPF_LD|BPF_B|BPF_IND)
|
||||
* Test 0067: Check boundary conditions (BPF_LD+BPF_B+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0068: Check boundary conditions (BPF_LD|BPF_W|BPF_IND)
|
||||
* Test 0068: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0069: Check boundary conditions (BPF_LD|BPF_H|BPF_IND)
|
||||
* Test 0069: Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0070: Check boundary conditions (BPF_LD|BPF_B|BPF_IND)
|
||||
* Test 0070: Check boundary conditions (BPF_LD+BPF_B+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0071: Check boundary conditions (BPF_LD|BPF_W|BPF_IND)
|
||||
* Test 0071: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0072: Check boundary conditions (BPF_LD|BPF_H|BPF_IND)
|
||||
* Test 0072: Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0073: Check boundary conditions (BPF_LD|BPF_B|BPF_IND)
|
||||
* Test 0073: Check boundary conditions (BPF_LD+BPF_B+BPF_IND)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*-
|
||||
* Test 0074: Divide by 0 (BPF_ALU|BPF_DIV|BPF_X)
|
||||
* Test 0074: Divide by 0 (BPF_ALU+BPF_DIV+BPF_X)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
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),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_ALU+BPF_DIV+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -29,5 +29,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*-
|
||||
* Test 0075: Check boundary conditions (BPF_LD|BPF_MEM)
|
||||
* Test 0075: Check boundary conditions (BPF_LD+BPF_MEM)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 0xffffffff),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -28,7 +28,7 @@ int invalid = 1;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
#ifdef BPF_JIT_COMPILER
|
||||
int expect_signal = SIGSEGV;
|
||||
#else
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*-
|
||||
* Test 0076: Check boundary conditions (BPF_LDX|BPF_MEM)
|
||||
* Test 0076: Check boundary conditions (BPF_LDX+BPF_MEM)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX|BPF_MEM, 0xffffffff),
|
||||
BPF_STMT(BPF_MISC|BPF_TXA, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_MEM, 0xffffffff),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,7 +29,7 @@ int invalid = 1;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
#ifdef BPF_JIT_COMPILER
|
||||
int expect_signal = SIGSEGV;
|
||||
#else
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ST, 0xffffffff),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
@ -28,7 +28,7 @@ int invalid = 1;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
#ifdef BPF_JIT_COMPILER
|
||||
int expect_signal = SIGSEGV;
|
||||
#else
|
||||
|
@ -6,9 +6,9 @@
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_STX, 0xffffffff),
|
||||
BPF_STMT(BPF_MISC|BPF_TXA, 0),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
@ -29,7 +29,7 @@ int invalid = 1;
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
#ifdef BPF_JIT_COMPILER
|
||||
int expect_signal = SIGSEGV;
|
||||
#else
|
||||
|
@ -25,5 +25,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = (u_int)-1;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
@ -8,39 +8,39 @@
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX|BPF_IMM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 0),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 30, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 1),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 28, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 2),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 26, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 3),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 24, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 4),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 22, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 5),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 20, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 6),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 18, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 7),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 16, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 8),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 14, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 9),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 12, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 10),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 10, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 11),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 8, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 12),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 6, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 13),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 4, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 14),
|
||||
BPF_JUMP(BPF_JMP|BPF_JSET|BPF_X, 2, 0, 0),
|
||||
BPF_STMT(BPF_LD|BPF_MEM, 15),
|
||||
BPF_STMT(BPF_RET|BPF_A, 0),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 30, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 1),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 28, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 2),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 26, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 3),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 24, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 4),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 22, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 5),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 20, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 6),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 18, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 7),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 16, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 8),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 14, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 9),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 12, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 10),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 10, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 11),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 8, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 12),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 6, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 13),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 4, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 14),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 2, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 15),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
@ -60,5 +60,5 @@ int invalid = 0;
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
|
||||
/* Expeced signal */
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user