diff options
author | Geliang Tang <tanggeliang@kylinos.cn> | 2024-04-23 13:35:28 +0300 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2024-04-24 23:12:28 +0300 |
commit | 285cffbaa8e6056c2595e07e3a320e55c71870ad (patch) | |
tree | 22eb34fa81d0539efda298351b62c08b15845dfb /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 151f7442436658ee84076681d8f52e987fe147ea (diff) | |
download | linux-285cffbaa8e6056c2595e07e3a320e55c71870ad.tar.xz |
selftests/bpf: Use log_err in open_netns/close_netns
ASSERT helpers defined in test_progs.h shouldn't be used in public
functions like open_netns() and close_netns(). Since they depend on
test__fail() which defined in test_progs.c. Public functions may be
used not only in test_progs.c, but in other tests like test_sock_addr.c
in the next commit.
This patch uses log_err() to replace ASSERT helpers in open_netns()
and close_netns() in network_helpers.c to decouple dependencies, then
uses ASSERT_OK_PTR() to check the return values of all open_netns().
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/d1dad22b2ff4909af3f8bfd0667d046e235303cb.1713868264.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions