Commit d6e16c33 authored by Yonghong Song's avatar Yonghong Song Committed by Greg Kroah-Hartman
Browse files

selftests/bpf: Replace CHECK with ASSERT_* in ns_current_pid_tgid test



[ Upstream commit 84239a24 ]

Replace CHECK in selftest ns_current_pid_tgid with recommended ASSERT_* style.
I also shortened subtest name as the prefix of subtest name is covered
by the test name already.

This patch does fix a testing issue. Currently even if bss->user_{pid,tgid}
is not correct, the test still passed since the clone func returns 0.
I fixed it to return a non-zero value if bss->user_{pid,tgid} is incorrect.

Signed-off-by: default avatarYonghong Song <yonghong.song@linux.dev>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20240315184859.2975543-1-yonghong.song@linux.dev


Stable-dep-of: 21f0b0af ("selftests/bpf: Fix include of <sys/fcntl.h>")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent bedda119
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment