aboutsummaryrefslogtreecommitdiffstats
path: root/ttcn3-msc-test
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-06 17:41:33 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-06 19:08:45 +0100
commitfacbb6575e31b0249590ffc6a4b3090daee9963a (patch)
treea1b40a05a8d9d6898678848371f641e4c1c1f91f /ttcn3-msc-test
parentafe1ec8dc1e99c2dfca76b52eceba5f188eea71e (diff)
move every 'test network' to its own IP address space
Ideally we would want to launch a group of containers with their own private network segment and use the same static IP addresses in those isolated networks. The stupidity of docker is requiring unique IPv4 addresses even on isolated (!) networks. This means we have to manually give each of our test setups a different subnet, and then we can at least run one instance that test in parallel to at most one instance of each other test. If this weird reestriction about unique IPv4 addresses didn't exist, we could start any number of test runs in parallel.
Diffstat (limited to 'ttcn3-msc-test')
-rw-r--r--ttcn3-msc-test/MSC_Tests.cfg10
-rw-r--r--ttcn3-msc-test/Makefile2
-rwxr-xr-xttcn3-msc-test/jenkins.sh16
-rw-r--r--ttcn3-msc-test/osmo-msc.cfg6
-rw-r--r--ttcn3-msc-test/osmo-stp.cfg4
5 files changed, 24 insertions, 14 deletions
diff --git a/ttcn3-msc-test/MSC_Tests.cfg b/ttcn3-msc-test/MSC_Tests.cfg
index f885fcc..9a78a1b 100644
--- a/ttcn3-msc-test/MSC_Tests.cfg
+++ b/ttcn3-msc-test/MSC_Tests.cfg
@@ -20,7 +20,7 @@ LoggerPlugins := { JUnitLogger := "libjunitlogger2" }
#*.*.udpReuseAddress := "yes";
"MSC_Test-MNCC".MNCC.socket_type := "SEQPACKET";
*.MSCVTY.CTRL_MODE := "client"
-*.MSCVTY.CTRL_HOSTNAME := "172.18.0.10"
+*.MSCVTY.CTRL_HOSTNAME := "172.18.1.10"
*.MSCVTY.CTRL_PORTNUM := "4254"
*.MSCVTY.CTRL_LOGIN_SKIPPED := "yes"
*.MSCVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
@@ -34,15 +34,15 @@ M3UA_Emulation.tsp_logVerbose := true;
# connection to STP
BSSAP_Adapter.mp_own_pc := 193; /* 0.23.3 */
BSSAP_Adapter.mp_peer_pc := 185; /* 0.23.1 */
-BSSAP_Adapter.mp_sctp_addr := { 23906, "172.18.0.103", 2905, "172.18.0.200" };
+BSSAP_Adapter.mp_sctp_addr := { 23906, "172.18.1.103", 2905, "172.18.1.200" };
# VTY prompt prefix
Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoMSC";
# remote (IUT) side
MSC_Tests.mp_msc_mncc := "/data/unix/mncc";
-MSC_Tests.mp_msc_ip := "172.18.0.10";
+MSC_Tests.mp_msc_ip := "172.18.1.10";
# local (emulation) side)
-MSC_Tests.mp_hlr_ip := "172.18.0.103";
-MSC_Tests.mp_mgw_ip := "172.18.0.103";
+MSC_Tests.mp_hlr_ip := "172.18.1.103";
+MSC_Tests.mp_mgw_ip := "172.18.1.103";
[MAIN_CONTROLLER]
diff --git a/ttcn3-msc-test/Makefile b/ttcn3-msc-test/Makefile
index 42de210..fe1be7c 100644
--- a/ttcn3-msc-test/Makefile
+++ b/ttcn3-msc-test/Makefile
@@ -1,3 +1,3 @@
-RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.0.202 -v ggsn-test-vol:/data
+RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.1.202 -v ggsn-test-vol:/data
include ../make/Makefile
diff --git a/ttcn3-msc-test/jenkins.sh b/ttcn3-msc-test/jenkins.sh
index 1664580..5be838d 100755
--- a/ttcn3-msc-test/jenkins.sh
+++ b/ttcn3-msc-test/jenkins.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+set -x
+
# non-jenkins execution: assume local user name
if [ "x$REPO_USER" = "x" ]; then
REPO_USER=$USER
@@ -10,6 +12,11 @@ if [ "x$WORKSPACE" = "x" ]; then
WORKSPACE=/tmp
fi
+NET_NAME="msc-tester"
+
+echo Creating network $NET_NAME
+docker network create --internal --subnet 172.18.1.0/24 $NET_NAME
+
VOL_BASE_DIR=`mktemp -d`
mkdir $VOL_BASE_DIR/msc-tester
mkdir $VOL_BASE_DIR/msc-tester/unix
@@ -26,14 +33,14 @@ mkdir $VOL_BASE_DIR/unix
echo Starting container with STP
docker run --rm \
- --network sigtran --ip 172.18.0.200 \
+ --network $NET_NAME --ip 172.18.1.200 \
-v $VOL_BASE_DIR/stp:/data \
--name stp -d \
$REPO_USER/osmo-stp-master
echo Starting container with MSC
docker run --rm \
- --network sigtran --ip 172.18.0.10 \
+ --network $NET_NAME --ip 172.18.1.10 \
-v $VOL_BASE_DIR/msc:/data \
-v $VOL_BASE_DIR/unix:/data/unix \
--name msc -d \
@@ -42,7 +49,7 @@ docker run --rm \
echo Starting container with MSC testsuite
docker run --rm \
- --network sigtran --ip 172.18.0.103 \
+ --network $NET_NAME --ip 172.18.1.103 \
-v $VOL_BASE_DIR/msc-tester:/data \
-v $VOL_BASE_DIR/unix:/data/unix \
--name ttcn3-msc-test \
@@ -52,6 +59,9 @@ echo Stopping containers
docker container kill msc
docker container kill stp
+echo Deleting network $NET_NAME
+docker network rm $NET_NAME
+
rm -rf $WORKSPACE/logs
mkdir -p $WORKSPACE/logs
cp -a $VOL_BASE_DIR/* $WORKSPACE/logs/
diff --git a/ttcn3-msc-test/osmo-msc.cfg b/ttcn3-msc-test/osmo-msc.cfg
index 39ad214..2b7fbfd 100644
--- a/ttcn3-msc-test/osmo-msc.cfg
+++ b/ttcn3-msc-test/osmo-msc.cfg
@@ -53,7 +53,7 @@ ctrl
cs7 instance 0
point-code 0.23.1
asp asp-clnt-OsmoMSC-A 2905 0 m3ua
- remote-ip 172.18.0.200
+ remote-ip 172.18.1.200
as as-clnt-OsmoMSC-A m3ua
asp asp-clnt-OsmoMSC-A
routing-key 2 0.23.1
@@ -73,10 +73,10 @@ msc
assign-tmsi
cs7-instance-a 0
cs7-instance-iu 0
- mgw remote-ip 172.18.0.103
+ mgw remote-ip 172.18.1.103
mncc-int
default-codec tch-f fr
default-codec tch-h hr
hlr
- remote-ip 172.18.0.103
+ remote-ip 172.18.1.103
remote-port 4222
diff --git a/ttcn3-msc-test/osmo-stp.cfg b/ttcn3-msc-test/osmo-stp.cfg
index ec6e7cb..6939b92 100644
--- a/ttcn3-msc-test/osmo-stp.cfg
+++ b/ttcn3-msc-test/osmo-stp.cfg
@@ -32,8 +32,8 @@ line vty
cs7 instance 0
xua rkm routing-key-allocation dynamic-permitted
asp virt-bsc0-0 23906 2905 m3ua
- local-ip 172.18.0.200
- remote-ip 172.18.0.103
+ local-ip 172.18.1.200
+ remote-ip 172.18.1.103
as virt-bsc0 m3ua
asp virt-bsc0-0
routing-key 0 0.24.1