From b98a172e08b9498fd9574b18e03364eb97666139 Mon Sep 17 00:00:00 2001 From: Geliang Tang Date: Thu, 1 Aug 2024 21:00:37 +0800 Subject: [PATCH] Squash to "selftests/bpf: Add bpf scheduler test" Drop ASSERT_OK() and ASSERT_OK_PTR() since endpoint_init() or sched_init() may fail. Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/prog_tests/mptcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c index a6afced3ca8253..91bad33b0c728f 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -457,7 +457,7 @@ static struct nstoken *sched_init(char *flags, char *sched) if (!ASSERT_OK_PTR(nstoken, "create_netns")) return NULL; - if (!ASSERT_OK(endpoint_init("subflow"), "endpoint_init")) + if (endpoint_init("subflow")) goto fail; SYS(fail, "ip netns exec %s sysctl -qw net.mptcp.scheduler=%s", NS_TEST, sched); @@ -519,7 +519,7 @@ static void test_default(void) struct nstoken *nstoken; nstoken = sched_init("subflow", "default"); - if (!ASSERT_OK_PTR(nstoken, "sched_init:default")) + if (!nstoken) goto fail; send_data_and_verify("default", WITH_DATA, WITH_DATA);