Message ID | d3c4d30642dd6e5ac4d96d40c1d29b2fc04e47f6.1730260715.git.tanggeliang@kylinos.cn (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | de2a335efeba72f9d6bf7c66a9c1a9f2fc58f46b |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | add netns helpers | expand |
Context | Check | Description |
---|---|---|
matttbe/KVM_Validation__normal | success | Success! ✅ |
matttbe/KVM_Validation__debug | success | Success! ✅ |
matttbe/KVM_Validation__btf-normal__only_bpftest_all_ | success | Success! ✅ |
matttbe/KVM_Validation__btf-debug__only_bpftest_all_ | success | Success! ✅ |
matttbe/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 26 lines checked |
matttbe/shellcheck | success | MPTCP selftests files have not been modified |
matttbe/build | success | Build and static analysis OK |
diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c index e32eceabfc40..238d2f1cd96e 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -526,7 +526,7 @@ static void run_iters_subflow(void) static void test_iters_subflow(void) { struct mptcp_bpf_iters *skel; - struct nstoken *nstoken; + struct netns_obj *netns; int cgroup_fd; cgroup_fd = test__join_cgroup("/iters_subflow"); @@ -542,8 +542,8 @@ static void test_iters_subflow(void) if (!ASSERT_OK_PTR(skel->links.iters_subflow, "attach getsockopt")) goto skel_destroy; - nstoken = create_netns(); - if (!ASSERT_OK_PTR(nstoken, "create_netns: iters_subflow")) + netns = netns_new(NS_TEST, true); + if (!ASSERT_OK_PTR(netns, "netns_new: iters_subflow")) goto skel_destroy; if (endpoint_init("subflow", 4) < 0) @@ -555,7 +555,7 @@ static void test_iters_subflow(void) ASSERT_EQ(skel->bss->ids, 10, "subflow ids"); close_netns: - cleanup_netns(nstoken); + netns_free(netns); skel_destroy: mptcp_bpf_iters__destroy(skel); close_cgroup: