Commit Graph

4250 Commits

Author SHA1 Message Date
Harald Welte 2d86affc8c IPA: Fix wrong CCM ID_ACK logic; disable CCM on CTRL interface
Our TTCN3 implementation of the IPA multiplex with CCM handshaking
has been based on some wrong assumptions about the protocol logic.

To make the code stricter, we
* send an ID_ACK immediately after connecting TCP in a client
* separate client and server CCM responder logic
* always respond with ID_ACK to ID_RESP (we accept any identity)

Also, as the Osmocom CTRL interface uses an IPA multiplex but no CCM,
we introduce a boolean variable (and function argument) to clearly
enable/disable CCM support in a given IPA_Emulation component.  The
CTRL_Adapter has been modified to use this flag to disable CCM.

This also removes the need of cherry-picking
	"HACK: Work around IPA CCM bug in OsmoBSC"
	Change-Id: I304535d28a165f76a0a140dc0a15dd81a9db28c8
from the laforge/bsc-workaround branch.

Change-Id: I6d9eaf0d69457caacc03b9049a8bc57976480617
2018-04-17 19:52:30 +00:00
Harald Welte 7ef51aa2a2 BSSAP_Adapter: Introduce transport over IPA/SCCPlite
In addition to the existing 3GPP AoIP stacking, allow BSSAP to
run on top of a SCCPlite stacking.  Implement both the server and the
client role for IPA.

Related: OS#2544
Change-Id: Ie844c4de62e0ef5d5c4c366185968211a7f6d676
2018-04-17 21:49:05 +02:00
Philipp Maier 6a50c7cae0 BSC_Tests: Assign g_pars in TC_assignment_sign
The testcase TC_assignment_sign does not assign g_pars in its
test function. However, it assigns local variable pars but then
never uses it.

- remove local variable pars and assign g_pars instead

Change-Id: Iad65d8ff8bfb98df2b212c69916f1e74dc2c61af
Related: OS#2762
2018-04-16 20:39:43 +00:00
Harald Welte 36296dcc37 deps: Switch titan.ProtocolModules.SMPP back to upstream TITAN
Our patch for SMPP AlertNotification was merged, so we can switch
back to use upstream instead of our osmocom fork.

Change-Id: Ib171451af264aa675b173b5cad37f08bcd64fbc3
2018-04-16 17:37:31 +02:00
Harald Welte 0803cde5e8 bts: Reduce threshold for BTS_Tests.TC_paging_tmsi_200percent
for some reason, the number of TMSI paging requests that arrive
on the jenkins build slave is quite a bit lower than those I see
on my laptop.  Let's adjust our expectations to make the test pass.

Change-Id: I548dedd1b3391d059a141a2eef71c32be4b97cc1
Closes: OS#3025
2018-04-15 21:36:54 +02:00
Harald Welte 5618c2a7e4 bts: Fix SI13 related scheduling tests
Closes: OS#3027
Change-Id: I9363763035007bd11877b867fe360c3614e4c7ce
2018-04-15 16:24:59 +02:00
Harald Welte 80f7687f18 RSL_Emulation: Less verbose logging
Don't use explicit log() statements for normal message forwarding
between ports.  This will be visible in the automatically-generated log
statements anyway...

Change-Id: Idcfb1897dd00df1839cf1a0182a5a030bf71c0cb
2018-04-15 11:21:55 +02:00
Harald Welte f56cc49d75 L1CTL: Correctly parse L1CTL messages with zero-length payload
Some messages can happen with zero-length payload section,
e.g. a DL_DATA_IND with CRC errors.

Change-Id: Ice1d872c12fb33bc4e2d285870fdb877f6efe355
2018-04-15 10:59:30 +02:00
Harald Welte a28dce1021 deps: Use upstream titan.TestPorts.UNIX_DOMAIN_SOCKETasp again
Our patch has been merged upstream, there's no need for using our
forked repository anymore.

Change-Id: Ibfbc5d1457181fd6c893993e4a34fdb2fb3baa92
2018-04-14 22:04:05 +02:00
Harald Welte f640a01311 msc: Add SMPP tests for MO + MT SMS
Change-Id: I5349559c7c3096533fb07fcf53f0a44ff7f6567f
2018-04-14 21:58:16 +02:00
Harald Welte 32ff8b90f4 msc: Add SMPP_Emulation + SMPP_Templates
Change-Id: I80efe16f603227694c6242d556ae77590271e4c6
2018-04-14 21:58:16 +02:00
Harald Welte 384f4fee23 msc: Add SMPP_CodecPort
Change-Id: I57640ccc5370d6820bc303003e162f27ddc9fcfd
2018-04-14 21:58:16 +02:00
Harald Welte 72199a8be9 deps: Use SMPP from osmocom fork
the osmocom fork has support for AlertNotification, which upstream
doesn't.  Pull request is pending, so we have to use our osmocom
fork repo meanwhile.

Change-Id: I9b6b120fe74b46183517264d85651ac0d99b4035
2018-04-14 21:58:16 +02:00
Harald Welte b2609faea4 msc: Fix console log levels
In Change-Id I52a4c8118828c1605cf672889982f987568ad17d we introduced
a name change for the SCCP/M3UA components, which meant that the log
level configuration did no longer apply as intended.

Change-Id: Iebdaf3446a81ea5f8310110f5cca2bdb3e552e3f
2018-04-14 21:58:16 +02:00
Harald Welte e008eeaf6d msc: Fix ti_flag mistake in f_mt_sms()
The L3 transaction-id in MT-SMS is allocated in the MSC, so any
messages we expect from the MSC must carry c_TIF_ORIG.

Change-Id: I6ea977a7662fdfc9c504f13ac5632ac20a04f522
2018-04-14 21:08:01 +02:00
Neels Hofmeyr 98d428da11 bsc, msc: update expected results
Mark TC_paging_imsi_a_reset fixed.

Add various new tests.

Change-Id: Ib3a36efeb086fd995d7dad4e040f5a46b1b1ca0a
2018-04-11 19:49:36 +02:00
Neels Hofmeyr f77740b12a add update_expected_results_from_jenkins.sh
Change-Id: Ib3ad8554fc59112c11325425ccd70ca1dbd8c123
2018-04-11 19:49:36 +02:00
Neels Hofmeyr fc0384a046 mask timestamps and source file nrs in expected-results.xml files
Prepare for upcoming updates with concise diffs.

Change-Id: Ic9f006aa8db1b477598605e0525faeb229b03641
2018-04-11 19:32:01 +02:00
Neels Hofmeyr 567d20517a add mask_expected_results.sh
Provide a script to mask timestamps and source file lines in expected results
files: when updating expected changes, it is useful to see the exact semantic
changes, not the timestamp and source file line changes in the git diff.

Change-Id: I785e126b1f5afddd1b722bc5e922ed90970efa8a
2018-04-11 19:32:01 +02:00
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