Thread (9 messages) 9 messages, 3 authors, 2023-01-11

Re: [PATCH net-next v2 2/2] selftests/net: Cover the IP_LOCAL_PORT_RANGE socket option

From: Jakub Sitnicki <jakub@cloudflare.com>
Date: 2023-01-11 12:45:44

On Wed, Jan 11, 2023 at 10:25 AM +09, Kuniyuki Iwashima wrote:
From:   Jakub Sitnicki <jakub@cloudflare.com>
Date:   Tue, 10 Jan 2023 14:37:30 +0100
quoted
Exercise IP_LOCAL_PORT_RANGE socket option in various scenarios:

1. pass invalid values to setsockopt
2. pass a range outside of the per-netns port range
3. configure a single-port range
4. exhaust a configured multi-port range
5. check interaction with late-bind (IP_BIND_ADDRESS_NO_PORT)
6. set then get the per-socket port range

v1 -> v2:
 * selftests: Instead of iterating over socket families (ip4, ip6) and types
   (tcp, udp), generate tests for each combo from a template. This keeps the
   code indentation level down and makes tests more granular.
We can use TEST_F(), FIXTURE_VARIANT() and FIXTURE_VARIANT_ADD() for
such cases.

e.g.) tools/testing/selftests/net/tls.c
Just what I need. Thank you for pointing me to it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help