On 12/17/25 05:04, Aleksei Oladko wrote:
> Some net kselftests use a fixed port range which overlap with process-exporter
> service already running on the host. When such a conflict happens,
> the test fail with:
>
> failed to bind receive socket: Address already in use
>
> Update the port range used by the affected tests to avoid conflicts
> with running daemon.
Can we use network namespace for this test instead?
Note: see ./tools/testing/selftests/net/in_netns.sh
>
> https://virtuozzo.atlassian.net/browse/VSTOR-120995
>
> Signed-off-by: Aleksei Oladko <[email protected]>
> ---
> tools/testing/selftests/net/reuseport_bpf.c | 2 +-
> tools/testing/selftests/net/reuseport_bpf_cpu.c | 2 +-
> tools/testing/selftests/net/reuseport_bpf_numa.c | 2 +-
> tools/testing/selftests/net/reuseport_dualstack.c | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/selftests/net/reuseport_bpf.c
> b/tools/testing/selftests/net/reuseport_bpf.c
> index 65aea27d761c..3b85c579cbec 100644
> --- a/tools/testing/selftests/net/reuseport_bpf.c
> +++ b/tools/testing/selftests/net/reuseport_bpf.c
> @@ -606,7 +606,7 @@ int main(void)
> .protocol = SOCK_STREAM,
> .recv_socks = 10,
> .recv_port = 8013,
> - .send_port_min = 9240});
> + .send_port_min = 9260});
> test_extra_filter((struct test_params) {
> .recv_family = AF_INET6,
> .protocol = SOCK_STREAM,
> diff --git a/tools/testing/selftests/net/reuseport_bpf_cpu.c
> b/tools/testing/selftests/net/reuseport_bpf_cpu.c
> index 2d646174729f..c0b16728876c 100644
> --- a/tools/testing/selftests/net/reuseport_bpf_cpu.c
> +++ b/tools/testing/selftests/net/reuseport_bpf_cpu.c
> @@ -29,7 +29,7 @@
> #include <sys/socket.h>
> #include <unistd.h>
>
> -static const int PORT = 8888;
> +static const int PORT = 8788;
>
> static void build_rcv_group(int *rcv_fd, size_t len, int family, int proto)
> {
> diff --git a/tools/testing/selftests/net/reuseport_bpf_numa.c
> b/tools/testing/selftests/net/reuseport_bpf_numa.c
> index c9ba36aa688e..2a87e44082d9 100644
> --- a/tools/testing/selftests/net/reuseport_bpf_numa.c
> +++ b/tools/testing/selftests/net/reuseport_bpf_numa.c
> @@ -25,7 +25,7 @@
>
> #include "../kselftest.h"
>
> -static const int PORT = 8888;
> +static const int PORT = 8788;
>
> static void build_rcv_group(int *rcv_fd, size_t len, int family, int proto)
> {
> diff --git a/tools/testing/selftests/net/reuseport_dualstack.c
> b/tools/testing/selftests/net/reuseport_dualstack.c
> index fb7a59ed759e..0a90dc154d1c 100644
> --- a/tools/testing/selftests/net/reuseport_dualstack.c
> +++ b/tools/testing/selftests/net/reuseport_dualstack.c
> @@ -26,7 +26,7 @@
> #include <sys/socket.h>
> #include <unistd.h>
>
> -static const int PORT = 8888;
> +static const int PORT = 8788;
>
> static void build_rcv_fd(int family, int proto, int *rcv_fds, int count)
> {
--
Best regards, Pavel Tikhomirov
Senior Software Developer, Virtuozzo.
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel