]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/bpf: Drop must_fail from network_helper_opts
authorGeliang Tang <tanggeliang@kylinos.cn>
Thu, 18 Jul 2024 06:22:30 +0000 (14:22 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 29 Jul 2024 19:52:45 +0000 (12:52 -0700)
commite1ee5a48b5b27e3e7bb294f80f7429c3d0466d19
tree93ceecdd4bae31b7a69926db2adb1e4eac7f7521
parenta63507f3b11de30fd7711ec244fe354fb4a01a09
selftests/bpf: Drop must_fail from network_helper_opts

The struct member "must_fail" of network_helper_opts() is only used in
cgroup_v1v2 tests, it makes sense to drop it from network_helper_opts.

Return value (fd) of connect_to_fd_opts() and the expect errno (EPERM)
can be checked in cgroup_v1v2.c directly, no need to check them in
connect_fd_to_addr() in network_helpers.c.

This also makes connect_fd_to_addr() function useless. It can be replaced
by connect().

Suggested-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/3faf336019a9a48e2e8951f4cdebf19e3ac6e441.1721282219.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tools/testing/selftests/bpf/network_helpers.c
tools/testing/selftests/bpf/network_helpers.h
tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c