summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/verifier/ld_dw.c
blob: 0f18e62f0099bbcf2e6bb982138c42cda40b0d76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
	"ld_dw: xor semi-random 64 bit imms, test 1",
	.insns = { },
	.data = { },
	.fill_helper = bpf_fill_rand_ld_dw,
	.prog_type = BPF_PROG_TYPE_SCHED_CLS,
	.result = ACCEPT,
	.retval = 4090,
},
{
	"ld_dw: xor semi-random 64 bit imms, test 2",
	.insns = { },
	.data = { },
	.fill_helper = bpf_fill_rand_ld_dw,
	.prog_type = BPF_PROG_TYPE_SCHED_CLS,
	.result = ACCEPT,
	.retval = 2047,
},
{
	"ld_dw: xor semi-random 64 bit imms, test 3",
	.insns = { },
	.data = { },
	.fill_helper = bpf_fill_rand_ld_dw,
	.prog_type = BPF_PROG_TYPE_SCHED_CLS,
	.result = ACCEPT,
	.retval = 511,
},
{
	"ld_dw: xor semi-random 64 bit imms, test 4",
	.insns = { },
	.data = { },
	.fill_helper = bpf_fill_rand_ld_dw,
	.prog_type = BPF_PROG_TYPE_SCHED_CLS,
	.result = ACCEPT,
	.retval = 5,
},
{
	"ld_dw: xor semi-random 64 bit imms, test 5",
	.insns = { },
	.data = { },
	.fill_helper = bpf_fill_rand_ld_dw,
	.prog_type = BPF_PROG_TYPE_SCHED_CLS,
	.result = ACCEPT,
	.retval = 1000000 - 6,
},