]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: Refactor out some functions in ns_current_pid_tgid test
authorYonghong Song <yonghong.song@linux.dev>
Fri, 15 Mar 2024 18:49:04 +0000 (11:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:16 +0000 (16:29 +0200)
commit17536f3b7262bdd354da1984b021c8b9124fd300
tree3331203b81ed2c622f653bee48851e4683d138c1
parentd6e16c33e093f23fc2ee40750d467d1616350250
selftests/bpf: Refactor out some functions in ns_current_pid_tgid test

[ Upstream commit 4d4bd29e363c467752536f874a2cba10a5923c59 ]

Refactor some functions in both user space code and bpf program
as these functions are used by later cgroup/sk_msg tests.
Another change is to mark tp program optional loading as later
patches will use optional loading as well since they have quite
different attachment and testing logic.

There is no functionality change.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240315184904.2976123-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