Commit Graph

125 Commits

Author SHA1 Message Date
Vadim Yanitskiy 9c63801efe ttcn3-bts-test: fix start_config_oml(): do not start BSC
As the comment states, the BSC container is not needed for the OML
tests.  The testsuite itself "speaks" OML to the IUT in this case.

Change-Id: Iab44b9ed83e917475c9e2e86ad32b303b05b2ace
Fixes: aad045f5 "ttcn3-bts-test: add env var to not run all configs"
Fixes: OS#6421
2024-03-26 21:05:14 +07:00
Oliver Smith 7c6f7f466c ttcn3-bts-test: use start_config functions
As suggested by Pau in code review, refactor the file to use functions
for starting the testsuites, SUT and related containers with specific
configurations.

Related: https://gerrit.osmocom.org/c/docker-playground/+/36389/comment/67a7c35e_766943a3/
Change-Id: If3cb7dbe585c03d21e5ec6353fd25575ccac7af0
2024-03-25 13:31:09 +00:00
Oliver Smith ef173eb534 ttcn3-bts-test: abort if missing osmo-config-merge
Change-Id: I9cea4affac0b3981c88078581a070f98649da667
2024-03-25 14:13:39 +01:00
Oliver Smith aad045f5b6 ttcn3-bts-test: add env var to not run all configs
Make it possible to e.g. run only one of the generic/oml/hopping
configurations.

I made a version of this patch a few weeks ago for testing OS#6375,
and I'm submitting it now so I can add multiple configurations for
ttcn3-ggsn-test in the next patch with the same logic.

Change-Id: I1dce5e6aa4b5d67f9f8c96ced611ab2875c353c8
2024-03-25 12:21:09 +01:00
Vadim Yanitskiy ca7db6c794 fixup: ttcn3-bts-test: do not start osmo-bts-virtual / virtphy containers
Change-Id: I9a38356be1f970a2b8f1bf51bfc220471502682f
Related: OS#6352
2024-02-12 03:34:07 +07:00
Vadim Yanitskiy 8c6ebc8c76 ttcn3-bts-test: do not start osmo-bts-virtual / virtphy containers
We cannot execute the virtphy based testcases due to the limitations
of Docker (see https://github.com/moby/libnetwork/issues/2397).  The
function starting the testsuite was already commented out, but not
the lines starting containers with osmo-bts-virtual and virtphy.

To put it simple, we start and immediately terminate those containers.
And since recently (Feb 1st), we started seeing socket creation errors
in both containers, causing jenkins.sh to abort early.  It's yet
unclear what's the cause of those socket errors, but regardless of
that we should still be running other pending testcases.

Change-Id: I7c9ccc9cc400edb7a05e222e51671fd49631a4cd
Fixes: OS#6352
2024-02-09 18:02:36 +07:00
Vadim Yanitskiy e384157228 ttcn3-bts-test: set PCUIFv12 for both -master and -latest
osmo-bts v1.7.2 (recently tagged) now also speaks PCUIFv12.

Take a chance to fix ttcn3-bts-test-2023q1 by setting PCUIFv10.

Change-Id: I70f0c30d6c514614095dcbbcac5d025001861fbc
2023-12-15 15:07:38 +07:00
Philipp Maier 48ef15bd63 ttcn3-bts/pcu-test: Use PCUIF v12 for current master and PCUIF v11 for latest
At the moment we use PCUIF v11 in latest and in master. This will now
change (see Depends) so that we will have to use v12 in master. This
patch adds the necessary conditional config changes.

Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Change-Id: I5c0914c0bf906b51a500a3b099578700798cf8c0
Related: OS#6191
2023-11-21 09:17:32 +00:00
Pau Espin e828340720 ttcn3-bts: Use PCUIF v11
Since osmo-bts 1.7.0 which was just released, PCUIF v11 is supported, so
use it both in master and latest.

Change-Id: I6c905d074ffc324dd72d6a5c9ce79f3c241ac780
2023-09-13 08:07:15 +00:00
Oliver Smith 6a8118dad8 ttcn3: use debian-bookworm-titan
Related: OS#6057
Change-Id: I2017dd3888670c475b96e692d911a433484f3df9
2023-08-14 09:28:24 +00:00
Philipp Maier a6e665e5e3 ttcn3-bts-test/jenkins.sh: set mp_pcuif_version
OsmoBTS currently uses PCUIF v.10 but will move to v.11 soon. (see
Depends). Unfortuantely this means that we have to execute the TTCN3
testsuite in master with PCUIF v.11 and in latest with PCUIF v.10. This
will be the case until the current master becomes the new latest on the
next release.

Depends: osmo-bts.git I25816ac12e63cc6b641eb414e6bc7eaa9c85fc25
Depends: osmo-ttcn3-hacks.git I08de02e951e10bc8b4381cc2ad32e63f2747e3c4
Change-Id: Ia28bc0d6d3cbfe63be19443db86631fb67bb80fb
Related: OS#5927
2023-07-09 08:11:48 +00:00
Oliver Smith 5227834974 ttcn3-bts-test: fix config merge caching problem
Do "docker run" directly inside the Makefile, without wrapping it
through the "run" target in make/Makefile. Use $(USER)/ttcn3-bts-test as
image name, instead of $(REGISTRY)/$(USER)/ttcn3-bts-test. The
$(REGISTRY)/ part is hardcoded in make/Makefile.

This fixes TTCN3-centos-bts-test, because it uses the ttcn3-bts-test
image that gets built in jenkins.sh before running 'make cfg'. Without
the patch, an image downloaded some time ago from the registry gets
used (a new image is not pulled), leading to the stale config.

Fixes: OS#6065
Change-Id: Iebd81e814d84e8cf8360568419ceda7ffc38e742
2023-06-20 14:15:58 +02:00
Vadim Yanitskiy 4275e63739 ttcn3-bts-test: enable running GPRS related tests with trxcon
Change-Id: I06ad8e6403e2538c64d650f19a8d0bd4a344edbe
Depends: osmo-ttcn3-hacks.git Ib8f4459480bbe12584a6fa71882f745f03c5055d
Related: osmocom-bb.git I9567d64f9d00262e36147e8d7e541e5e246bda5f
Related: OS#5500
2023-03-27 12:12:24 +00:00
Oliver Smith 4f459b779e docker kill: wait until containers are stopped
As "docker kill" / "docker container kill" (alias) doesn't block until
the given container stops, make sure to always run "docker wait"
afterwards.

Closes: OS#5928
Change-Id: I0242ece96541d8036ebbf8b0f498ebf231db26b5
2023-03-07 09:02:02 +00:00
Pau Espin 666488c8e4 ttcn3-*: Update test setup after Osmocom CNI release 202302
Change-Id: If34b043a55177e6c0d1be3949fc2a2682258cc84
2023-02-08 12:36:27 +01:00
Oliver Smith f71e0f2856 ttcn3-bts-test: replace subnets during 'make cfg'
Make ttcn3-bts-test work as expected again by replacing the subnets
hardcoded in the confmerge files and Makefile.

Related: OS#5802
Change-Id: I733619f80b4e2456da070649634d3c942bb6d95f
2023-01-18 12:35:42 +01: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/jenkins.sh, 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
Oliver Smith 4cb0fac1b0 ttcn3-*/jenkins*.sh: use $SUBNET everywhere
Use the SUBNET variable instead of hardcoding it in some places. Split
commands across multiple lines while at it to improve readability.

Related: OS#5802
Change-Id: I08f83089ef97f5f92d4bbfa5743301e7375e9f0f
2023-01-16 11:41:11 +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
Pau Espin 5226db6c01 ttcn3-bts: Add osmux configurations
Requires: osmo-ttcn3-hacks.git I1af23c7a60b05edc3b544f1fea0023f48e89f7a7
Requires: osmo-bts.git Ib80be434c06d07b3611bd18ae25dff8b14a7aad9
Related: SYS#5987
Change-Id: I185b77eb4fa05501f098d89b80b66168349175bb
2022-09-14 12:17:14 +00:00
Oliver Smith 38f7fcb265 */.release: remove
These files are in .gitignore and get generated at the end of running
'make'. Remove them to have less cluttered 'git grep' output.

Change-Id: Ie5bf05220359ac0941f62cc86ed843363548784a
2022-07-06 12:36:26 +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
RUN_ARGS.

Related: https://osmocom.org/projects/osmocom-servers/wiki/Docker_cache_clean_up
Related: SYS#5827
Change-Id: Iea063aa39a08397ea64d2018b433991a130e7f56
2022-02-14 07:46:23 +00:00
Harald Welte 8e3b3ff43c ttcn3-bts-test: use osmo-config-merge to generate config files
This uses the config files from osmo-ttcn3-hacks.git instead of keeping
local copies around here, which has shown many times will get out of
sync.  Extract the original files (*.src.cfg) from the testsuite image
(ttcn3-bts-test) and merge them with the local *.confmerge files using
osmo-config-merge.  Use the resulting files (*.gen.cfg).

Unfortunately, osmo-config-merge is not capable of removing text blocks
or substituting specific parts, so we fall-back to using sed where it's
needed.  A good example is 'log gsmtap 127.0.0.1', as there is no
command for removing a logging target of such type.

Co-Authored-By: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
Co-Authored-By: Oliver Smith <osmith@sysmocom.de>
Change-Id: If15461240f3037c142c176fc7da745a1701ae3f8
2022-02-10 22:49:24 +06:00
Vadim Yanitskiy edaa9d3033 ttcn3-bts-test: move generic config files into a directory
Change-Id: I1bc5c51306525c6829e9d8e2991555a99c9b49a2
2022-02-10 19:08:37 +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
Vadim Yanitskiy 7fc251e5bf ttcn3-bts-test/osmo-bts.cfg: use default {fn,rts}-advance values
It's better if we run ttcn3-bts-test with the default values, given
that they were significantly reduced some time ago.

Change-Id: If8438adfdbc506d2b6b7858ea8a0ea859ba246a1
Related: I7da3d0948f38e12342fb714b29f8edc5e9d0933d (osmo-bts)
Related: OS#4487
2021-12-14 13:01:36 +00:00
Vadim Yanitskiy bcf017e455 ttcn3-{bts,bsc,msc,hlr}-test: set OSMO_SUT_{HOST,PORT}
This enables the test suite to obtain talloc reports between the
test case executions, which get stored together with the PCAP files.
Let's see how it works with the mentioned projects first;  others
can be configured later.  See [1] for more details.

Change-Id: Icd4c2d80db934535d499598282ed9416d8088163
Related: [1] I1b03b17426d8760c55976e3b78ca2f3af248c055
Related: OS#5328
2021-12-01 13:48:50 +00: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
repository.

Related: OS#5327
Change-Id: Ic06532f7a67e59458652c5cf4c8f6fee8113e703
2021-11-26 18:12:50 +01:00
Vadim Yanitskiy 9710e7ae01 ttcn3-bts-test: set bind address for the RTP Emulation
Otherwise the loopback address is used, what causes test cases
employing the RTP Emulation component to fail:

  Connection refused (unexpected)

Change-Id: Ia20ccd9e6db61d7a105523648c678db90ad345eb
2021-07-17 22:37:24 +06:00
Pau Espin 12c37168ed bts-oml: Set mp_pcu_socket
Since recently (osmo-ttcn3-hacks.git
I78880098a55d1cb456011746efa0a47832a86ca8), BTS_Tests_OML use
mp_pcu_socket to set up PCUIF, which is used in some tests (like
validating forwarding of PCUIF messages PCU<->BSC).

Related: SYS#5303
Change-Id: Iac4aac8d98e2f45021858ddaa5e20ca4c6effb31
2021-06-28 14:25:43 +02:00
Vadim Yanitskiy 19d334a238 ttcn3-bts-test/BTS_Tests.cfg: execute VAMOS specific test cases
Change-Id: I421f6ce5b689cd221f000043fcc0f5985e266e95
Related: SYS#4895, OS#4941
2021-06-03 05:01:20 +02:00
Vadim Yanitskiy b912c80cc2 ttcn3-bts-test: OML tests ivolve no GSMTAP Um logging
Change-Id: I50891130eaf7957efbf71839564a5dd9d58a1e3f
2021-03-18 02:35:21 +01:00
Vadim Yanitskiy b3aaf7a3cf ttcn3-bts-test: use 'gsmtap-sapi enable-all' parameter
Keep PDTCH/PTCCH disabled, it will blow up PCAPs otherwise.

Change-Id: I551a6da7858342279db3c5e8ebff250a7922a291
2021-03-18 02:35:03 +01:00
Vadim Yanitskiy 76e2529e42 ttcn3-bts-test: use 'gsmtap-remote-host' parameter
Command line argument '-i' has been deprecated.

Change-Id: Ib01069a55a27e79c67b76abe39763c1b645075e5
Related: I17676a21c4e0c9cbc88f2c5c53a39c6c6c473ca1
2021-03-18 02:34:11 +01:00
Vadim Yanitskiy 79b752fa32 */osmo-bsc.cfg: remove obsolete no-op parameters
Change-Id: Idebf9df98648b3fe8213cae550ce50e9805bac96
2021-03-09 13:50:41 +01:00
Vadim Yanitskiy e1dcf9b7a2 */osmo-bts.cfg: remove obsolete 'uplink-power-target'
Change-Id: Idbfe29f1eed05f9d70d6664f21c92cf44c954c26
2021-03-09 11:42:38 +01:00
Pau Espin 6ef96e4980 bts-test: Drop uneeded module param RSL_Emulation.mp_rslem_patch_ipa_cid
Since we updated -latest to new releases, this param is never set to
true anymore. Furtermore, it will be dropped soon completely.

Related: OS#5042
Depends: osmo-ttcn3-hacks.git Change-Id I39e9c1986ea682d54dcb22b31798ca91f1677949
Change-Id: I4bda577f1ed6964a2114df1aba366177998f0854
2021-02-26 13:02:02 +01:00
Oliver Smith 033c6ab1be */jenkins.sh: 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
work.

Related: OS#3208
Change-Id: Ie68da2affda8c96b3a515a857a921a05f1bf8ef7
2021-02-26 09:32:34 +01:00
Oliver Smith 12b961942a jenkins-common.sh: add common clean up trap
Add set_clean_up_trap() in jenkins-common.sh and run it at the beginning
of the jenkins.sh files. Move the common clean up code from the end of
every jenkins.sh file into clean_up_common(), which gets called by the
trap. Add a custom clean_up() function to those jenkins.sh 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/jenkins.sh. 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
ttcn3-docker-run.sh 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-*-start.sh and ttcn3-*-stop.sh in the
prepare.sh 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/ttcn3-docker-prepare.sh. 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
ggsn-test.

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
Vadim Yanitskiy c52dbbe7f0 ttcn3-bts-test: fix: sleep 1 second before respawning the IUT
There has been a lot of changes merged to both osmo-{bsc,bts}, so
now the later seems to be respawning faster then before.  Because
of that, osmo-bts-trx is now reaching the limit of 500 runs on
Jenkins right in the middle of ttcn3-bts-test execution:

  respawn.sh: exiting after 500 runs

causing the remaining test cases to fail due to:

  "BTS_Tests.ttcn:253 : Timeout waiting for RSL bring up"

Most likely, the IUT respawns several times in the windows between
the test cases, i.e. after TITAN finishes one test case and before
it starts another.  Let's instruct respawn.sh to sleep 1 second
before starting the process again.

Change-Id: I09e5a8e7c4d28424cd0d004a8bae3cf0ade2d838
2020-12-16 14:07:12 +00:00
Pau Espin e89c0d2ede ttcn3-bts: Enable gsmtap sapi for tch in osmo-bts.cfg
Change-Id: Idbd30800538200970de7a7fba6cd051cdf7ff252
2020-10-21 11:55:19 +00:00
Vadim Yanitskiy 0e2a3d6bb1 ttcn3-{pcu,bts}-test: use PCUIFv9 for 'latest' images
Change-Id: I6f072e4db07fd6907b91925549edcf62d9c93fb7
Related: I9350c4a54434c3d46ce9424f382ca0057e58d053
Related: SYS#4868, SYS#4915
2020-09-22 02:00:41 +07:00
Vadim Yanitskiy 078717ab2b ttcn3-bts-test/fh: do not configure CBCH slots statically
In BTS_Tests_SMSCB, we dynamically configure the CBCH slots via
the VTY interface, so there is no need to set them here.  This
was also the reason of some SMSCB test case failures, because
the BSC would send unexpected LOAD INDICATIONs.

Change-Id: I6e005ca772e26878c7b19df0d854936d7b7718dd
Related: SYS#4868, OS#4708
2020-09-12 20:16:31 +07:00