Commit Graph

110 Commits

Author SHA1 Message Date
Pau Espin 4c73bc883d bsc: Set route ctx 0 for IPA and 1 for M3UA
Since libosmo-sccp.git 89407619a31a4332bdb59e7921b99a29b7d6e00c it is
not allowed to use routing ctx != 0 for IPA AS.

Change-Id: If3e883aa988ffa1686f1363d5d5d4dbb21ce36c7
2019-10-22 18:44:59 +02:00
Pau Espin 65bc0ae407 ttcn-*: Fix gsmtap log not enabled
gsmtap log won't be sending any message unless it is allowed by "logging
filter all 1".

Change-Id: Ibf8062c0d962f2572a07623e6f06936df0d42c67
2019-10-04 15:50:50 +02:00
Oliver Smith 5f98d0120a sccplite/osmo-bsc.cfg: add bts 3
Have the same amount of bts like in the regular (non-sccplite)
osmo-bsc.cfg, so we can make BSC_Tests.TC_ctrl pass for regular and
sccplite again.

Related: I1c57a04747f5ec004ccf4657954dcb0b003c24fc
Related: Ie2c664ba0f845da644e20e2c919c12d8fc2af6ba (osmo-ttcn3-hacks)
Related: OS#4156
Change-Id: I00547dccf8908d46df4730cb513fe577956d7683
2019-08-20 08:00:15 +00:00
Pau Espin 38f51b709f ttcn3-bsc/msc: Drop fixups for latest releases not supporting osmux
Last releases of osmo-bsc and osmo-bsc already support Osmux, so we can
drop those lines as indicated.

Change-Id: Id6a18f2d691f6e9234a5a0cf91ed5c840a6394de
2019-08-19 19:24:39 +02:00
Neels Hofmeyr 8ddb0f87ab apply osmo-bsc.cfg changes from osmo-ttcn3-hacks
Analogous to osmo-ttcn3-hacks patch If44dd6b578cdc55076c8180707d1c2d69fe5f2a8,
also remove the neighbor config from osmo-bsc.cfg here.

Change-Id: I23d9a2046709452f4d3904230871f7421c6987a9
2019-08-15 01:05:27 +02:00
Neels Hofmeyr f3c0493976 adjust osmo-bsc.cfg for TC_ho_neighbor_config_1 thru _7
- Actually enable handover.
- Add bts 3

Related: osmo-ttcn3-hacks Ia4ba0e75abd3d45a3422b2525e5f938cdc5a04cc
Change-Id: I1c57a04747f5ec004ccf4657954dcb0b003c24fc
2019-08-13 21:53:50 +00:00
Oliver Smith c2ed5bb201 ttcn3-*: enable GSMTAP logging
Configure each osmo-* program to send GSMTAP log output to the IP of the
docker container, which runs the testsuite (and therefore runs tcpdump).

Related: https://lists.osmocom.org/pipermail/openbsc/2019-June/012946.html
Change-Id: I99e74f6ffb5b7d566cec35995bf067df414968d8
2019-07-10 09:34:39 +02:00
Pau Espin ee49c7ba88 ttcn3-*: Enable extended-timestamp in VTY cfg
Having extended-timestamp allows for easier matching between osmo-*.log
files and pcap traces.

Change-Id: I98cdc0adc24edc966d5648d2c215c6ad7c749209
2019-06-03 17:59:42 +02:00
Pau Espin 0e59f1e8bf bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest
Recent commit added bits to disable "osmux on/off" vty commands on
"-latest" tested, but forgot to add required line in
sccplite/BSC_Tests.cfg for sed command in jenkins.sh script to work.

Fixes: 2cdab85e5f
Change-Id: I9b4ce2d7151d65b4c83417a59fd01672971b3937
2019-05-31 14:44:58 +02:00
Pau Espin 2cdab85e5f bsc: Disable osmux for ttcn3-bsc-test-latest
Latest tagged version of osmo-bsc doesn't support "osmux on/off" VTY
commands, so we have to enable osmux use on that version to avoid most
TTCN3 tests failing during set up phase.

