[PATCH v2 4/5] selftests: net: run pmtu.sh in netns to avoid host firewall interference

Aleksei Oladko posted 5 patches 1 week, 5 days ago
[PATCH v2 4/5] selftests: net: run pmtu.sh in netns to avoid host firewall interference
Posted by Aleksei Oladko 1 week, 5 days ago
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 ce65763e74ef..f84f7111adf9 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
Re: [PATCH v2 4/5] selftests: net: run pmtu.sh in netns to avoid host firewall interference
Posted by Jakub Kicinski 1 week, 5 days ago
On Tue, 27 Jan 2026 22:51:33 +0000 Aleksei Oladko wrote:
> -	pmtu.sh \
> +	pmtu_wrapper.sh \

The real script needs to be listed in TEST_FILES now, right?

More importantly - please rename the script and use the pmtu.sh
as the name of the wrapper. CI system which track the test by
name will lose history if the test is renamed. Not a big deal
but seems trivially avoidable.
-- 
pw-bot: cr