Skip to content
Unstable

Changes

Summary

  1. testenv: osmo-dev: build with gtp_linux.opts (details)
  2. testenv: bridge: change default IPs 201 -> 1 (details)
  3. ggsn: testenv: run SUT on bridge instead of lo (details)
  4. ggsn: testenv: change VTY IP (details)
  5. testenv: support running SUT in QEMU (details)
  6. ggsn: testenv: support running osmo-ggsn in QEMU (details)
Commit b05196bd87251d29d0369d30a3688a49309cbb43 by Oliver Smith
testenv: osmo-dev: build with gtp_linux.opts

Run the osmo-ggsn ./configure with --enable-gtp-linux, in preparation
for testing kernel gtp-u with testenv too.

Related: https://gitea.osmocom.org/osmocom/osmo-dev/src/branch/master/gtp_linux.opts
Change-Id: Ia8ea5494597e0fedae93f501c8bc7d6115543f36
The file was modified_testenv/testenv/osmo_dev.py
Commit 74bb291ef74bcaab59f23d65cbe9082a99fefe21 by Oliver Smith
testenv: bridge: change default IPs 201 -> 1

During code review it was decided that we want to keep the 127.0.0.1
(and other 127.0.0.x) IPs in the configs, so one can start the testsuite
with osmo-ggsn directly on the host without using testenv scripts too,
with the same config.

The testenv script for osmo-ggsn will replace 127.0.0.x with 172.18.3.x
before the testsuite starts, so we can run osmo-ggsn optionally in QEMU
on 172.18.3.2, which will be bridged to the host.

172.18.3.1 will be used by the GGSN testsuite now, instead of
172.18.3.201 as previously planned, so change the default IP of the
bridge. The bridge is not used for another testsuite yet.

Add the 201 IPs as EXTRA_IPS, as they are configured as DNS IPs and
tests need to be able to reach them.

Change-Id: Ied055e6e4d6214fd5247694e697a35a1e8ff1966
The file was modifiedggsn_tests/osmo-ggsn/testenv.sh
The file was modified_testenv/data/scripts/add_remove_testenv0_bridge.sh
The file was modifiedggsn_tests/open5gs/testenv.sh
Commit ded40db24fcc7ecb2eb173a217bdaefcef743f27 by Oliver Smith
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
The file was modifiedggsn_tests/osmo-ggsn/testenv.sh
Commit f26c493d4c05ce0fd0f14a73457f4b6aaab0422f by Oliver Smith
ggsn: testenv: change VTY IP

Access the VTY of osmo-ggsn via 172.18.3.2 (127.0.0.2 if running without
testenv), so the testsuite can access the VTY when osmo-ggsn optionally
runs in QEMU too (through the bridge).

Change-Id: I054c19041b3027e7f66d925f031002fefe011c58
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v6_only.cfg
The file was modifiedggsn_tests/osmo-ggsn/osmo-ggsn.src.cfg
The file was modifiedggsn_tests/GGSN_Tests.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_all.cfg
Commit 17a889383406359bde8860e8beaff39142a427b1 by Oliver Smith
testenv: support running SUT in QEMU

Add two new arguments -C|--custom-kernel and -D|--debian-kernel. If any
of these is set, pass an environment variable TESTENV_QEMU_KERNEL with
the path to the kernel when running commands from testenv.cfg.

These commands can then source the new qemu_functions.sh and use it to
build an initramfs with the SUT and depending libraries on the fly, and
start up QEMU to boot right to starting the SUT. All of that takes about
~1s on my system with kvm. Without kvm ~5s.

A follow-up patch will adjust the ggsn testenv configs to optionally run
osmo-ggsn in QEMU for testing kernel GTP-U.

These scripts are based on scripts/kernel-tests from docker-playground.

Related: osmo-ci Id64a1a778fa38eec20498c36b390332f75d7d3f5
Change-Id: Ic9cb7092fd029b7ba530fc755b5d4d73a9d86350
The file was modified.gitignore
The file was modified_testenv/testenv/podman.py
The file was modified_testenv/README.md
The file was modified_testenv/testenv/requirements.py
The file was added_testenv/data/scripts/qemu/qemu_init.sh
The file was modified_testenv/testenv/cmd.py
The file was modified_testenv/data/podman/Dockerfile
The file was added_testenv/data/scripts/qemu/qemu_ifup.sh
The file was added_testenv/data/scripts/qemu/qemu_wait.sh
The file was added_testenv/data/scripts/qemu/qemu_functions.sh
The file was modified_testenv/testenv/testenv_cfg.py
The file was modified_testenv/testenv/__init__.py
Commit aa3dd4b5ddc9976c5121f5f453b0480581b1cd8e by Oliver Smith
ggsn: testenv: support running osmo-ggsn in QEMU

Run osmo-ggsn *optionally* in QEMU, to test the kernel GTP-U feature
with different kernels.

Related: OS#3208
Change-Id: I3f9db4325d5928c809cc99bc82d9cb82bf9e71eb
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4_only.cfg
The file was modifiedggsn_tests/osmo-ggsn/testenv.sh
The file was modifiedggsn_tests/testenv_osmo_ggsn_v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
The file was addedggsn_tests/osmo-ggsn/run.sh
The file was modifiedggsn_tests/testenv_osmo_ggsn_all.cfg