Skip to content

Commit dcebe7a

Browse files
Geliang Tangintel-lab-lkp
authored andcommitted
Squash to "selftests/bpf: Add mptcp subflow subtest"
Should use dedicated ASSERT_OK_FD() to check the fds. Signed-off-by: Geliang Tang <[email protected]>
1 parent 1d732d3 commit dcebe7a

File tree

1 file changed

+3
-3
lines changed
  • tools/testing/selftests/bpf/prog_tests

1 file changed

+3
-3
lines changed

tools/testing/selftests/bpf/prog_tests/mptcp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,11 @@ static void run_subflow(void)
394394
socklen_t len;
395395

396396
server_fd = start_mptcp_server(AF_INET, ADDR_1, PORT_1, 0);
397-
if (!ASSERT_GE(server_fd, 0, "start_mptcp_server"))
397+
if (!ASSERT_OK_FD(server_fd, "start_mptcp_server"))
398398
return;
399399

400400
client_fd = connect_to_fd(server_fd, 0);
401-
if (!ASSERT_GE(client_fd, 0, "connect to fd"))
401+
if (!ASSERT_OK_FD(client_fd, "connect_to_fd"))
402402
goto close_server;
403403

404404
send_byte(client_fd);
@@ -429,7 +429,7 @@ static void test_subflow(void)
429429
struct bpf_link *link;
430430

431431
cgroup_fd = test__join_cgroup("/mptcp_subflow");
432-
if (!ASSERT_GE(cgroup_fd, 0, "join_cgroup: mptcp_subflow"))
432+
if (!ASSERT_OK_FD(cgroup_fd, "join_cgroup: mptcp_subflow"))
433433
return;
434434

435435
skel = mptcp_subflow__open_and_load();

0 commit comments

Comments
 (0)