]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: Add a cgroup prog bpf_get_ns_current_pid_tgid() test
authorYonghong Song <yonghong.song@linux.dev>
Fri, 15 Mar 2024 18:49:10 +0000 (11:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:17 +0000 (16:29 +0200)
commit4730b07ef7745d7cd48c6aa9f72d75ac136d436f
tree558785c2f93bcca25da49503043c24861d89d745
parent17536f3b7262bdd354da1984b021c8b9124fd300
selftests/bpf: Add a cgroup prog bpf_get_ns_current_pid_tgid() test

[ Upstream commit 87ade6cd859ea9dbde6e80b3fcf717ed9a73b4a9 ]

Add a cgroup bpf program test where the bpf program is running
in a pid namespace. The test is successfully:
  #165/3   ns_current_pid_tgid/new_ns_cgrp:OK

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240315184910.2976522-1-yonghong.song@linux.dev
Stable-dep-of: 21f0b0af9772 ("selftests/bpf: Fix include of <sys/fcntl.h>")
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c
tools/testing/selftests/bpf/progs/test_ns_current_pid_tgid.c