aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2024-04-22 19:19:08 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2024-04-22 19:23:02 +0700
commitbee0425ab74159364af6c667765e1522eb0f9c43 (patch)
treec575dc0cb1c622c4e585437fe0f55753f9d3843f
parent4310e25ea7e2ef61d82a3bccfdb1c1e0b335ce50 (diff)
ttcn3-sgsn-test: add config files for running SNS testcases
l---------ttcn3-sgsn-test-sns/jenkins.sh1
l---------ttcn3-sgsn-test-sns/sns1
-rwxr-xr-xttcn3-sgsn-test/jenkins-sns.sh57
-rw-r--r--ttcn3-sgsn-test/sns/SGSN_Tests.cfg46
-rw-r--r--ttcn3-sgsn-test/sns/osmo-sgsn.cfg105
5 files changed, 210 insertions, 0 deletions
diff --git a/ttcn3-sgsn-test-sns/jenkins.sh b/ttcn3-sgsn-test-sns/jenkins.sh
new file mode 120000
index 0000000..4c1f7b3
--- /dev/null
+++ b/ttcn3-sgsn-test-sns/jenkins.sh
@@ -0,0 +1 @@
+../ttcn3-sgsn-test/jenkins-sns.sh \ No newline at end of file
diff --git a/ttcn3-sgsn-test-sns/sns b/ttcn3-sgsn-test-sns/sns
new file mode 120000
index 0000000..95cdae2
--- /dev/null
+++ b/ttcn3-sgsn-test-sns/sns
@@ -0,0 +1 @@
+../ttcn3-sgsn-test/sns \ No newline at end of file
diff --git a/ttcn3-sgsn-test/jenkins-sns.sh b/ttcn3-sgsn-test/jenkins-sns.sh
new file mode 100755
index 0000000..027244d
--- /dev/null
+++ b/ttcn3-sgsn-test/jenkins-sns.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+. ../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+docker_images_require \
+ "osmo-stp-$IMAGE_SUFFIX" \
+ "osmo-sgsn-$IMAGE_SUFFIX" \
+ "ttcn3-sgsn-test"
+
+set_clean_up_trap
+set -e
+
+mkdir $VOL_BASE_DIR/sgsn-tester
+cp sns/SGSN_Tests.cfg $VOL_BASE_DIR/sgsn-tester/
+write_mp_osmo_repo "$VOL_BASE_DIR/sgsn-tester/SGSN_Tests.cfg"
+
+mkdir $VOL_BASE_DIR/sgsn
+cp sns/osmo-sgsn.cfg $VOL_BASE_DIR/sgsn/
+
+mkdir $VOL_BASE_DIR/stp
+cp osmo-stp.cfg $VOL_BASE_DIR/stp/
+
+mkdir $VOL_BASE_DIR/unix
+
+network_create
+network_replace_subnet_in_configs
+
+echo Starting container with STP
+docker run --rm \
+ $(docker_network_params $SUBNET 200) \
+ --ulimit core=-1 \
+ -v $VOL_BASE_DIR/stp:/data \
+ --name ${BUILD_TAG}-stp -d \
+ $DOCKER_ARGS \
+ $REPO_USER/osmo-stp-$IMAGE_SUFFIX
+
+echo Starting container with SGSN
+docker run --rm \
+ $(docker_network_params $SUBNET 10) \
+ --ulimit core=-1 \
+ -v $VOL_BASE_DIR/sgsn:/data \
+ --name ${BUILD_TAG}-sgsn-sns -d \
+ $DOCKER_ARGS \
+ $REPO_USER/osmo-sgsn-$IMAGE_SUFFIX \
+ /bin/sh -c "osmo-sgsn -c /data/osmo-sgsn.cfg >/data/osmo-sgsn.log 2>&1"
+
+echo Starting container with SGSN testsuite
+docker run --rm \
+ $(docker_network_params $SUBNET 103) \
+ --ulimit core=-1 \
+ -e "TTCN3_PCAP_PATH=/data" \
+ -e "OSMO_SUT_HOST=172.18.$SUBNET.10" \
+ -e "OSMO_SUT_PORT=4245" \
+ -v $VOL_BASE_DIR/sgsn-tester:/data \
+ --name ${BUILD_TAG}-ttcn3-sgsn-test-sns \
+ $DOCKER_ARGS \
+ $REPO_USER/ttcn3-sgsn-test
diff --git a/ttcn3-sgsn-test/sns/SGSN_Tests.cfg b/ttcn3-sgsn-test/sns/SGSN_Tests.cfg
new file mode 100644
index 0000000..e3ee59f
--- /dev/null
+++ b/ttcn3-sgsn-test/sns/SGSN_Tests.cfg
@@ -0,0 +1,46 @@
+[ORDERED_INCLUDE]
+# Common configuration, shared between test suites
+"/osmo-ttcn3-hacks/Common.cfg"
+# testsuite specific configuration, not expected to change
+"/osmo-ttcn3-hacks/sgsn/SGSN_Tests.default"
+
+# Local configuration below
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+*.SGSNVTY.CTRL_HOSTNAME := "172.18.8.10"
+
+[MODULE_PARAMETERS]
+SGSN_Tests.mp_nsconfig := {
+ {
+ handle_sns := true,
+ nsvc := {
+ {
+ provider := {
+ ip := {
+ address_family := AF_INET,
+ local_ip := "172.18.8.103",
+ remote_ip := "172.18.8.10",
+ data_weight := 1,
+ signalling_weight := 1
+ }
+ }
+ }
+ }
+ }
+}
+SGSN_Tests.mp_ranap_cfg := {
+ {
+ sctp_addr := { 23908, "172.18.8.103", 2905, "172.18.8.200" }
+ }
+}
+SGSN_Tests.mp_hlr_ip := "172.18.8.103"
+SGSN_Tests.mp_ggsn_ip := "172.18.8.103"
+SGSN_Tests.mp_sgsn_gtp_ip := "172.18.8.10"
+
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+SGSN_Tests_NS.control
diff --git a/ttcn3-sgsn-test/sns/osmo-sgsn.cfg b/ttcn3-sgsn-test/sns/osmo-sgsn.cfg
new file mode 100644
index 0000000..f2a4def
--- /dev/null
+++ b/ttcn3-sgsn-test/sns/osmo-sgsn.cfg
@@ -0,0 +1,105 @@
+!
+! OsmoSGSN (1.2.0.46-e77e-dirty) configuration saved from vty
+!!
+!
+log gsmtap 172.18.8.103
+ logging level set-all debug
+ logging filter all 1
+!
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category 1
+ logging timestamp 1
+ logging print extended-timestamp 1
+ logging print file 1
+ logging level mm debug
+ logging level pag notice
+ logging level meas notice
+ logging level ref notice
+ logging level gprs debug
+ logging level llc debug
+ logging level sndcp debug
+ logging level slhc notice
+ logging level ranap info
+ logging level sua info
+ logging level v42bis info
+ logging level lglobal info
+ logging level llapd notice
+ logging level linp notice
+ logging level lmux notice
+ logging level lmi notice
+ logging level lmib notice
+ logging level lsms notice
+ logging level lctrl notice
+ logging level lgtp debug
+ logging level lstats notice
+ logging level lgsup debug
+ logging level loap notice
+ logging level lss7 notice
+ logging level lsccp info
+ logging level lsua notice
+ logging level lm3ua notice
+ logging level lmgcp notice
+!
+stats interval 5
+!
+line vty
+ no login
+ bind 0.0.0.0
+ctrl
+ bind 0.0.0.0
+!
+cs7 instance 0
+ point-code 0.23.4
+ asp asp-clnt-OsmoSGSN-A 2905 0 m3ua
+ local-ip 172.18.8.10
+ local-ip fd02:db8:8::10
+ remote-ip 172.18.8.200
+ remote-ip fd02:db8:8::200
+ role asp
+ sctp-role client
+ as as-clnt-OsmoSGSN-A m3ua
+ asp asp-clnt-OsmoSGSN-A
+ routing-key 3 0.23.4
+ns
+ timer tns-block 3
+ timer tns-block-retries 3
+ timer tns-reset 3
+ timer tns-reset-retries 3
+ timer tns-test 30
+ timer tns-alive 3
+ timer tns-alive-retries 10
+ bind udp local
+ listen 172.18.8.10 23000
+ accept-dynamic-ip-sns
+bssgp
+sgsn
+ gtp local-ip 172.18.8.10
+ ggsn 0 remote-ip 172.18.8.103
+ ggsn 0 gtp-version 1
+ gsup remote-ip 172.18.8.103
+ gsup remote-port 4222
+ auth-policy remote
+ gsup oap-id 0
+ ! apn * ggsn 0
+ no cdr filename
+ no cdr trap
+ cdr interval 600
+ timer t3312 600
+ timer t3322 6
+ timer t3350 6
+ timer t3360 6
+ timer t3370 6
+ timer t3313 30
+ timer t3314 44
+ timer t3316 44
+ timer t3385 8
+ timer t3386 8
+ timer t3395 8
+ timer t3397 8
+ no compression rfc1144
+ no compression v42bis
+ mme test-mme0
+ gtp remote-ip 172.18.8.103
+ gtp ran-info-relay 262 42 3