]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: Add test for __nullable suffix in tp_btf
authorPhilo Lu <lulie@linux.alibaba.com>
Wed, 11 Sep 2024 03:37:16 +0000 (11:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:53:20 +0000 (13:53 +0100)
commit6b5b45b153f3ca6f5fa57d84a33a2dff9c9eeeec
tree33e1e9b8cf16f20839de773bdb544d2274e4e3a4
parent996264f5bad01ef260ebae3873fc8efd443c2539
selftests/bpf: Add test for __nullable suffix in tp_btf

[ Upstream commit 2060f07f861a237345922023e9347a204c0795af ]

Add a tracepoint with __nullable suffix in bpf_testmod, and add cases
for it:

$ ./test_progs -t "tp_btf_nullable"
 #406/1   tp_btf_nullable/handle_tp_btf_nullable_bare1:OK
 #406/2   tp_btf_nullable/handle_tp_btf_nullable_bare2:OK
 #406     tp_btf_nullable:OK
 Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Philo Lu <lulie@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240911033719.91468-3-lulie@linux.alibaba.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Stable-dep-of: cb4158ce8ec8 ("bpf: Mark raw_tp arguments with PTR_MAYBE_NULL")
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
tools/testing/selftests/bpf/prog_tests/tp_btf_nullable.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_tp_btf_nullable.c [new file with mode: 0644]