]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Correct the check of join cgroup
authorJason Xing <kerneljasonxing@gmail.com>
Tue, 4 Feb 2025 05:11:54 +0000 (13:11 +0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Fri, 7 Feb 2025 05:18:04 +0000 (21:18 -0800)
commit003be25ab99cf9d1f57952737d1ea05e866fda43
tree41f9fec78a8c0c7d1218956593d34a8451723512
parent0abff462d802a352c87b7f5e71b442b09bf9cfff
selftests/bpf: Correct the check of join cgroup

Use ASSERT_OK_FD to check the return value of join cgroup,
or else this test will pass even if the fd < 0. ASSERT_OK_FD
can print the error message to the console.

Suggested-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Acked-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/all/6d62bd77-6733-40c7-b240-a1aeff55566c@linux.dev/
Link: https://patch.msgid.link/20250204051154.57655-1-kerneljasonxing@gmail.com
tools/testing/selftests/bpf/prog_tests/setget_sockopt.c