Depends: osmo-ttcn3-hacks I61e4c59b2926f3f70cb6d0190a8683861e54179a
Change-Id: I745b210f43cb147d323a15f78c294f70ee077729
2019-05-28 18:42:01 +02:00
Oliver Smith 61f2be7bd4 Fix git checkout for branches and commits
Replace 'git checkout -f -B $BRANCH origin/$BRANCH && \' in all
Dockerfiles that accept branch variables ($OSMO_TTCN3_BRANCH,
$OSMO_MGW_BRANCH, ...) with the following:
	git checkout $BRANCH && \
	(git symbolic-ref -q HEAD && git reset --hard origin/$BRANCH || exit 1); \

This allows using branch names and commit hashes in the $BRANCH
variables. Using commits is needed for the bisect script added in [1].

The second line ("(git symbolic...") checks if we are in detached HEAD
state after the checkout, and if we are not, pulls in all new commits
from origin/$BRANCH. Note that it ends in ';' instead of '&&', because
the command in the next line should be executed even if
"git symbolic-ref" does not exit with 0 (detached HEAD state).

Here is an example, to illustrate that the new command does the right
thing. Clone a repository and be 50 commits behind origin/master:
$ git clone "https://git.osmocom.org/osmo-mgw"
$ cd osmo-mgw
$ git reset --hard origin/master~50

With BRANCH="master":
$ git checkout master && \
  (git symbolic-ref -q HEAD && git reset --hard origin/master || exit 1); \
  echo "done"
Already on 'master'
...
done
$ git status
Your branch is up-to-date with 'origin/master'.

With BRANCH="85978d":
$ git checkout 85978d && \
  (git symbolic-ref -q HEAD && git reset --hard origin/85978d || exit 1); \
  echo "done"
Note: checking out '85978d'.
...
done
$ git status
HEAD detached at 85978dad

Related previous changes:
* [2] made it work for commit hashes, but broke using branch names other
      than master, and pulling in new commits from master
* [3] made branches other than master work again, but did not fix
      pulling in new commits from master
* [4] reverted [3] and the git checkout related part from [2]

[1] Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f
[2] Change-Id: If3bc5fae07cf63c4fef68306be4c4328660bc869
[3] Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3
[4] Change-Id: Ie6da0f9ea96f11407e38545a6b3cf22ef9cadc25

Related: OS#4015
Change-Id: I4004980baf0b7d6096702b6f3067ccbdb369a28c
2019-05-22 11:18:56 +02:00
Harald Welte 06ac6e455e Revert "Simplify git checkout, allow branches and commits"
Unfortuately this commit will check out *local* master (i.e. the
previous checkout) rather than the origin/master as it's supposed to
be. This means that ever since merging this patch, our ttcn3 tests
were running some "undefined" stale versions and not current master.

This reverts commit 26565bb729.

Change-Id: Ie6da0f9ea96f11407e38545a6b3cf22ef9cadc25
2019-05-21 17:53:11 +02:00
Oliver Smith 26565bb729 Simplify git checkout, allow branches and commits
Replace the following statements:

a) "git checkout -f -B $BRANCH origin/$BRANCH"
b) "git checkout -f -B $BRANCH $BRANCH"

with:

c) "git checkout -f $BRANCH"

Regarding a), we don't need to specify 'origin/' for each branch, since
we are cloning the repositories in the same Dockerfile, and therefore we
know for sure that there is only one remote and branch names won't be
ambiguous. Removing the 'origin/' allows to put commit hashes into the
branch variables (like done in the new bisect script [1]).

