Message ID | cover.1719234744.git.tanggeliang@kylinos.cn |
---|---|
Headers | show |
Series | Fixes for BPF selftests on loongarch | expand |
On Mon, 2024-06-24 at 21:27 +0800, Geliang Tang wrote: [...] > diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c b/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c > index bceff5900016..8c0306f344e9 100644 > --- a/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c > +++ b/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c > @@ -411,7 +411,8 @@ static void test_update_ca(void) > return; > > link = bpf_map__attach_struct_ops(skel->maps.ca_update_1); > - ASSERT_OK_PTR(link, "attach_struct_ops"); > + if (!ASSERT_OK_PTR(link, "attach_struct_ops")) > + return; At this point the 'skel' is initialized and needs a call to tcp_ca_update__destroy(). Please add a label at the end of this function and goto there instead of 'return'. Same problem in the rest of the hunks. [...]
From: Geliang Tang <tanggeliang@kylinos.cn> When I ran BPF selftests on loongarch recently, some errors occur. Fix them in this set. Geliang Tang (3): skmsg: null check for page in sk_msg_recvmsg inet: null check for close in inet_release selftests/bpf: Null checks for link in bpf_tcp_ca net/core/skmsg.c | 2 ++ net/ipv4/af_inet.c | 3 ++- tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c | 12 ++++++++---- 3 files changed, 12 insertions(+), 5 deletions(-)