selftests/bpf: Add a sk_msg prog bpf_get_ns_current_pid_tgid() test
authorYonghong Song <yonghong.song@linux.dev>
Fri, 15 Mar 2024 18:49:15 +0000 (11:49 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 19 Mar 2024 21:27:00 +0000 (14:27 -0700)
commit4c195ee4865d57786b3a63018d489b8a07877354
tree334907acabeb9fe6a105708b078f8b54f68f9e6e
parent87ade6cd859ea9dbde6e80b3fcf717ed9a73b4a9
selftests/bpf: Add a sk_msg prog bpf_get_ns_current_pid_tgid() test

Add a sk_msg bpf program test where the program is running in a pid
namespace. The test is successful:
  #165/4   ns_current_pid_tgid/new_ns_sk_msg:OK

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240315184915.2976718-1-yonghong.song@linux.dev
tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c
tools/testing/selftests/bpf/progs/test_ns_current_pid_tgid.c