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