Commit Graph

43 Commits

Author SHA1 Message Date
Oliver Smith 6a8118dad8 ttcn3: use debian-bookworm-titan
Related: OS#6057
Change-Id: I2017dd3888670c475b96e692d911a433484f3df9
2023-08-14 09:28:24 +00:00
Pau Espin 2eb695bc44 */osmo-stp.cfg: Explicitly define role & sctp-role
It was recently decided it's a good practice to always specify the role
and sctp-role for all ASPs configured in the VTY, since it's an
important configuration providing feedback on the network setup

Change-Id: Ia495bc3c5dd4421e5730c74b2f5dc4e4cdc1a673
2023-07-05 13:48:55 +00:00
Harald Welte abec88d183 stp: Expand osmo-stp.cfg for "norctx" tests
In osmo-ttcn3-hacks.git I81052ece7d1cc8b43da6155356ed1c4d9620acdc
we're adding support for so-called "norctrx"tests, covering
operation without routing-context IEs.  For this, we need additional
AS/ASP definitions in the osmo-stp.cfg

Change-Id: Ie00d96d04dd36c71c79f3b73713c3fe1c26a5145
Related: OS#6003
2023-04-22 13:50:25 +12:00
Oliver Smith f997b4e771 network_create: find free subnet automatically
Try multiple subnet numbers until successfully creating a network. This
way we can run the same ttcn3 testsuite multiple times in parallel
without conflicts (e.g. once against latest, once against nightly). Also
we don't need to make sure each new testsuite has a unique subnet
number anymore.

I've considered also adjusting network_bridge_create, but that gets used
exclusively by osmo-ran/, a script which we don't actually run
in jenkins. It seems that in this script it makes more sense to not get
a random subnet number.

Related: OS#5802
Change-Id: I57152b08ef0f38e17e7019a8df032189b03f56cf
2023-01-16 15:19:29 +00:00
Pau Espin a719a8db61 Use gerrit as osmo-ttcn3-hacks.git git remote
Other remotes are mirrors of gerrit one, which means there's some delay
between pushing some ref to the gerrit remote and having them available
in the mirrors.
Hence, it becomes annoying while developing and new stuff to test is
pushed. Let's simply use gerrit since it's the master remote.

Change-Id: Ic87c196f8b91a3a3e6ddde2cca36482ce7070df7
2022-09-20 12:09:32 +02:00
Oliver Smith a0a991f412 make/Makefile: always use docker run --rm
Add --rm to the "docker run" line in make/Makefile, and remove it from

Related: SYS#5827
Change-Id: Iea063aa39a08397ea64d2018b433991a130e7f56
2022-02-14 07:46:23 +00:00
Vadim Yanitskiy 44393058f6 make/Makefile: allow overriding '-it' for target 'run'
Allocating a pseudo-TTY (-t, --tty) fails when 'run' is executed
inside of a Jenkins or cron script.  This change fixes
ttcn3-bts-test, which invokes 'run' to fetch the config files.

Change-Id: If22f682be4f004c5bb43e65098079a4f4fe6158d
Fixes: If15461240f3037c142c176fc7da745a1701ae3f8
2022-02-11 15:21:16 +06:00
Harald Welte 0f74af6083 titan: move from debian-stetch-titan to debian-bullseye-titan
So far we were executing all our TTCN-3  tests from a container
image with Debian stretch (9) plus a custom more recent eclipse-titan
package from the osmocom feed.

Let's update the container base OS from stretch (9) to bullseye (11)
while using the same packaged eclipse-titan version (8.0.0) for running
the tests.  So this should be a low-risk change, as titan runtime
remains identical.

I've executed all test suites locally and couldn't see any regressions.

Related: OS#4969
Change-Id: Ib3bdfa3bec8f8ef42c55ca61cdee8fbca923874f
2021-12-16 11:40:17 +01:00
Oliver Smith 305ce55b74 ttcn3: write Osmocom repository to configs
Write a line like 'Misc_Helpers.mp_osmo_repo := "nightly"' into the
TTCN-3 config file (e.g. BSC_Tests.cfg), before starting the testsuite.
This allows executing different code paths in the tests based on the

Related: OS#5327
Change-Id: Ic06532f7a67e59458652c5cf4c8f6fee8113e703
2021-11-26 18:12:50 +01:00
Vadim Yanitskiy 8b2aeab0c2 ttcn3-stp-test: do not set mp_osmo_stp_newer_than_1_4_0
Setting a non-existing parameter makes TITAN unhappy:

  HC@fd91bc0a2114: Error while setting parameter field
                   'STP_Tests_M3UA.mp_osmo_stp_newer_than_1_4_0' to 'true':
                   Module parameter cannot be set, because no parameter with
                   name 'mp_osmo_stp_newer_than_1_4_0' exists in module

Change-Id: Ie4fba3eb73e0da60bc20859efddecc5ec816cb9e
2021-11-18 22:05:42 +03:00
Pau Espin 1821fd80e9 ttcn3-stp: osmo-stp in master is >1.4.0 now
osmo-stp 1.5.0 was released today, so we can drop those specific checks.

Change-Id: I354c1487d9a32e2c7d48c57e7b63007f5360677e
2021-11-16 19:12:31 +01:00
Oliver Smith 476e38e4ef ttcn3-stp-test: rename mp_stp_has_asp_quirk
Rename the option to mp_osmo_stp_newer_than_1_4_0, because I'm going to
use the variable in an upcoming osmo-ttcn3-hacks.git patch for something
unrelated to the asp quirk so we can avoid introducing another variable.

Related: osmo-ttcn3-hacks I43b1aa2c029c88c88320d40f60df46a5eb6c4c24
Related: OS#4239
Change-Id: I6a32398242b53c827a94cf65e4a35900a7c4171a
2021-08-16 09:34:20 +00:00
Oliver Smith 4ae6ba75b4 add image_suffix_is_latest
Make sure we run the latest-code paths for "latest-centos8" too.

Change-Id: Ibcc7dfb092b3766ef9b189ae990b43fdb746a022
2021-05-21 16:24:58 +02:00
Harald Welte c64b3155d8 ttcn3-stp-test: Add mp_stp_has_asp_quirk:=false for latest
Change-Id: Ib9a07a96f1adf871150e63eaf49a7e18c57d067e
2021-05-13 22:05:35 +02:00
Oliver Smith 033c6ab1be */ set -e after setting clean up trap
Abort the script and trigger the clean up script, whenever any of the
commands below to prepare the testsuite are failing. This saves time
with figuring out why suddenly all or most tests are failing, and avoids
running the entire testsuite on jenkins if it's obviously not going to

Related: OS#3208
Change-Id: Ie68da2affda8c96b3a515a857a921a05f1bf8ef7
2021-02-26 09:32:34 +01:00
Oliver Smith 12b961942a add common clean up trap
Add set_clean_up_trap() in and run it at the beginning
of the files. Move the common clean up code from the end of
every file into clean_up_common(), which gets called by the
trap. Add a custom clean_up() function to those files that
need additional clean up.

Replace explicit container stop commands (for containers attached to the
docker network) with one call to network_clean() in clean_up_common(). It
kills all containers attached to the docker network.

The motivation for this change is the upcoming optional build of initrd
and kernel during ttcn3-ggsn-test/ After building these, a
short smoke test will be performed to make sure we can boot the kernel
and initrd, before continuing to run the entire testsuite against it. If
building or the smoke test fails, we must do a proper clean up of the
network and fix permissions.

Related: OS#3208
Change-Id: I807c6221d22fec31db23e2516e477a3eb43347fb
2021-02-26 09:32:06 +01:00
Pau Espin c63a131a60 Remove test backward compatibility with older osmo-* versions
These changes are no longer needed since master versions of whole CNI
have been recently released.

Related: OS#5042
Change-Id: I6f491b58d4576b22c8ff3ab56a7b9e17163a8739
2021-02-25 16:41:47 +01:00
Oliver Smith 6f6724178b ttcn3: use REGISTRY arg with debian-stretch-titan
Allow jenkins to fetch the image from our private docker registry.
Outside of jenkins, the image is built locally just like before.

Related: OS#5017
Change-Id: I46cc176ea09d8badc359b627d7ce2f459211258c
2021-02-11 16:27:23 +01:00
Oliver Smith 2b38b8e779 ttcn3: move shared run code to script
While I'm at it with tidying up the Dockerfiles, create a with shared run code.

Related: OS#5017
Change-Id: Id90769707158f0488eca2313c57b99ea7a4a27c8
2021-02-11 15:45:40 +01:00
Oliver Smith 914a486ef1 debian-stretch-titan: prepare: start/stop links
Create symlinks to ttcn3-* and ttcn3-* in the script instead of in each of the ttcn3 Dockerfiles.

Related: OS#5017
Change-Id: I634cf71cff7936efe6e0461d21dc1119de922ada
2021-02-11 15:45:40 +01:00
Oliver Smith 892d910444 ttcn3: move prepare code to shared script
Move the git fetch/checkout code and make call to build the testsuite,
to debian-stretch-titan/ In the next patch, I
will extend the script to update deps right before building too (e.g.
because OSMO_TTCN3_BRANCH changed).

Related: OS#5017
Change-Id: I4b5bedf058dc527e821f9b7204c632820e671af9
2021-02-11 15:45:40 +01:00
Oliver Smith 61fed0ad39 ttcn3: move initial clone to debian-stretch-titan
Clone the osmo-ttcn3-hacks and all dependency repositories less often by
moving related commands to the shared debian-stretch-titan image.

Remove the 'git checkout -f -B master origin/master' line, because the
master branch is checked out by default.

While at it, move the shared "git config" commands too, and move them
before cloning the repositories, so they don't run again whenever the
deps change (logic to invalidate the cache if deps change will be added
in the next patch).

Related: OS#5017
Change-Id: I2bb142dce061eba4b6a828c4e435510e309989fd
2021-02-11 15:45:40 +01:00
Oliver Smith db3f98113c ttcn3: remove /root/projects/git symlink
Remove leftover from old TTCN-3 build scripts, before refactoring ttcn3
Dockerfiles. This line has already been removed in 357ec806 from 2017 for

In osmo-ttcn3-hacks.git, this is only referenced in the obsolete
bin/install.script (looks like we could remove that, together with the
rest of the bin dir?).

Related: OS#5017
Change-Id: Id23e7fae58ba246916a38aa0a10035d4f67f7588
2021-02-11 15:45:40 +01:00
Pau Espin 1f45fb08ff Add function to print docker network related parameters
Change-Id: Ie00561de7a4494065156a124565e2190151e6019
2020-08-27 12:49:43 +02:00
Pau Espin 8d4a97a3fc ttcn3-stp: Configure M3UA setup to use IPv6 together with IPv4
Depends: libosmo-sccp.git Change-Id I09226a5cecc37dd4676acd61c2051befe5234cb3
Depends: osmo-ttcn3-hacks.git Change-Id Ib1925ed1df5cea3fa66f28b5625532d454a2c338
Change-Id: Id6e197cc3ba71e36f29ceec44742b7452a47b36b
2020-08-27 10:47:28 +00:00
Harald Welte 306a51dd30 Enable IPv6 in docker networking
We previously only allocated IPv4 sub-nets to the network segments
created with 'docker network'.  Let's fix that by assigning both
IPv4 and IPv6 address ranges to each docker network.

Related: OS#4700
Change-Id: I8802208fddcce1ffa57e5626575d23d02b320d99
2020-08-13 15:01:58 +00:00
Neels Hofmeyr 04c20edefd collect core dumps: '--ulimit core=-1' and WORKDIR=/data everywhere
Change-Id: Ief73b53ed9da6f5af82975bc36d851277d5d3185
2020-06-21 20:58:22 +00:00
Oliver Smith 5505b95a15 ttcn3-*-test: remove implicit dependencies
Don't list debian-stretch-build and debian-stretch-titan as dependencies
anymore, now that docker_images_require finds them automatically.

Related: OS#4564
Change-Id: I3cb6b693f3dd9df84fb29c0217bb3dae454cc18f
2020-05-30 09:14:06 +02:00
Oliver Smith f48c09d3bc ttcn3-*-test/jenkins*.sh: add $DOCKER_ARGS
Allow to pass options to each "docker run" line in the various scripts. I'm using this to run the testsuites and Osmocom
components in docker with the same configurations as jenkins, but with
Osmocom and testsuite binaries built outside and mounted into the

DOCKER_ARGS="-v /usr/local:/usr/local:ro -v $hacks:/osmo-ttcn3-hacks:ro"

This allows very short test cycles without a second set of configs. The
full script that makes use of this feature is in osmo-dev.git,

Change-Id: I8d1f78aee926f8f6ec0b704e16639bc83f525816
2020-05-06 06:22:12 +00:00
Pau Espin 259fd3cedf ttcn3-stp: Set default OSMO_TTCN3_BRANCH to master
Change-Id: I6b19e50f65bca6fe556c748f3c2b633f65037dce
2020-01-16 14:26:35 +01:00
Pau Espin 091f0a940a ttcn3-stp: Fix recent commit breaking tests
Recent test aiming at dropping different cfg file for latest also
dropped the cp of the regular cfg file. Let's re-add it.

Fixes: 0f34d37491
Change-Id: Ia79e5b50978ed09ce4d0a5a286770e867657ad3e
2020-01-07 12:01:03 +01:00
Pau Espin 0f34d37491 ttcn3-stp: Drop unneeded different osmo-stp.cfg for latest
Latest tagged release of libosmo-sccp, version 1.2.0, already supports
the regular osmo-stp.cfg file.

Change-Id: Ifb3eb642fa5547d1ce2de81f51f181e226dceed7
2020-01-05 11:22:36 +00:00
Harald Welte 8e13dc1d7f ttcn3-stp-test: Support testing of 'latest'
Change-Id: I1ea9d3312a2775aee8c298370fc5cd84a4b62477
2019-12-10 21:31:27 +00:00
Pau Espin c3f157b939 Update ttcn3-*/ to log stdout+stderr of process to log file
This way we get VTY parsing failures as well as backtraces upon process

Related: OS#4212
Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5
2019-11-20 17:17:45 +01:00
Harald Welte 49544ac592 ttcn3-stp-tests: laforge/stp has been merged master; use master
Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b
2019-11-13 17:44:04 +01:00
Pau Espin 1569ceb9f4 ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp
Once osmo-ttcn3-hacks.git branch laforge/stp has been merged (where
STP_Tests devel was done), we can use master like we do for other

Change-Id: I844ecf8a636ead55b7b406cb97424a4a35a6b674
2019-11-12 13:10:38 +01:00
Pau Espin a319eac111 ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies
Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026
2019-11-07 18:39:22 +01:00
Pau Espin 8944147dbd ttcn3-stp/Makefile: Set branch to laforge/stp only if envvar not set
Change-Id: I1f4061f2b1d62e6a42af4629ce462269cfaf317f
2019-11-06 16:00:24 +01:00
Pau Espin 6135fcdafc ttcn3-stp: AS missing asp reference in osmo-stp.cfg
Change-Id: I3cac64217acf60720388f24713268a22e342e993
2019-11-05 19:32:38 +01:00
Pau Espin 1b8ddfc33e ttcn3-stp: Log osmo-stp output to file and gsmtap
Similar to what we do with other suites.

Change-Id: Ib12bc92c86e4a2ba15e1eec56f2ac0905281b21d
2019-11-05 17:16:20 +01:00
Harald Welte 436fe0c143 stp: don't only execute STP_Tests.control, but also M3UA and IPA
Change-Id: Icc7d168dc90d3551d27c1be27c50d66dd84f0a50
Related: OS4220
2019-10-30 12:01:14 +01:00
Harald Welte 1e45b4d966 osmo-stp-test: Ensure we build the laforge/stp branch
Change-Id: I2cf300eb37b327450da0f8b20ee209a6109bf8fe
Related: OS#4220
2019-10-30 11:55:25 +01:00
Pau Espin 5e70a29727 Introduce ttcn3-stp-test
Currently builds from osmo-ttcn3-hacks.git branch laforge/stp instead of
master, since it's only available in the former branch. Once it gets
merged, we can modify Dockerfile as explained in it.

Change-Id: I635c891f5da7b8c59527abbad14d7377465d1045
2019-10-24 16:46:02 +02:00