selftest: tcp: Add bind() tests for SO_REUSEADDR/SO_REUSEPORT.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 26 Mar 2024 20:42:51 +0000 (13:42 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 21:48:39 +0000 (14:48 -0700)
commit7679f0968d01878b8da80c5078eebe23231a19e8
tree985ea3819db1b4307f485a756dc2d687202612dd
parentd37f2f72c91f2c5b61db7e6685c8b4bfdff85cb8
selftest: tcp: Add bind() tests for SO_REUSEADDR/SO_REUSEPORT.

This patch adds two tests using SO_REUSEADDR and SO_REUSEPORT and
defines errno for each test case.

SO_REUSEADDR/SO_REUSEPORT is set for the per-fixture two bind()
calls.

The notable pattern is the pair of v6only [::] and plain [::].
The two sockets are put into the same tb2, where per-bucket v6only
flag would be useless to detect bind() conflict.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20240326204251.51301-9-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/bind_wildcard.c