diff options
author | Juntong Deng <juntong.deng@outlook.com> | 2024-10-14 10:25:53 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-10-16 09:21:18 -0700 |
commit | f987a640e853e96c85f8193d0c2f79744622e3d8 (patch) | |
tree | 6bcb3d1fe1766f54ad45f766acfef08a61fc96ed /kernel/kallsyms_selftest.c | |
parent | 675c3596ff32c040d1dd2e28dd57e83e634b9f60 (diff) |
selftests/bpf: Add tests for bpf_task_from_vpid() kfunc
This patch adds test cases for bpf_task_from_vpid() kfunc.
task_kfunc_from_vpid_no_null_check is used to test the case where
the return value is not checked for NULL pointer.
test_task_from_vpid_current is used to test obtaining the
struct task_struct of the process in the pid namespace based on vpid.
test_task_from_vpid_invalid is used to test the case of invalid vpid.
test_task_from_vpid_current and test_task_from_vpid_invalid will run
in the new namespace.
Signed-off-by: Juntong Deng <juntong.deng@outlook.com>
Link: https://lore.kernel.org/r/AM6PR03MB5848F13435CD650AC4B7BD7099442@AM6PR03MB5848.eurprd03.prod.outlook.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/kallsyms_selftest.c')
0 files changed, 0 insertions, 0 deletions