Version b) does not work with branch names:
$ git checkout -f -B osmith/check-imei-before-lu osmith/check-imei-before-lu
fatal: Cannot update paths and switch to branch 'osmith/check-imei-before-lu' at the same time.
Did you intend to checkout 'osmith/check-imei-before-lu' which can not be resolved as commit?

New version c) works with both commits and branches, and it is shorter.

[1] Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f

Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3
2019-05-07 10:24:52 +02:00
Harald Welte 7c53c9e60d Switch all osmo-*-master and ttcn3-*-test from jessie to stretch
Jessie will be EOL in June 2019, let's make the switch to stretch
before that.

Change-Id: I37a534d07081f3d321869c86d49d03171c8da0c6
2019-03-30 09:56:36 +00:00
Harald Welte cffe1022b5 print branch name and git commit hash during docker container build
This is quite useful when looking at jenkins logs to know which exact
version was built at the time.

Change-Id: Id52c382b454e2beecf46820752aeff15b2c1a0ae
2019-03-29 16:40:40 +00:00
Philipp Maier 73f2d8b9b1 ttcn3-bsc-test: set EARFCN in osmo-bsc.cfg
Currently no EARFCN is set in osmo-bsc.cfg. This setting is required for
TC_chan_rel_hard_clear_csfb to function

Change-Id: I929c0b2927eb78573b7208683cf610be6be8812a
Related: OS#3852
2019-03-21 15:54:59 +00:00
Vadim Yanitskiy b6c3dd787a .../osmo-bsc.cfg: drop deprecated dyn_ts_allow_tch_f
Since Ib2335d02ea545aff837aadd49f15b2fdb418c46e, this VTY option
is deprecated in osmo-bsc, so let's actualize the config files.

Change-Id: I709e1afd2a9cccdc92eec312dff607947a10c299
2019-01-14 21:07:36 +00:00
Pau Espin f8edc56f3a bsc: osmo-bsc.cfg: Use extended timestamp
It allows for easier matching against pcap files.

Change-Id: Ida71bdd8b3ca0f8bd3f2888e10e72f2872d2e62a
2018-11-08 17:38:23 +01:00
Oliver Smith ccf62eb231 jenkins.sh: IMAGE_SUFFIX, docker_images_require()
Default value "master" of the IMAGE_SUFFIX environment variable can be
changed to "latest" to test the latest stable builds instead of the
nightly ones. Use docker_images_require() to make sure that the required
images are existing and up-to-date before running the tests.

Related: OS#3268
Change-Id: Idbb708ab16cb71bab5069127945b63388222369e
2018-10-26 10:19:05 +02:00
Neels Hofmeyr 850c89ffa8 osmo-bsc.cfg: inter-bsc HO: add a neighbor identity
This mirrors osmo-ttcn3-hacks change:
"bsc: inter-BSC HO: add TC_ho_out_of_this_bsc, TC_ho_into_this_bsc"
change-id Id22852d4be7f127d827e7a8beeec55db27c07f03

(As well as removal of the 'add' keyword in change-id
I6a83a8d4ba61b87905c6fae457d4b4eb6078dce9 after osmo-bsc change
I143f21f6069d1a86096cc8240cf69eb7ea9c8ac8.)

Related: OS#2283
Change-Id: I077c2ad2ede900ec43f55655bd740651d3bbe83d
2018-09-27 22:22:34 +02:00
Harald Welte ff3dc6e45f ensure well-formed config files
Change-Id: Id687e63c418e2e955ccbb92f2420a80fc0704ea4
2018-09-26 09:27:38 +00:00
Oliver Smith 7ed7a2bdd2 Fix "'laforge/debian-jessie-build' not found"
Instead of hardcoding laforge's username in all FROM statements in the
Dockerfiles, make use of the USER variable (as passed through by the
"make/Makefile" with "docker build --build-arg USER=..."). Thanks to
fixeria for proposing this fix!

This requires running docker-ce, old versions of docker (such as the
one in the official repositories of the latest Fedora) don't support
variables in the FROM line. But docker-ce can be installed after
adding docker's 3rd party repositories.

Closes: OS#3457

Change-Id: Ic5f11c8a4e247f632cb6aea6d147e94c53e0130f
2018-09-06 15:17:06 +02:00
Daniel Willmann 1ec249b51c BSC_sccplite: Different network names for BSC AoIP/sccplite tests
Change-Id: I9124340817888c02574735ab1b1c6c2df3e93212
2018-08-27 20:30:08 +02:00
Harald Welte 060d47f071 use non-overlapping IP networks for bsc-sccplite and SIP tests
The osmo-sip-connector test is already using 172.18.11.x, let's migrate
sccplite to 172.18.12.x to prevent any conflicts when running both tests
on the same build slave (docker instance).

Change-Id: I96beed1f5e01bdb8e77e20f77a459aa006de10fe
2018-08-24 08:32:59 +02:00
Pau Espin 618505f98f ttcn3-*: Merge logfiles no matter resolution of tests
Previous to this commit, log messages were not being merged if tests
were resolved as failed (test-suite.sh ending with exit code != 0),
which can happen if at least one test failed.

Change-Id: If293fc2d3182ef2a7b997faa8b41129a9dd89c45
2018-07-06 14:50:47 +02:00
Harald Welte 57b8610ae1 ttcn3-bsc-test: Fix sccplite configuration
Change-Id: I79ac95df2fe973d016706be407ec21853abd7875
2018-06-03 22:54:41 +02:00
Harald Welte 61145cf086 bsc: Enable LCLS tests from BSC_Tests_LCLS TTCN-3 module
Change-Id: I0439c61cc49e088efef3b91c1dbf293ee9a44939
2018-06-03 15:16:41 +00:00
Harald Welte da04310dd9 ttcn3-bsc-test: Add SCCPlite configs + jenkins-sccplite.sh
The existing dest config + jenkins.sh test 3GPP AoIP operation,
while the new set of configs + jenkins-sccplite.sh are testing
IPA/SCCPlite operation of osmo-bsc.

Change-Id: Ief0799a8f7d378dc3831e7988c9175166c82eace
2018-05-30 14:28:25 +00:00
Harald Welte baaf308fcb osmo-bsc.cfg: remove obsolete "dest" command
Change-Id: I9c81af2e5ff1149a9fb0cb161e907eddf2270648
2018-05-30 14:28:25 +00:00
Stefan Sperling 4147adabb9 fix location area codes in BSC_Tests osmo-bsc.cfg for jenkins
The osmo-bsc configuration file used on Jenkins assigned wrong location
area codes to BTS 1 and 2. This fix should make TC_paging_imsi_nochan_lac
and TC_paging_imsi_nochan_lai pass on Jenkins.

Change-Id: Id35a85804c4a07f6c4136ef4570b4e21e250b9cd
2018-05-29 16:13:40 +02:00
Neels Hofmeyr 2f61bf81e9 jenkins.sh: have one common function to collect logs
To remove code dup and prepare a change to where logs are written, add
collect_logs() to jenkins_common.sh and call that from each jenkins.sh after
the tests are done.

The 'rm -rf' is already done before a test starts. No need to do that again
after each test.

Change-Id: I5d8472ec36b07c828685b1bd7718e31392d168a3
2018-04-24 13:46:05 +00:00
Harald Welte 588da83011 bsc + msc: Add missing BSSAP_Configuration.transport field
After merging Change-Id: Ie844c4de62e0ef5d5c4c366185968211a7f6d676
in osmo-ttcn3-hacks, the module parameters for BSSAP configuration
require one extra argument.

Change-Id: I2a0011bc6f7bdf013005d1ea36da591673344eed
Related: OS#2544
2018-04-18 15:40:33 +02:00
Harald Welte 67c306a8df ttcn3-*-test: Remove cherry-pick of CCM related HACK
This is no longer needed as the fix for https://osmocom.org/issues/2718
has been merged to master of osmo-ttcn3-hacks

Change-Id: Ia0c1c134405fdbce1c65059d705827f1a643e774
Related: OS#2718
2018-04-17 21:58:08 +02:00
Neels Hofmeyr 2d734900d8 ttcn3-bsc-test: bsc cfg: fix ARFCN-BSIC collisions
All three BTS are configured for ARFCN 871 and BSIC 63, which causes trouble
for handover tests. Set BSICs to 10, 11 and 12 (not 0,1,2 to mark the
distinction from the cell_identity).

It wasn't a problem so far since we cheated by passing the BTS target number
from VTY. But as soon as we will start identifying handover target cells by
ARFCN+BSIC exclusively, TC_ho_int would fall on its face without this patch.

See also: osmo-ttcn3-hacks I2ea8889ea40953f5a23eab40db52585556a410bc
Change-Id: I29a117aa54aa06ca49646f25a08af8521832fd8d
2018-04-11 01:24:05 +02:00
Neels Hofmeyr 1b51ff89c5 osmo-bsc.cfg: drop legacy config: timeout-ping, timeout-pong
Change-Id: I70bffa7ed96da099993ba0cedc50178ca9e00db4
2018-04-05 00:54:18 +02:00
Harald Welte b369792722 ttcn3-bsc-test: Fix config file syntax
In osmo-ttcn3-hacks Change-Id I52a4c8118828c1605cf672889982f987568ad17d
we introduced changes to the BSSAP_Adapter, but the config file for
the BSC hasn't been updated accordingly here.

Change-Id: I7cfc6414c1a783bab54f0d82589de82af4764daa
2018-03-29 14:35:35 +00:00
Philipp Maier 41962f7bf5 ttcn3-bscc-test/osmo-bsc.cfg: Add TCH/H channels
The configuration of osmo-bsc currently only supports halfrate
traffic channels. In order to test assignments which contain
half rate codecs we also have to have halfrate channels available.

Change-Id: Ibcce03ab0c98545a1f316d88e1f3dd75e2ff65e1
Related: OS#3100
Related: OS#3095
2018-03-27 13:35:29 +02:00
Harald Welte 6f786a7383 ttcn3-bsc-test: Enable all codecs on all BTSs
We now have TC_assignment_codec_ tests which assume that those
codecs are available.

Change-Id: I0ff19a4bc9bba5ff2de3b5d4c399b483e8ca097b
2018-03-22 18:30:08 +01:00
Neels Hofmeyr 116e442b2a fix ttcn3-bsc-test: BSC_Tests.cfg: set mp_test_ip
Allow the osmo-bsc-main docker container to reach the virtual MGW set up by the
ttcn3-bsc-tests.

The module parameter mp_test_ip sets the IP address at which the virtual
services are set up to listen for connections -- currently actually only the
virtual MGW. Set this to 172.18.2.203 instead of using the default 127.0.0.1.

This fixes the second half of the disconnect between BSC and virtual MGW in
this docker setup. The first half is Ib53f000ec7e717b14a3e5df6e803d3d0950b937f

Change-Id: I3038481ed0bba1084b63dc6a6d2ff6e970100890
2018-03-20 16:58:06 +01:00
Neels Hofmeyr 2f5a5b689c fix ttcn3-bsc-test: osmo-bsc.cfg: add mgw IP
The osmo-bsc-main docker container is run in a separate docker container and
cannot reach the virtual MGW set up by the ttcn3-bsc-tests.

From ttcn3-bsc-tests/jenkins.sh it is clear that the tests are run at IP
172.18.2.203. Add this as the 'mgw remote-ip' setting in
ttcn3-bsc-tests/osmo-bsc.cfg.

This fixes the first half of the disconnect between BSC and virtual MGW in this
docker setup. The second half is I3038481ed0bba1084b63dc6a6d2ff6e970100890.

