Skip to content

Commit 55b2442

Browse files
jpbruckerborkmann
authored andcommitted
selftests/bpf: Fix cgroup sockopt verifier test
Since the BPF_PROG_TYPE_CGROUP_SOCKOPT verifier test does not set an attach type, bpf_prog_load_check_attach() disallows loading the program and the test is always skipped: #434/p perfevent for cgroup sockopt SKIP (unsupported program type 25) Fix the issue by setting a valid attach type. Fixes: 0456ea1 ("bpf: Enable more helpers for BPF_PROG_TYPE_CGROUP_{DEVICE,SYSCTL,SOCKOPT}") Signed-off-by: Jean-Philippe Brucker <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Jakub Sitnicki <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent c8b1d74 commit 55b2442

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/bpf/verifier/event_output.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
"perfevent for cgroup sockopt",
113113
.insns = { __PERF_EVENT_INSNS__ },
114114
.prog_type = BPF_PROG_TYPE_CGROUP_SOCKOPT,
115+
.expected_attach_type = BPF_CGROUP_SETSOCKOPT,
115116
.fixup_map_event_output = { 4 },
116117
.result = ACCEPT,
117118
.retval = 1,

0 commit comments

Comments
 (0)