Change in docker-playground[master]: Introduce ttcn-sccp dockerized setup

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Jan 17 21:10:07 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16893 )

Change subject: Introduce ttcn-sccp dockerized setup
......................................................................

Introduce ttcn-sccp dockerized setup

Since examples/sccp_demo_user (the binary used to test SCCP) is not
installed by libosmo-sccp.git during make install, we need to install it
manually after "make" step, and hence it's only available in
osmo-stp-master, because in osmo-stp-latest we used packaged files.

Related: OS#4343
Depends: osmo-ttcn3-hacks.git Ied9fbfb9bd35a99205ca13db033dd9ea03d51238
Change-Id: I5a7e6ff5f6e5f6e34d6a5ab29bd760a6f9d49c4b
---
M osmo-stp-master/Dockerfile
A ttcn3-sccp-test/Dockerfile
A ttcn3-sccp-test/Makefile
A ttcn3-sccp-test/SCCP_Tests.cfg
A ttcn3-sccp-test/jenkins.sh
5 files changed, 109 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved; Verified



diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile
index 622d0b9..e76e5a9 100644
--- a/osmo-stp-master/Dockerfile
+++ b/osmo-stp-master/Dockerfile
@@ -32,6 +32,7 @@
 	autoreconf -fi && \
 	./configure && \
 	make -j8 install && \
+	install examples/sccp_demo_user /usr/local/bin/ && \
 	ldconfig
 
 VOLUME	/data
diff --git a/ttcn3-sccp-test/Dockerfile b/ttcn3-sccp-test/Dockerfile
new file mode 100644
index 0000000..d9c3232
--- /dev/null
+++ b/ttcn3-sccp-test/Dockerfile
@@ -0,0 +1,35 @@
+ARG	USER
+FROM	$USER/debian-stretch-titan
+
+RUN	mkdir /root/projects && (cd /root/projects && ln -sf / git)
+RUN	git clone git://git.osmocom.org/osmo-ttcn3-hacks.git
+
+RUN	cd osmo-ttcn3-hacks && \
+	git checkout -f -B master origin/master && \
+	make deps
+
+RUN	git config --global user.email docker at dock.er && \
+	git config --global user.name "Dock Er"
+
+ARG	OSMO_TTCN3_BRANCH="master"
+
+ADD	http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
+RUN	cd osmo-ttcn3-hacks && \
+	git fetch && \
+	git checkout $OSMO_TTCN3_BRANCH && \
+	(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
+	git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
+	make sccp
+
+VOLUME	/data
+
+RUN	ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
+	ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
+
+COPY	SCCP_Tests.cfg /data/SCCP_Tests.cfg
+
+CMD	cd /data && \
+	/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sccp/SCCP_Tests; \
+	exit_code=$?; \
+	/osmo-ttcn3-hacks/log_merge.sh SCCP_Tests --rm; \
+	exit $exit_code
diff --git a/ttcn3-sccp-test/Makefile b/ttcn3-sccp-test/Makefile
new file mode 100644
index 0000000..cbcd544
--- /dev/null
+++ b/ttcn3-sccp-test/Makefile
@@ -0,0 +1,3 @@
+RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.2.202 -v ggsn-test-vol:/data
+
+include ../make/Makefile
diff --git a/ttcn3-sccp-test/SCCP_Tests.cfg b/ttcn3-sccp-test/SCCP_Tests.cfg
new file mode 100644
index 0000000..0d6a91b
--- /dev/null
+++ b/ttcn3-sccp-test/SCCP_Tests.cfg
@@ -0,0 +1,30 @@
+[ORDERED_INCLUDE]
+"/osmo-ttcn3-hacks/Common.cfg"
+"/osmo-ttcn3-hacks/sccp/SCCP_Tests.default"
+
+[LOGGING]
+*.JUnitLogger.testsuite_name := "SCCP_Tests"
+
+[TESTPORT_PARAMETERS]
+*.SCCP_DEMO_USER_VTY.CTRL_HOSTNAME := "172.18.22.200"
+*.SCCP_DEMO_USER_VTY.CTRL_PORTNUM := "2324"
+
+[MODULE_PARAMETERS]
+SCCP_Tests.mp_sccp_cfg := {
+        {
+                        sccp_service_type := "mtp3_itu",
+                        sctp_addr := { 2905, "172.18.22.203", 2905, "172.18.22.200" },
+                        own_pc := 23,
+                        own_ssn := 202, /* sscp_test_server.c: SSN_TEST_ECHO */
+                        peer_pc := 1,
+                        peer_ssn := 202, /* sscp_test_server.c: SSN_TEST_ECHO */
+                        sio := '03'O, /* NI=Internal, SCCP */
+                        rctx := 0
+        }
+};
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+SCCP_Tests.control
+SCCP_Tests_RAW.control
diff --git a/ttcn3-sccp-test/jenkins.sh b/ttcn3-sccp-test/jenkins.sh
new file mode 100755
index 0000000..550dc43
--- /dev/null
+++ b/ttcn3-sccp-test/jenkins.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+. ../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+# Always require osmo-stp-master since is the only with sccp_demo_user installed
+docker_images_require \
+	"debian-stretch-build" \
+	"osmo-stp-master" \
+	"debian-stretch-titan" \
+	"ttcn3-sccp-test"
+
+mkdir $VOL_BASE_DIR/sccp-tester
+cp SCCP_Tests.cfg $VOL_BASE_DIR/sccp-tester/
+
+mkdir $VOL_BASE_DIR/sccp
+#cp osmo-sccp.cfg $VOL_BASE_DIR/sccp/
+
+network_create 172.18.22.0/24
+
+echo Starting container with sccp_demo_user
+docker run	--rm \
+		--network $NET_NAME --ip 172.18.22.200 \
+		-v $VOL_BASE_DIR/sccp:/data \
+		--name ${BUILD_TAG}-stp -d \
+		$REPO_USER/osmo-stp-master \
+		/bin/sh -c "sccp_demo_user -l 172.18.22.200 -r 172.18.22.203 >>/data/sccp_demo_user.log 2>&1"
+
+
+echo Starting container with SCCP testsuite
+docker run	--rm \
+		--network $NET_NAME --ip 172.18.22.203 \
+		-e "TTCN3_PCAP_PATH=/data" \
+		-v $VOL_BASE_DIR/sccp-tester:/data \
+		--name ${BUILD_TAG}-ttcn3-sccp-test \
+		$REPO_USER/ttcn3-sccp-test
+
+docker container kill ${BUILD_TAG}-stp
+
+network_remove
+collect_logs

-- 
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16893
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I5a7e6ff5f6e5f6e34d6a5ab29bd760a6f9d49c4b
Gerrit-Change-Number: 16893
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200117/82cb6eef/attachment.htm>


More information about the gerrit-log mailing list