Change-Id: Ib53f000ec7e717b14a3e5df6e803d3d0950b937f
2018-03-20 00:42:45 +01:00
Harald Welte 32f13b23af ttcn3-bsc-test: Fix location of respawn.sh script 2018-03-19 07:47:10 +00:00
Harald Welte 2f5541b134 ttcn*test: use log_merge.sh to generate per-testcase merged logs 2018-03-18 13:33:39 +00:00
Harald Welte c99a78fc9e remove osmo-bts-omldummy container, it's now part of osmo-bts-master 2018-03-17 15:41:43 +00:00
Harald Welte f08dadbf5f Add *.control to the [EXECUTE] statement of all ttcn3 test suites
In osmo-ttcn3-hacks, we have removed the *.control from the *.default
files, so let's add it here in the config files.  You can now change
the tests to be executed by simply editing the config here.
2018-03-13 13:26:51 +00:00
Neels Hofmeyr e707891fa8 fix osmo-bsc.cfg: drop no longer supported options 2018-02-23 15:09:29 +01:00
Philipp Maier 7453361fd0 ttcn3-bsc-test: enable A51 and A53 encryption
the BSC configuration currently only offers A50 (no) encryption.
Since the TTCN3 tests also cover assignment tests with encryption
and osmo-bsc now supports multiple cipher settings at a time this
setting should be extended accordingly.

- Also enable A51 and A53 encryption.
2018-02-19 22:16:12 +01:00
Pau Espin 56276f95fd jenkins.sh: Fix trailing whitespace 2018-02-19 12:03:39 +01:00
Pau Espin 51deedd956 *-test: jenkins.sh: Print junit output at the end 2018-02-19 11:59:00 +01:00
Harald Welte 10305f2f8f ttcn3: Add OSMO_TTCN3_BRANCH build-time argument to build non-master branches 2018-02-14 21:57:39 +01:00
Harald Welte c1694826e4 Use new split config file + tcpdump support of osmo-ttcn3-hacks
This uses osmo-ttcn3-hacks Change-Id
I3db452e24e5238aa05254d903739c64d202e61db, which introduces
some shared/common config file as well as per-testcase pcap file
generation.
2018-02-14 19:06:46 +00:00
Harald Welte 5a76f11320 ttcn3-bsc-test: Fix log file name (osmo-bsc.log, not osmo-msc.log) 2018-02-14 09:06:03 +00:00
Harald Welte 675c76cfd5 ttcn3-bsc-test: Update config with recent changes (VTY, moduleparm change) 2018-02-14 09:05:35 +00:00
Harald Welte d770629280 jenkins: Add shared jenkins-common.sh
the common script contains some copy+pasted parts between the different
jobs.
2018-02-06 20:20:49 +00:00
Harald Welte bcc29baf39 jenkins: prefix all container names with $BUILD_TAG
... to make them unique and to allow for multiple tests run in parallel
without any clashes.
2018-02-06 19:57:24 +00:00
Harald Welte 9efd75aa44 bsc-test: omldummy now has an argument for number of TRX 2018-02-06 20:30:08 +01:00
Harald Welte 6e61e5a319 bsc/msc test: Make sure we create text log files
as we don't capture stderr on all *but* the tester container, let's
make sure we write log files from the BSC/MSC/STP containers
2018-02-06 20:22:39 +01:00
Harald Welte facbb6575e 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.
2018-02-06 19:08:45 +01:00
Harald Welte f83fe4c7cb ttcn3-bsc-test: Add missing 'git fetch' 2018-01-27 20:25:10 +01:00
Harald Welte 1ab46eadc8 osmo-bsc-tests: Remove obsolete VTY config statements 2017-12-20 02:35:29 +00:00
Harald Welte 084967574e add ttcn3-bsc-test container with osmo-bsc test suite 2017-12-17 17:21:04 +01:00