* [PATCH 1/5] selftests: net: fib_tests: skip rp_filter test if cls_basic is unavailable
2026-01-20 23:05 [PATCH 0/5] selftests: net: fix false failures due to missing features and host interference Aleksei Oladko
@ 2026-01-20 23:05 ` Aleksei Oladko
2026-01-20 23:05 ` [PATCH 2/5] selftests: net: make ovs-dpctl.py fail when pyroute2 is unsupported Aleksei Oladko
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Aleksei Oladko @ 2026-01-20 23:05 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan
Cc: netdev, linux-kselftest, linux-kernel, Aleksei Oladko
The rp_filter test in fib_tests.sh installs tc filters using the
"basic" classifier but does not verify the corresponding kernel
module (cls_basic) is available. On kernels built without
CONFIG_NET_CLS_BASIC, the tc command fails and the rp_filter test
is reported as a failure.
Add a check for the presence of the cls_basic module and skip
the rp_filter test when the classifier is not available.
Signed-off-by: Aleksei Oladko <aleksey.oladko@virtuozzo.com>
---
tools/testing/selftests/net/fib_tests.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index c5694cc4ddd2..fa58f9b6bed0 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -441,6 +441,8 @@ fib_rp_filter_test()
echo
echo "IPv4 rp_filter tests"
+ modprobe cls_basic || return $ksft_skip
+
setup
set -e
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/5] selftests: net: make ovs-dpctl.py fail when pyroute2 is unsupported
2026-01-20 23:05 [PATCH 0/5] selftests: net: fix false failures due to missing features and host interference Aleksei Oladko
2026-01-20 23:05 ` [PATCH 1/5] selftests: net: fib_tests: skip rp_filter test if cls_basic is unavailable Aleksei Oladko
@ 2026-01-20 23:05 ` Aleksei Oladko
2026-01-22 21:32 ` Aaron Conole
2026-01-20 23:05 ` [PATCH 3/5] selftests: net: run reuseport tests in netns to avoid port conflicts Aleksei Oladko
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Aleksei Oladko @ 2026-01-20 23:05 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan
Cc: netdev, linux-kselftest, linux-kernel, Aleksei Oladko
The pmtu.sh kselftest configures OVS using ovs-dpctl.py and falls back
to ovs-vsctl only when ovs-dpctl.py fails. However, ovs-dpctl.py exits
with a success status when the installed pyroute2 package version is
lower than 0.6, even though the OVS datapath is not configured.
As a result, pmtu.sh assumes that the setup was successful and
continues running the test, which later fails due to the missing
OVS configuration.
Fix the exit code handling in ovs-dpctl.py so that pmtu.sh can detect
that the setup did not complete successfully and fall back to
ovs-vsctl.
Signed-off-by: Aleksei Oladko <aleksey.oladko@virtuozzo.com>
---
tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
index b521e0dea506..848f61fdcee0 100644
--- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
+++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
@@ -2583,7 +2583,7 @@ def main(argv):
prverscheck = pyroute2.__version__.split(".")
if int(prverscheck[0]) == 0 and int(prverscheck[1]) < 6:
print("Need to upgrade the python pyroute2 package to >= 0.6.")
- sys.exit(0)
+ sys.exit(1)
parser = argparse.ArgumentParser()
parser.add_argument(
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/5] selftests: net: make ovs-dpctl.py fail when pyroute2 is unsupported
2026-01-20 23:05 ` [PATCH 2/5] selftests: net: make ovs-dpctl.py fail when pyroute2 is unsupported Aleksei Oladko
@ 2026-01-22 21:32 ` Aaron Conole
0 siblings, 0 replies; 8+ messages in thread
From: Aaron Conole @ 2026-01-22 21:32 UTC (permalink / raw)
To: Aleksei Oladko
Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan, netdev, linux-kselftest, linux-kernel
Hi Aleksei,
Aleksei Oladko <aleksey.oladko@virtuozzo.com> writes:
> The pmtu.sh kselftest configures OVS using ovs-dpctl.py and falls back
> to ovs-vsctl only when ovs-dpctl.py fails. However, ovs-dpctl.py exits
> with a success status when the installed pyroute2 package version is
> lower than 0.6, even though the OVS datapath is not configured.
>
> As a result, pmtu.sh assumes that the setup was successful and
> continues running the test, which later fails due to the missing
> OVS configuration.
>
> Fix the exit code handling in ovs-dpctl.py so that pmtu.sh can detect
> that the setup did not complete successfully and fall back to
> ovs-vsctl.
>
> Signed-off-by: Aleksei Oladko <aleksey.oladko@virtuozzo.com>
> ---
You should also include the fixes line when you post another version:
92e37f20f20a ("selftests: openvswitch: Add version check for pyroute2")
> tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> index b521e0dea506..848f61fdcee0 100644
> --- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> +++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> @@ -2583,7 +2583,7 @@ def main(argv):
> prverscheck = pyroute2.__version__.split(".")
> if int(prverscheck[0]) == 0 and int(prverscheck[1]) < 6:
> print("Need to upgrade the python pyroute2 package to >= 0.6.")
> - sys.exit(0)
> + sys.exit(1)
>
> parser = argparse.ArgumentParser()
> parser.add_argument(
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/5] selftests: net: run reuseport tests in netns to avoid port conflicts
2026-01-20 23:05 [PATCH 0/5] selftests: net: fix false failures due to missing features and host interference Aleksei Oladko
2026-01-20 23:05 ` [PATCH 1/5] selftests: net: fib_tests: skip rp_filter test if cls_basic is unavailable Aleksei Oladko
2026-01-20 23:05 ` [PATCH 2/5] selftests: net: make ovs-dpctl.py fail when pyroute2 is unsupported Aleksei Oladko
@ 2026-01-20 23:05 ` Aleksei Oladko
2026-01-22 0:56 ` Jakub Kicinski
2026-01-20 23:05 ` [PATCH 4/5] selftests: net: run pmtu.sh in netns to avoid host firewall interference Aleksei Oladko
2026-01-20 23:05 ` [PATCH 5/5] selftests: net: io_uring_zerocopy: enable io_uring for the test Aleksei Oladko
4 siblings, 1 reply; 8+ messages in thread
From: Aleksei Oladko @ 2026-01-20 23:05 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan
Cc: netdev, linux-kselftest, linux-kernel, Konstantin Khorenko
From: Konstantin Khorenko <khorenko@virtuozzo.com>
Some net kselftests use fixed ports 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
Instead of changing port numbers, run the affected tests in isolated
network namespace to avoid conflicts with running daemons.
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
tools/testing/selftests/net/Makefile | 12 ++++++++----
tools/testing/selftests/net/reuseport_bpf.sh | 4 ++++
tools/testing/selftests/net/reuseport_bpf_cpu.sh | 4 ++++
tools/testing/selftests/net/reuseport_bpf_numa.sh | 4 ++++
tools/testing/selftests/net/reuseport_dualstack.sh | 4 ++++
5 files changed, 24 insertions(+), 4 deletions(-)
create mode 100755 tools/testing/selftests/net/reuseport_bpf.sh
create mode 100755 tools/testing/selftests/net/reuseport_bpf_cpu.sh
create mode 100755 tools/testing/selftests/net/reuseport_bpf_numa.sh
create mode 100755 tools/testing/selftests/net/reuseport_dualstack.sh
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index b66ba04f19d9..a160e0d816d9 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -64,6 +64,10 @@ TEST_PROGS := \
psock_snd.sh \
reuseaddr_ports_exhausted.sh \
reuseport_addr_any.sh \
+ reuseport_bpf.sh \
+ reuseport_bpf_cpu.sh \
+ reuseport_bpf_numa.sh \
+ reuseport_dualstack.sh
route_hint.sh \
route_localnet.sh \
rps_default_mask.sh \
@@ -142,6 +146,10 @@ TEST_GEN_FILES := \
psock_tpacket \
reuseaddr_ports_exhausted \
reuseport_addr_any \
+ reuseport_bpf \
+ reuseport_bpf_cpu \
+ reuseport_bpf_numa \
+ reuseport_dualstack \
rxtimestamp \
sctp_hello \
skf_net_off \
@@ -169,10 +177,6 @@ TEST_GEN_PROGS := \
ipv6_fragmentation \
proc_net_pktgen \
reuseaddr_conflict \
- reuseport_bpf \
- reuseport_bpf_cpu \
- reuseport_bpf_numa \
- reuseport_dualstack \
sk_bind_sendto_listen \
sk_connect_zero_addr \
sk_so_peek_off \
diff --git a/tools/testing/selftests/net/reuseport_bpf.sh b/tools/testing/selftests/net/reuseport_bpf.sh
new file mode 100755
index 000000000000..75014a5462a1
--- /dev/null
+++ b/tools/testing/selftests/net/reuseport_bpf.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+./in_netns.sh ./reuseport_bpf
diff --git a/tools/testing/selftests/net/reuseport_bpf_cpu.sh b/tools/testing/selftests/net/reuseport_bpf_cpu.sh
new file mode 100755
index 000000000000..243dc5bee014
--- /dev/null
+++ b/tools/testing/selftests/net/reuseport_bpf_cpu.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+./in_netns.sh ./reuseport_bpf_cpu
diff --git a/tools/testing/selftests/net/reuseport_bpf_numa.sh b/tools/testing/selftests/net/reuseport_bpf_numa.sh
new file mode 100755
index 000000000000..eccab95a3202
--- /dev/null
+++ b/tools/testing/selftests/net/reuseport_bpf_numa.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+./in_netns.sh ./reuseport_bpf_numa
diff --git a/tools/testing/selftests/net/reuseport_dualstack.sh b/tools/testing/selftests/net/reuseport_dualstack.sh
new file mode 100755
index 000000000000..82cc8e345a83
--- /dev/null
+++ b/tools/testing/selftests/net/reuseport_dualstack.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+./in_netns.sh ./reuseport_dualstack
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/5] selftests: net: run reuseport tests in netns to avoid port conflicts
2026-01-20 23:05 ` [PATCH 3/5] selftests: net: run reuseport tests in netns to avoid port conflicts Aleksei Oladko
@ 2026-01-22 0:56 ` Jakub Kicinski
0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2026-01-22 0:56 UTC (permalink / raw)
To: Aleksei Oladko
Cc: David S . Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
Shuah Khan, netdev, linux-kselftest, linux-kernel,
Konstantin Khorenko
On Tue, 20 Jan 2026 23:05:56 +0000 Aleksei Oladko wrote:
> diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
> index b66ba04f19d9..a160e0d816d9 100644
> --- a/tools/testing/selftests/net/Makefile
> +++ b/tools/testing/selftests/net/Makefile
> @@ -64,6 +64,10 @@ TEST_PROGS := \
> psock_snd.sh \
> reuseaddr_ports_exhausted.sh \
> reuseport_addr_any.sh \
> + reuseport_bpf.sh \
> + reuseport_bpf_cpu.sh \
> + reuseport_bpf_numa.sh \
> + reuseport_dualstack.sh
missing trailing \ here, which breaks the build :(
> route_hint.sh \
> route_localnet.sh \
> rps_default_mask.sh \
--
pw-bot: cr
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/5] selftests: net: run pmtu.sh in netns to avoid host firewall interference
2026-01-20 23:05 [PATCH 0/5] selftests: net: fix false failures due to missing features and host interference Aleksei Oladko
` (2 preceding siblings ...)
2026-01-20 23:05 ` [PATCH 3/5] selftests: net: run reuseport tests in netns to avoid port conflicts Aleksei Oladko
@ 2026-01-20 23:05 ` Aleksei Oladko
2026-01-20 23:05 ` [PATCH 5/5] selftests: net: io_uring_zerocopy: enable io_uring for the test Aleksei Oladko
4 siblings, 0 replies; 8+ messages in thread
From: Aleksei Oladko @ 2026-01-20 23:05 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan
Cc: netdev, linux-kselftest, linux-kernel, Konstantin Khorenko
From: Konstantin Khorenko <khorenko@virtuozzo.com>
The pmtu.sh kselftest sets up a multi-namespace test topology where the
host network itself is part of the test setup. Test packets originating
from the created namespace are expected to reach test interface created
in the host. When firewall rules are present on the host, this traffic
may be blocked, causing the test to fail.
Run the test in an isolated network namespace to avoid interference
from host firewall rules.
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
tools/testing/selftests/net/Makefile | 2 +-
tools/testing/selftests/net/pmtu_wrapper.sh | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
create mode 100755 tools/testing/selftests/net/pmtu_wrapper.sh
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index a160e0d816d9..7c6b61e90062 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -60,7 +60,7 @@ TEST_PROGS := \
netns-name.sh \
netns-sysctl.sh \
nl_netdev.py \
- pmtu.sh \
+ pmtu_wrapper.sh \
psock_snd.sh \
reuseaddr_ports_exhausted.sh \
reuseport_addr_any.sh \
diff --git a/tools/testing/selftests/net/pmtu_wrapper.sh b/tools/testing/selftests/net/pmtu_wrapper.sh
new file mode 100755
index 000000000000..d43c23ba5155
--- /dev/null
+++ b/tools/testing/selftests/net/pmtu_wrapper.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+./in_netns.sh ./pmtu.sh "$@"
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 5/5] selftests: net: io_uring_zerocopy: enable io_uring for the test
2026-01-20 23:05 [PATCH 0/5] selftests: net: fix false failures due to missing features and host interference Aleksei Oladko
` (3 preceding siblings ...)
2026-01-20 23:05 ` [PATCH 4/5] selftests: net: run pmtu.sh in netns to avoid host firewall interference Aleksei Oladko
@ 2026-01-20 23:05 ` Aleksei Oladko
4 siblings, 0 replies; 8+ messages in thread
From: Aleksei Oladko @ 2026-01-20 23:05 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan
Cc: netdev, linux-kselftest, linux-kernel, Aleksei Oladko,
Konstantin Khorenko
The io_uring_zerocopy.sh kselftest assumes that io_uring support is
enabled on the host system. When io_uring is disabled via the
kernel.io_uring_disabled sysctl, the test fails.
Explicitly enable io_uring for the test by setting
kernel.io_uring_disabled=0.
Save the original value of kernel.io_uring_disabled before changing
it and restore it in cleanup handler to ensure the system state is
restored regardless of test outcome.
Signed-off-by: Aleksei Oladko <aleksey.oladko@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
tools/testing/selftests/net/io_uring_zerocopy_tx.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/testing/selftests/net/io_uring_zerocopy_tx.sh b/tools/testing/selftests/net/io_uring_zerocopy_tx.sh
index 123439545013..8c3647de9b4c 100755
--- a/tools/testing/selftests/net/io_uring_zerocopy_tx.sh
+++ b/tools/testing/selftests/net/io_uring_zerocopy_tx.sh
@@ -77,9 +77,13 @@ esac
# Start of state changes: install cleanup handler
+old_io_uring_disabled=0
cleanup() {
ip netns del "${NS2}"
ip netns del "${NS1}"
+ if [ "$old_io_uring_disabled" -ne 0 ]; then
+ sysctl -w -q kernel.io_uring_disabled="$old_io_uring_disabled" 2>/dev/null || true
+ fi
}
trap cleanup EXIT
@@ -122,5 +126,10 @@ do_test() {
wait
}
+old_io_uring_disabled=$(sysctl -n kernel.io_uring_disabled 2>/dev/null || echo "0")
+if [ "$old_io_uring_disabled" -ne 0 ]; then
+ sysctl -w -q kernel.io_uring_disabled=0
+fi
+
do_test "${EXTRA_ARGS}"
echo ok
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread