Commit Graph

881 Commits

Author SHA1 Message Date
Neels Hofmeyr 1fd6679d9d fix build: don't clean out expected-results.log: rename to *.xml
'make clean' as generated by ttcn3_makefilegen removes all *.log files, which
of course cleans out expected-results.log, which should not happen. Since this
is a junit XML file, rename the suffix to .xml.

Change-Id: Ic334f6b758eef865e3a497aa430691a3ae696d25
2018-04-11 19:29:18 +02:00
Philipp Maier c6e06f76ae MSC_Tests: fix TC_mo_crcx_ran_reject
The testcase intentionally responds to the RAN sided CRCX
with a garbeled message to cause the MGCP handlin inside
the MSC to fail. The MSC is then expected not to perform
further MGCP operations since it did not get a proper
response to the first CRCX, so the specific endpoint name
is not known, eventually preventing from doing an MDCX.

However, the testcase responds to incoming DLCX commands,
instead setting the verdict to fail.

Also the altstep that dispatches the message after the
errornous MGCP response unconditionally catches all BSSAP
messages before entering the sub-altstep
as_clear_cmd_compl_disc() that handles the clearing of
the connection. Eventually the clear command is never
received in this sub-altstep.

- Make sure the verdict is set to fail when an MGCP
  message is received after the errornous response to
  the CRCX.

- Remove the unconditional BSSAP.receive in order to
  be able to dispatch the clear command properly

- Update the expected-results.log file

Change-Id: I806491741d310e4410f6cb4ce0309235e9bf4300
Related: OS#2882
2018-04-11 16:50:59 +00:00
Neels Hofmeyr 9f23091dab 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: docker-playground I29a117aa54aa06ca49646f25a08af8521832fd8d
Change-Id: I2ea8889ea40953f5a23eab40db52585556a410bc
2018-04-11 01:24:48 +02:00
Harald Welte f45efeb15e msc: Initial SMS testing (MO + MT SMS, successful case, no SMPP)
Change-Id: I707330454ffab87daebf22ba83e6ba2873996424
2018-04-09 22:53:49 +02:00
Harald Welte b9e86fa815 msc: generate mobile identity inside f_establish_fully()
This reduces the code duplication in every caller of the function.

Change-Id: Iaa071b131a8ff372d70677c8622d227f88e9ea53
2018-04-09 18:19:36 +00:00
Harald Welte 51affb6e03 L3_Templates: Introudce constants for tiFlag
... this makes the code more readable/understandable.

Change-Id: Ic06eb2016eb9979b8556366e4a909f3c0336aa92
2018-04-09 18:19:36 +00:00
Stefan Sperling afab3e5a45 update expected HLR test results to prevent unexpected 'pass'
With https://gerrit.osmocom.org/#/c/7685/ the test TC_vty_msisdn_isd
is now passing. Update expected log output accordingly.

Change-Id: Ie8cfbef5a0adcb927917b0623f89309479a60001
Depends: Iffe1d7afb9fc7dbae542f70bbf5391ddc08a14b4
Related: OS#2785
2018-04-09 17:41:20 +00:00
Stefan Sperling 7c09687456 improve failure diagnostics in TC_vty_msisdn_isd HLR test
Check for reception of an Insert Subscriber Data with outdated MSISDN.
This happened to me while working on a fix for issue OS#2785, and it
seems to be an easy mistake implementations can make. Catch this
situation in the test and log an explicit message about the problem.

Related: OS#2785
Change-Id: Ib0809617cca621cc22f29b078828057fd49f27e5
2018-04-09 11:33:21 +02:00
Harald Welte 94e0c3428e bsc: Testing of dynamic PDCH (both IPA style and Osmocom style)
This adds a set of four new testcases relted to dynamic PDCH switching:
One successful and one unsuccessful for each Osmo + IPA style dynamic
PDCH.

Closes: OS#3099
Change-Id: I7a7a937548a35461d86e93ead79c39a37a59563e
2018-04-07 19:28:01 +02:00
Stefan Sperling 526895e7d4 support ccache to speed up ttcn3 test compilation
By default, if ccache is found in PATH when regen-makefile.sh runs,
use cached compiled C++ object files during the build (or populate
the cache in case an object is not cached yet). Objects are cached
in ccache's default cache directory (~/.ccache) unless overriden by
the CCACHE_DIR environment variable.

The USE_CCACHE environment variable overrides auto-detection
in regen-makefile.sh and disables (USE_CCACHE=0) or enables
(USE_CCACHE=1) use of ccache.

Rebuilding the test suite from scratch with a populated cache
is an order of magnitude faster than doing an initial build.
ccache only speeds up C++ (.cc) to object file (.o) compilation.
Linking object (.o) files into shared object (.so) files is still
performed by the real compiler during every build.

Change-Id: Ibb538f602206535c06980f88191c1dabe3c4cd82
2018-04-06 16:58:46 +00:00
Stefan Sperling c479e4fa3b test GGSN support for optional GTP-U sequence numbers
Add VTY functionality to GGSN tests, and use the VTY to enable/disable
GTP-U Tx sequence numbers in the running osmo-ggsn.

The GTPU packet template now makes sequence numbers optional.
A template created with its sequence number set to 'omit' will result in
a packet without a sequence number, i.e. the 'sequence number present' bit
in the packet header is cleared, and the sequence number field is omitted
from the encoded GTPU T-PDU packet.

Re-use the existing TC_pdp4_clients_interact() test for testing the
behaviour of osmo-ggsn. This test is now run twice, once with and
once without GTP-U Tx sequence numbers. Verify that packets relayed by
osmo-ggsn match its "g-pdu tx-sequence-numbers" configuration setting.

Change-Id: I1dc299407c61b1c865035add44067b8ab89001b3
Related: OS#2519
2018-04-06 12:43:25 +00:00
Harald Welte 0a068c3a8c deps: Update titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit
The osmocom fork of the titan.TestPorts.UNIX_DOMAIN_SOCKETasp master
branch has been force-pushed in order to incorporate patch review
comments from upstream TITAN.

Change-Id: I23ec12fa5fb30796f37257cf5ea3fcd74d3ecb80
2018-04-06 13:52:35 +02:00
Neels Hofmeyr 2b326fa81d fix MSC.TC_lu_clear_request: allow LU Reject, forbid 2nd Clear Cmd
When the MS sends a Clear Request in the middle of a Location Updating, it
should be permitted for the MSC to send a Location Updating Reject back. Extend
with an alt that also allows a LU reject before the Clear Command.

The test explicitly hints at https://osmocom.org/issues/2862 which rightfully
forbids the MSC to send a second Clear Command after the first is completed.
However, this test so far explicitly permits a second Clear Command, so it was
probably passing in error all the time. Set verdict to failure if a second
Clear Command is received before the DISC_IND.

This changes the test verdict to failure with current osmo-msc master,
rightfully so; the failure will be fixed by the upcoming MSC subscr conn FSM
refactoring.

Change-Id: I7bc5555b829d61b0a2529107bc9b58446865545d
2018-04-06 01:17:52 +02:00
Neels Hofmeyr 3cf797d7a5 add compare-results.sh, call from start-testsuite.sh
Compare current test results to the expected results, and exit in error on
discrepancies.

Add compare-result.sh: (trivially) grep junit xml output to determine which
tests passed and which didn't, and compare against an expected-result.log,
another junit file from a previous run. Summarize and determine success.

Include an "xfail" feature: tests that are expected to fail are marked as
"xfail", unexpected failures as "FAIL".

In various subdirs, copy the current jenkins jobs' junit xml outputs as
expected-results.log, so that we will start getting useful output in both
jenkins runs and manual local runs.

In start-testsuite.sh, after running the tests, invoke the results comparison.

Due to the single-line parsing nature, the script so far does not distinguish
between error and failure. I doubt that we actually need to do that though.

Related: OS#3136
Change-Id: I87d62a8be73d73a5eeff61a842e7c27a0066079d
2018-04-06 01:07:15 +02:00
Neels Hofmeyr def4ad4bce gitignore vim swp files
Change-Id: I2d60ad2365c7fd82210ee1dac96fabab19617280
2018-04-05 20:15:43 +00:00
Harald Welte 9bbbfb5466 bts: Add first tests about IPA style dynamic PDCH
Change-Id: I56d8b0284e8e4eee4ce6454f7a495ee09c40fe42
2018-04-05 17:25:25 +02:00
Harald Welte ee19c73d81 RSL_Types: Fix msg_disc of IPA PDCH ACT/DEACT + inverse templates
The MDISC_IPACCESS is only used for the media (CRCX/MDCX/DLCX) related
commands, not for the PDCH activation/deactivation.  The latter uses
normal MDISC_DCHAN.

Also, add the inverse templates for PDCH actiation/deactivation, so we
now have both receive and transmit template for each of the 6 related
messages (activation, deactivation, plus each their ACK + NACK).

Change-Id: I170a90391859d71e1f96a72205487cccba5b6ae7
2018-04-05 09:35:01 +02:00
Harald Welte 3d04ae6c55 bts: Add first five dynamic PDCH tests
NOTE: This needs changes to your osmo-bsc.cfg, as it will now need
an osmocom-style dyn PDCH on TS4, and an IPA-style dny PDCH on TS3.

--- a/ttcn3-bts-test/osmo-bsc.cfg
+++ b/ttcn3-bts-test/osmo-bsc.cfg
@@ -154,10 +154,10 @@ network
     phys_chan_config TCH/F
     hopping enabled 0
    timeslot 3
-    phys_chan_config TCH/F
+    phys_chan_config TCH/F_PDCH
     hopping enabled 0
    timeslot 4
-    phys_chan_config TCH/F
+    phys_chan_config TCH/F_TCH/H_PDCH
     hopping enabled 0
    timeslot 5
     phys_chan_config TCH/H

Corresponding change in docker-playground.git has Change-Id
I229000ce7609845fdf24cafe1f5ec2bfa3f507e8

Change-Id: I2a42531dc5555ab4772d538fda462343605b8feb
2018-04-05 09:34:53 +02:00
Harald Welte f26de0b65a BTS_Tests: Prepare for ConnHdlr with PCU socket access
For upcoming dynamic PDCH activation/deactivation tests we would
like to access the PCU socket from ConnHdlr, rather than test_CT.

Let's prepare for that.

Change-Id: Ib8811dd87f737f326f7ed8f652aa6f552c3f05f8
2018-04-04 20:28:05 +02:00
Harald Welte f148659ba2 PCUIF_Types: Fix bit-order of pdch_mask
The bit-string type should be indexed by timeslot number, i.e. the first
element [0] should equal timeslot 0, the last one TS7

Change-Id: Ib89689abd998d4940895ba04f49eb140888bc73f
2018-04-04 19:26:41 +02:00
Stefan Sperling cb782b99ff document the purpose of IP addresses used by GGSN tests
The purpose of the various IP addresses used by our GGSN tests is not
immediately clear. Add documentation based on the current status quo.

Change-Id: I079efcff3dab09d71330625f5b661cd81e42bf38
2018-04-04 08:07:25 +00:00
Neels Hofmeyr 6a84b23f25 bts: enable CTRL interface tests
Start and stop the CTRL interface and provide CTRL bind interface config
modulepars.

Possibly everyones' local setups may need modification to allow the
ttcn3-bts-tests to reach osmo-bts-trx's CTRL port.

WARNING: This commit has to be merged "at the same time" as
I1ec86b157ebd46bf622a0ca51eba225f15c99fbb or the jenkins ttcn3-bts-tests will
fail.

a) if we want to set a modulepar mp_ctrl_ip here, it needs to be added to
osmo-ttcn3-hacks.

b) if we have the f_ipa_ctrl_start() in osmo-ttcn3-hacks, we need to configure
the proper IP and bind interface here, or all tests will fail because
f_ipa_ctrl_start() cannot connect.

Change-Id: I502b4891e6720ae2fb251c03542f707880a6f728
2018-04-03 19:30:55 +02:00
Harald Welte b1726c90dc bts: new f_rsl_transceive_ret(): like f_rsl_transceive() with return value
Change-Id: I0cdc6b87566b9d101ecb12a77eac18a50689e088
2018-04-02 18:19:05 +02:00
Harald Welte 98eb1bf6d2 RTP_Emulation: Fix RTCP handling
Change-Id: I58e1d993921fadc457d7cd0348d4c9c2171b5748
2018-04-02 18:19:05 +02:00
Harald Welte ea1a0aeda4 L1CTL_PortType: Remove some logging, make it less chatty
Change-Id: I9e9160f53480713c9551a185478a6b58fa02a709
2018-04-02 18:19:05 +02:00
Harald Welte 3c4cbf6dd6 L1CTL_Types: dl_info is part of TRAFFIC_CONF, not just TRAFFIC_IND
Change-Id: I575b981d6ea59702927bbb2a2ae24b2e8652cc5d
2018-04-02 13:18:23 +02:00
Stefan Sperling 6cd217e48b improve documentation of templates used in GGSN_Tests
Various improvements to the comments documenting packet templates
used in GGSN_Tests: fix IPv4 vs. IPv6 confusion, clearly indicate
whether templates are used for sending or for receiving/matching
packets, and add a missing comment.

Found while studying code to prepare for issue OS#2519.

Change-Id: I3bfc21a5ba74e0505457e4874f93501ad7c68b7b
Related: OS#2519
2018-04-01 08:42:01 +00:00
Harald Welte edc887435e mgw: Fix mixed-up MGW / local IP address
Change-Id: Ie4f6da896f53e9fabd7275fe6d8f8c6309e02d14
2018-03-29 18:01:51 +02:00
Harald Welte 935cb8f6ba mgw: Don't use RTP_Endpoint anymore. We use RTP_Emulation new.
Change-Id: I6302412daaafc37c8e7740cce4806405d3086fa7
2018-03-29 18:01:51 +02:00
Philipp Maier 38d6894cd6 BSC_Tests: Add missing routing context to modulepar
The BSSAP_Configuration leaves the rctx parameter unbound.

- Make sure that rctx is set to 0

