]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/selftests: Add test for writable bare tracepoint
authorHou Tao <houtao1@huawei.com>
Mon, 4 Oct 2021 09:48:57 +0000 (17:48 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 8 Oct 2021 20:22:57 +0000 (13:22 -0700)
commitad8ed8a98efa38df492f9e97682feef0412634e4
treee2abd0f4d04594fc4204db299cb5b74be0d222f8
parent837126284b1a496166d9429d5d513e4edc4c00d1
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 <houtao1@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211004094857.30868-4-hotforest@gmail.com
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h
tools/testing/selftests/bpf/prog_tests/module_attach.c
tools/testing/selftests/bpf/progs/test_module_attach.c
tools/testing/selftests/bpf/test_progs.c
tools/testing/selftests/bpf/test_progs.h