Skip to content
Unstable

Changes

Summary

  1. testenv: bridge: change default IPs 201 -> 1 (details)
  2. ggsn: testenv: run SUT on bridge instead of lo (details)
  3. ggsn: testenv: change VTY IP (details)
  4. testenv: support running SUT in QEMU (details)
  5. ggsn: testenv: support running osmo-ggsn in QEMU (details)
Commit 5ac9dc135751a053684a0d572a73879f4b41dd97 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
on the fly 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 for the non-QEMU case, as they are
configured as DNS IPs and tests need to be able to reach them.

Change-Id: Ied055e6e4d6214fd5247694e697a35a1e8ff1966
The file was modified_testenv/data/scripts/add_remove_testenv0_bridge.sh
The file was modifiedggsn_tests/osmo-ggsn/testenv.sh
The file was modifiedggsn_tests/open5gs/testenv.sh
Commit d82c9efed9bc44302d0bf428a0234727c961037e 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 fffa8ec1f928afe200e94e5a5c4561c2251bf38f 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/osmo-ggsn/osmo-ggsn.src.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_all.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4_only.cfg
The file was modifiedggsn_tests/GGSN_Tests.cfg
Commit caaa0d631b8a8a4f8ed426455c36ca7e94c62ba0 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_testenv/README.md
The file was modified_testenv/testenv/cmd.py
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/podman.py
The file was modified_testenv/testenv/testenv_cfg.py
The file was modified_testenv/testenv/__init__.py
The file was added_testenv/data/scripts/qemu/qemu_init.sh
The file was modified.gitignore
The file was modified_testenv/testenv/requirements.py
The file was added_testenv/data/scripts/qemu/qemu_ifup.sh
The file was modified_testenv/data/podman/Dockerfile
Commit 69aa39abf63ffd19aecb3502dec7251c0e77350d 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_v4v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_v6_only.cfg
The file was modifiedggsn_tests/testenv_osmo_ggsn_all.cfg
The file was addedggsn_tests/osmo-ggsn/run.sh
The file was modifiedggsn_tests/osmo-ggsn/testenv.sh
The file was modifiedggsn_tests/testenv_osmo_ggsn_v4_only.cfg