aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h
diff options
context:
space:
mode:
authorQais Yousef <qais.yousef@arm.com>2021-01-19 12:22:37 +0000
committerAlexei Starovoitov <ast@kernel.org>2021-01-20 14:14:05 -0800
commit407be92206d54517765e028c8b79032eb8f8ac86 (patch)
tree55a14edc1e68c6e2109cc0872a52b12094d75abd /tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h
parent6939f4ef16d48f2093f337162cfc041d0e30ed25 (diff)
selftests: bpf: Add a new test for bare tracepoints
Reuse module_attach infrastructure to add a new bare tracepoint to check we can attach to it as a raw tracepoint. Signed-off-by: Qais Yousef <qais.yousef@arm.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20210119122237.2426878-3-qais.yousef@arm.com
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h')
-rw-r--r--tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h
index b83ea448bc79..89c6d58e5dd6 100644
--- a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h
+++ b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h
@@ -28,6 +28,12 @@ TRACE_EVENT(bpf_testmod_test_read,
__entry->pid, __entry->comm, __entry->off, __entry->len)
);
+/* A bare tracepoint with no event associated with it */
+DECLARE_TRACE(bpf_testmod_test_write_bare,
+ TP_PROTO(struct task_struct *task, struct bpf_testmod_test_write_ctx *ctx),
+ TP_ARGS(task, ctx)
+);
+
#endif /* _BPF_TESTMOD_EVENTS_H */
#undef TRACE_INCLUDE_PATH