osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38341?usp=email )
Change subject: ggsn: testenv: run SUT on bridge instead of lo
......................................................................
ggsn: testenv: run SUT on bridge instead of lo
Replace IPs in testenv.sh so the SUT runs on 172.18.3.2 (testenv0
bridge) instead of 127.0.0.2 (lo). Later on when we can optionally use
QEMU with osmo-ggsn to test kernel GTP-U. It will then run on this IP as
well. So with this change we can use the same IP for both the QEMU and
non-QEMU case.
Change-Id: Ib768603b0050fe62baff39cab982a850eb91f49a
---
M ggsn_tests/osmo-ggsn/testenv.sh
1 file changed, 13 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/ggsn_tests/osmo-ggsn/testenv.sh b/ggsn_tests/osmo-ggsn/testenv.sh
index bded804..4155d52 100755
--- a/ggsn_tests/osmo-ggsn/testenv.sh
+++ b/ggsn_tests/osmo-ggsn/testenv.sh
@@ -22,11 +22,21 @@
esac
}
+replace_ips() {
+ # Run osmo-ggsn on 172.18.3.x (testenv0 bridge) instead of
+ # 127.0.0.1 (lo), so it works when running osmo-ggsn in QEMU to test
+ # kernel GTP-U too. We keep 127.0.0.x in the configs, so they can be
+ # used without testenv too.
+ sed -i 's/127\.0\.0\./172.18.3./g' "$1"
+}
+
adjust_osmo_ggsn_config() {
osmo-config-merge \
osmo-ggsn/osmo-ggsn.src.cfg \
osmo-ggsn/osmo-ggsn-"$CONFIG".confmerge \
osmo-ggsn.cfg
+
+ replace_ips osmo-ggsn.cfg
}
adjust_ttcn3_config() {
@@ -34,6 +44,8 @@
sed -i "s/^GGSN_Tests.m_ggsn_conf := .*/GGSN_Tests.m_ggsn_conf :=
GGSN_CONF_$config_upper/" \
../testsuite/GGSN_Tests.cfg
+
+ replace_ips ../testsuite/GGSN_Tests.cfg
}
setcap_osmo_ggsn() {
@@ -52,7 +64,7 @@
# Add a bridge reachable through the GTP tunnel that can answer ICMP
# pings (for e.g. TC_pdp4_act_deact_gtpu_access). The bridge is also used to
# connect the SUT when it runs in QEMU.
-EXTRA_IPS="172.18.3.201 fd02:db8:3::201" add_remove_testenv0_bridge.sh
+EXTRA_IPS="172.18.3.201 fd02:db8:3::201 172.18.3.2"
add_remove_testenv0_bridge.sh
case "$TESTENV_CLEAN_REASON" in
prepare)
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38341?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: Ib768603b0050fe62baff39cab982a850eb91f49a
Gerrit-Change-Number: 38341
Gerrit-PatchSet: 2
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>