Skip to content

Commit

Permalink
selftests: mptcp: add mptcp getsockopt test cases
Browse files Browse the repository at this point in the history
Add a test program that retrieves the three info types:
1. mptcp meta information
2. tcp info for subflow
3. subflow endpoint addresses

For all three rudimentary checks are added.

1. Meta information checks that the logical mptcp
   sequence numbers advance as expected, based on the bytes read
   (init seq + bytes_received/sent) and the connection state
   (after close, we should exect 1 extra byte due to FIN).

2. TCP info checks the number of bytes sent/received vs.
   sums of read/write syscall return values.

3. Subflow endpoint addresses are checked vs. getsockname/getpeername
   result.

Tests for forward compatibility (0-initialisation of output-only
fields in mptcp_subflow_data structure) are added as well.

Signed-off-by: Florian Westphal <fw@strlen.de>
  • Loading branch information
Florian Westphal authored and intel-lab-lkp committed Aug 16, 2021
1 parent ad95c9a commit 7eb1b6e
Show file tree
Hide file tree
Showing 3 changed files with 668 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/mptcp/Makefile
Expand Up @@ -8,7 +8,7 @@ CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include
TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \
simult_flows.sh mptcp_sockopt.sh

TEST_GEN_FILES = mptcp_connect pm_nl_ctl
TEST_GEN_FILES = mptcp_connect pm_nl_ctl mptcp_sockopt

TEST_FILES := settings

Expand Down

0 comments on commit 7eb1b6e

Please sign in to comment.