From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v2 00/10] selftests: cover more MPTCP socket options
Date: Thu, 21 Aug 2025 11:57:48 +0200 [thread overview]
Message-ID: <81664b69-0110-4ac5-926d-295fef8ca072@kernel.org> (raw)
In-Reply-To: <cover.1755680616.git.tanggeliang@kylinos.cn>
Hi Geliang,
Thank you for looking at that!
On 21/08/2025 10:54, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> v2:
> - IP_FREEBIND/IPV6_FREEBIND are set in do_getsockopt_transparent, fix
> it.
> - Use "for" loops in mptcp_sockopt.sh.
> - Move "add IP_TOS socket option test" out of this set.
> - some cleanups.
>
> This series significantly expands MPTCP socket option test coverage
> by adding validation for 10 more socket options:
>
> 1. SO_REUSEADDR/SO_REUSEPORT - Test socket reuse capabilities
> 2. SO_BINDTODEVICE/SO_BINDTOIFINDEX - Validate interface binding
> 3. IP_TOS - Verify Type of Service handling
> 4. IP_FREEBIND - Test free address binding
> 5. IP_TRANSPARENT - Validate transparent proxying
> 6. IP_BIND_ADDRESS_NO_PORT - Test deferred port binding
> 7. IP_LOCAL_PORT_RANGE - Check local port range restriction
> 8. IPV6_V6ONLY - Verify IPv6-only sockets
>
> Each commit systematically adds:
> - Setsockopt/getsockopt operations in mptcp_sockopt.c
> - Dedicated test cases in mptcp_sockopt.sh
> - IPv4 and IPv6 coverage
> - Error handling and edge case validation
>
> The new tests verify that MPTCP correctly propagates socket options to
> subflows and maintains consistent behavior across address families.
I don't know if the last sentence is correct: if I'm not mistaken, it
looks like the new code "only" set and get some socket options, no?
If yes, that's not enough to me to verify a socket option is doing the
expected job. I think it might even be better not to include such code
giving a false sentiment of "it's fully tested" (+ more code to
maintain). All these options are supposed to affect the behaviour
somehow: a test should then mainly validate that, and check this
behaviour is similar to TCP.
In other words, such tests should be similar to what you did with
TCP_MAXSEG in Packetdrill:
https://github.com/multipath-tcp/packetdrill/pull/161
I think that when validating a new socket options, the following should
be checked:
- Comparison with TCP: the behaviour should be as closed as possible
- set/get before and after the connection
- behaviour on the client and server side
- important: checking the new expected behaviour
Checking all this should probably be easier with Packetdrill, especially
to validate a behavioural change. But it might not be always possible,
or best suited, like with IP_BIND_ADDRESS_NO_PORT and
IP_LOCAL_PORT_RANGE which are "properly" tested in:
tools/testing/selftests/net/mptcp/ip_local_port_range.c
What do you think?
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2025-08-21 9:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 8:54 [PATCH mptcp-next v2 00/10] selftests: cover more MPTCP socket options Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 01/10] selftests: mptcp: sockopt: improve test output clarity Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 02/10] selftests: mptcp: sockopt: add SO_REUSEADDR test helper Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 03/10] selftests: mptcp: sockopt: add SO_REUSEPORT test Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 04/10] selftests: mptcp: sockopt: add SO_BINDTODEVICE test Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 05/10] selftests: mptcp: sockopt: add SO_BINDTOIFINDEX test Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 06/10] selftests: mptcp: sockopt: add IP_FREEBIND tests Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 07/10] selftests: mptcp: sockopt: add IP_TRANSPARENT tests Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 08/10] selftests: mptcp: sockopt: add IP_BIND_ADDRESS_NO_PORT test Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 09/10] selftests: mptcp: sockopt: add IP_LOCAL_PORT_RANGE test Geliang Tang
2025-08-21 8:54 ` [PATCH mptcp-next v2 10/10] selftests: mptcp: sockopt: add IPV6_V6ONLY test Geliang Tang
2025-08-21 9:57 ` Matthieu Baerts [this message]
2025-08-21 11:21 ` [PATCH mptcp-next v2 00/10] selftests: cover more MPTCP socket options MPTCP CI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81664b69-0110-4ac5-926d-295fef8ca072@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=tanggeliang@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.