Skip to content

Commit

Permalink
Squash to "selftests/bpf: Add bpf scheduler test"
Browse files Browse the repository at this point in the history
Drop ASSERT_OK() and ASSERT_OK_PTR() since endpoint_init() or
sched_init() may fail.

Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang authored and intel-lab-lkp committed Aug 2, 2024
1 parent 8b8bea5 commit b98a172
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/bpf/prog_tests/mptcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b98a172

Please sign in to comment.