Change-Id: If0f08665694be8eba817a4525686a9a37caf1dbb
2018-03-29 15:46:31 +02:00
Harald Welte 2043d68918 msc: Fix config file syntax.
In Change-Id: I52a4c8118828c1605cf672889982f987568ad17d we introduced
config file syntax errors.  It seems that change was not tested at all
before pushing :(

Change-Id: I80577798b502957afaa46abb510bcca3dc174ee4
2018-03-29 13:17:18 +02:00
Harald Welte bb7523b15b mgw: Add first tests for testing RTP streams
The existing MGW tests were entirely on the MGCP side.  Let's start
some tests that exchange RTP frames with the MGW and validate that
the MGW can actually act on what is configured via MGCP.

Change-Id: If620d5f8927d0e3584e90a7a8f785c6fdd7c2d17
2018-03-29 08:52:01 +02:00
Harald Welte 5c49ba4393 RTP_Emulation: Add f_rtpem_stats_compare() to match a pair of stats
Change-Id: I1682bc16a05f096976b7e68b6115850fc152f7aa
2018-03-29 08:51:20 +02:00
Harald Welte 1af4033a7b RTP_Emulation: Add convenience helper functions around procedure calls
Change-Id: I413aa2b86c2aebe8017112926fc88af0de4d43b7
2018-03-29 08:50:33 +02:00
Harald Welte 8d3ea0e3ec RTP_Emulation: Make it less chatty in the log
Change-Id: I8ff3ce27967d624cce5edc10655b1294d57ca3a3
2018-03-29 08:50:18 +02:00
Harald Welte 9774e7ab04 RTP_Emulation: Fix receive templates
The connection ID part of the template must be updated after we
created the respective sockets. It was done to early.

Change-Id: I37306d841df3d27d30fd89fb99c863370517e3ff
2018-03-29 08:49:38 +02:00
Harald Welte cb8b427db1 mgw: Add statistics to RTP_Emulation and link/build it in mgw test
We're not using it so far, this is left for follow-up patches.

Change-Id: I40c322374cd99adb75a0f09175023fc0b12291d2
2018-03-29 08:49:15 +02:00
Philipp Maier 34bd80eae7 BSSMAP_Templates: Add templates for HANDOVER REQUIRED
In order to form a minimal HANDOVER REQUIRED message additional
Templates (ts_) are needed.

- Add Template ts_BSSMAP_IE_SpeechVersion
- Add Template ts_BSSMAP_IE_CurrentChannelType1
- Add Template ts_BSSMAP_IE_OldToNewBSSInfo

Change-Id: I41c2a036465d422db9348d4d2d66bb332e16e155
Related: OS#1609
2018-03-28 12:34:54 +02:00
Philipp Maier 7593298b36 MSC_Tests: Add support for multiple BSC
The upcomming tests for inter-BSC handover make it necessary to
simulate multiple (two) BSCs to the MSC, while the current
Implementation can only handle one BSC instance at a time.

- Allow multiple BSC instances to be created
- Add a simple reset-test to test what happens when
  two BSC instances are started (BSSMAP reset from two
  different BSCs)

Change-Id: I52a4c8118828c1605cf672889982f987568ad17d
Related: OS#1609
2018-03-28 12:34:54 +02:00
Philipp Maier 0f4a0f941f Cosmetic: Update MSC_Tests.cfg
The MMSC_Tests.cfg config file lacks most of the test comments.

- make sure the control section of MSC_Tests.ttcn and MSC_Tests.cfg
  match up.

Change-Id: I89e6c65427a993261cab6a284e6cc3dbc5a5562f
2018-03-28 12:28:05 +02:00
Harald Welte b1add59560 deps/Makefile: Various updates
* SCCP changes were merged upstream, we don't need to use osmocom fork
* SCCP upstream now has proper tag based version
* M3UA now has a new version tag (with Routing Context)
* UNIX_DOMAIN_SOCKET has new verison tag (upstream requested changes)

Change-Id: I5526c1688d84cf985299baa973271a620b4b4544
2018-03-27 20:52:38 +02:00
Harald Welte 035f7f8af4 deps/Makefile: Add missing "git fetch" to /update and /clean targets
When the Makefile was modified to use a new tag/hash of a given
repo, the "make update" or "make clean" target will fail as the
new version/tag is not yet known to the local repo, only to the
remote (and hence we need a fetch).

Change-Id: I52c44c744674cd4dab0c85086d68bde6f9be1fca
2018-03-27 20:52:38 +02:00
Harald Welte 498634bfd3 deps: Switch to our own fork of the M3UA ProtocolEmulation
.. as we have some patches that are not yet in upstream

Change-Id: Ie8a9380ae8838c571fe3d0776f60485b34c85d4e
2018-03-27 19:21:55 +02:00
Philipp Maier cb6cc481d1 fix TCH/H for TC_chan_exhaustion
At the moment we use onle TCH/F and PDCH in our osmo-bsc config,
but the tests TC_assignment_codec_amr_h and TC_assignment_codec_h
requre a half rate channel in order to work. Configuring one TCH/F
to TCH/H seems not to hurt any tests except TC_chan_exhaustion

- also regard half rate channels in TC_chan_exhaustion
- change included sample osmo-bsc.cfg

Change-Id: Idd5a9602f1b49b5aa0fc510faa151fe16c0b404d
Related: OS#3100
2018-03-27 11:28:17 +00:00
Harald Welte 206587e073 Makefile: Add new 'sip' testsuite to list of testsuites
Change-Id: Ie7cc41a40fb8706e9b0752be6e7c1f34dc692d87
2018-03-26 23:36:22 +02:00
Harald Welte b0d9360aac More progress on osmo-sip-connector tests
Change-Id: I34a5d7929264c7f5f21d3868a5f919874ffa106c
2018-03-26 23:11:51 +02:00
Harald Welte 9093839329 MNCC_Types: More types for MNCC server (MSC) side emulation
Change-Id: I1dd1744da7da983412d5d34c40fd896bc7b896db
2018-03-26 23:07:24 +02:00
Harald Welte 055660098c MNCC_EncDec.cc: Fix decoding of speech versions in bearer capabilities
Change-Id: I4fd79ee769c967dc209a7e1859d9d8b18d09843e
2018-03-26 23:07:24 +02:00
Harald Welte 9edea88b80 MNCC_Emulation: Make ExpectedCreateCallback work for SETUP_REQ, too
In server mode, we need to handle SETUP_REQ in ExpectedCreateCallback,
not only SETUP_IND like in client mode.

Change-Id: I988668cac9970af12d59d05a3a9facca257851c6
2018-03-24 22:33:59 +01:00
Harald Welte 1450953d2e MNCC_Emulation: Send HELLO in "server" role
Change-Id: I6ef9697ff365bae9fbf7c5888fdb0b88e63b13bb
2018-03-24 22:33:59 +01:00