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.
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.
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).
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.