diff options
author | Hou Tao <[email protected]> | 2021-10-04 17:48:57 +0800 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2021-10-08 13:22:57 -0700 |
commit | fa7f17d066bd0996b930b664aa0ed1f213fc1828 (patch) | |
tree | e2abd0f4d04594fc4204db299cb5b74be0d222f8 /tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h | |
parent | ccaf12d6215a56836472db220520cda8024d6c4f (diff) |
bpf/selftests: Add test for writable bare tracepoint
Add a writable bare tracepoint in bpf_testmod module, and
trigger its calling when reading /sys/kernel/bpf_testmod
with a specific buffer length. The reading will return
the value in writable context if the early return flag
is enabled in writable context.
Signed-off-by: Hou Tao <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h')
-rw-r--r-- | tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h index b3892dc40111..0d71e2607832 100644 --- a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h +++ b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h @@ -17,4 +17,9 @@ struct bpf_testmod_test_write_ctx { size_t len; }; +struct bpf_testmod_test_writable_ctx { + bool early_ret; + int val; +}; + #endif /* _BPF_TESTMOD_H */ |