osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38546?usp=email )
Change subject: bsc: testenv: set MTU=1500 for lo
......................................................................
bsc: testenv: set MTU=1500 for lo
Two tests are failing if the MTU is 65536 instead of 1500. This is an
upstream bug in titan.TestPorts.SCTPasp:
https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.SCTPasp/-/issues/3
Add a workaround so the behavior of the test environment is the same as
with docker-playground and the tests can pass again.
Related: OS#6602
Change-Id: Ifeda66954263fe8d2637377d0701a2208a19c332
---
A _testenv/data/scripts/podman_set_lo_mtu.sh
M _testenv/testenv/podman.py
M bsc/testenv_generic.cfg
3 files changed, 26 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/_testenv/data/scripts/podman_set_lo_mtu.sh
b/_testenv/data/scripts/podman_set_lo_mtu.sh
new file mode 100755
index 0000000..ae4119b
--- /dev/null
+++ b/_testenv/data/scripts/podman_set_lo_mtu.sh
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+# Change the MTU for the loopback device, but only when running in podman (as
+# we don't want to just make this change for the host without asking). This
+# is used as workaround for OS#6602 where we have some tests that don't pass if
+# the MTU=65536, the default of lo.
+
+MTU="$1"
+
+if [ "$PODMAN" = 1 ]; then
+ echo "Setting MTU for lo to $MTU (OS#6602)"
+ sudo ip link set dev lo mtu "$1"
+else
+ if [ "$(cat /sys/class/net/lo/mtu)" = 65536 ]; then
+ echo
+ echo
"========================================================================"
+ echo "WARNING: your loopback network device (lo) has the default MTU of
65536."
+ echo "This is known to cause a some tests to fail, see OS#6602."
+ echo
+ echo "Workaround: 'ip link set dev lo mtu $1' or --podman"
+ echo
"========================================================================"
+ echo
+ fi
+fi
diff --git a/_testenv/testenv/podman.py b/_testenv/testenv/podman.py
index 538ec41..719afcb 100644
--- a/_testenv/testenv/podman.py
+++ b/_testenv/testenv/podman.py
@@ -239,6 +239,8 @@
"net.ipv4.conf.all.send_redirects=0", # OS#6575
"--sysctl",
"net.ipv4.conf.default.send_redirects=0", # OS#6575
+ "-e",
+ "PODMAN=1",
]
if not testenv.args.binary_repo:
diff --git a/bsc/testenv_generic.cfg b/bsc/testenv_generic.cfg
index d453f55..b4ed393 100644
--- a/bsc/testenv_generic.cfg
+++ b/bsc/testenv_generic.cfg
@@ -1,4 +1,5 @@
[testsuite]
+prepare=podman_set_lo_mtu.sh 1500 # OS#6602
program=BSC_Tests
config=BSC_Tests.cfg
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38546?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ifeda66954263fe8d2637377d0701a2208a19c332
Gerrit-Change-Number: 38546
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>