From: Konstantin Khorenko <[email protected]>

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 <[email protected]>
---
 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


Reply via email to