Commit Graph

881 Commits

Author SHA1 Message Date
Daniel Willmann 9da8d6c2b1 WIP test for ClrCmd race condition
Change-Id: I212b53917a4489f651d2a1183565c0d0b466b7df
2018-05-17 13:32:36 +02:00
Daniel Willmann 898a7e06cc MSC_Tests: Extend timeout waiting for Clear Cmd in TC_establish_and_nothing
This should fix the bogus failures we are seeing in this test. The pcap
usually shows that the Clear Command does arrive after about 5 seconds,
but sometimes the internal timer fires before that. Double the timeout
of the test here.

Change-Id: I998cfb52a3813dd9f76d3787e4d0d448752ec847
2018-05-17 12:16:16 +02:00
Philipp Maier defd948e0f MSC_Tests: fix iterator in f_init()
With f_init(), the user has the option to specifiy how many bsc
instances should be created. A for loop then iterates over the
prepared configurations and calls f_bssap_init(). The first
parameter g_bssap is tied to index 0 constantly but should be
tied to the iterator i.

- use i instad of 0 as iterator for g_bssap

Change-Id: I490bab70224d236ab576a2ea3863f6d0afd5f22a
2018-05-16 17:55:33 +02:00
Alexander Couzens d1f4095df8 ttcn3-tcpdump-start.sh: reduce snaplen of tcpdump
Improve speed of tcpdump startup. -s 0 sets the snaplen is 256k.
tcpdump will request the snaplen multiplied by the buffer as
a contigous buffer in the kernel. This could lead to higher
start time.

Change-Id: I8a372e71798b366faa3b723573c60de6e8fd128f
2018-05-15 20:54:54 +00:00
Alexander Couzens 5844d5b2ec sgsn: fix a typo in comment
Change-Id: I061aba5af1e466b33472c9f829b982823bcff71e
2018-05-15 20:54:37 +00:00
Alexander Couzens 80ec1ea42d sgsn: fix RAU_ATTACH not to interact with following testes
TC_attach_rau will interact with the following tests, because the sgsn
is continuing sending RAU_ACCEPTs until it timed out or received a
RAU COMPLETE

Change-Id: Idac92bd61ee7145b7542e60c24e0a66b4ff7ddd4
2018-05-15 18:59:14 +02:00
Neels Hofmeyr 4fefb305ed expected results: pass BTS_Test.TC_rll_rel_req
Change-Id: Ic436e89c4333b49f39e1e9c387a5a9c79abdba15
2018-05-14 14:20:09 +02:00
Harald Welte 8e8cd67b81 update expected results
Change-Id: I65f72e9a8a9031a9715c7c2237824a45d7d8bef1
2018-05-10 23:11:54 +02:00
Harald Welte b7b9c543f6 bsc: Update expected-results.xml with 3 new ciphering related tests
Change-Id: I2465016a7f355a657187d39c90992ade1afe584f
2018-05-10 23:04:00 +02:00
Harald Welte 3c86ea036d bsc: New test cases for encryption without assignment
The existing encryption related test cases are all testing a case
involving the assignment procedure.

This patch adds some new testcases that test encryption without
any assignment, like e.g. in a typical LU.

Change-Id: I443cd8127e76f70fcaa7bf1638c2219524fa9381
Closes: OS#3183
2018-05-10 22:28:05 +02:00
Harald Welte 7a14fd5c43 bsc: f_establish_fully(): Support non-assignment cases
If it's a pure signalling procedure (like LU), the MSC will never
even send a BSSMAP ASSIGNMENT CMD.  Our test suite should be able
to produce this kind of behavior by passing "omit" as assignment
comamnd to the f_establish_fully() function.

Change-Id: I9bb5c8c19518905cf1ce121aa0b433886ec594d5
2018-05-10 22:26:55 +02:00
Harald Welte 8a9bf6f215 bsc: Verify correct encryption n RSL CHAN_ACT during assignment
Change-Id: Iff77586ea39da32df570048b1d83f5a0edb5a533
2018-05-10 22:00:49 +02:00
Harald Welte 651fcdc7c0 bsc: Unify encryption related test cases
Rather than having copy+pate code, parameterize it.

Change-Id: Ifc554245f80b09309f2da60c9d17c289c331b22e
2018-05-10 21:35:01 +02:00
Harald Welte 8863fa1152 bsc: Avoid having to pass testcasename() to f_start_handler
Change-Id: If9a02bb192b224e5225a4a2f0e66b1f0254b0d46
2018-05-10 20:15:27 +02:00
Harald Welte bc6199ff49 bts: Fix TC_rll_rel_req()
The test case was broken (c/r bit), the BTS operated correctly.

Change-Id: I07285aa715fa218c62b9fd2d81c88e73a4117f08
2018-05-10 19:38:18 +02:00
Harald Welte e613f96593 bts: ciphering tests
Change-Id: If450e36cfd8cde713f304e57ec09bc1239bdf7ea
2018-05-10 18:36:59 +02:00
Harald Welte 1bbe0b733d LAPDm_Types: Fix encoding of S+I frames
For some reason, the "FIELDORDER(lsb)" only worked for U-frames,
but not for S- and I-frames.  Probably a TITAN bug, but rather than
debugging that now, let's rewrite the LAPDm types as "FIELDORDER(msb)"
as that appears to work.

Change-Id: Id90ff80576fd8007def4d8d027b481eef693ddc0
2018-05-10 18:35:34 +02:00
Harald Welte 7aacbbf1e5 bts (RLL): DCCH/SAPI0 LAPDm without contention resolution is legal
The diffrence is whether we establish the LAPDm link
* after RACH + IMM.ASS (we must include L3 payload for contention
  resolution required)
* after assignment from one channel to another (we must not include L3
  payload, i.e. no contention resolution)

Change-Id: Ib67763856ffc5f5fd04a87f4192705777931c400
Related: OS#3252
2018-05-09 16:58:40 +02:00
Neels Hofmeyr df936a2192 bts: fix TC_dyn_osmo_pdch_double_act
Do not expect success on second activation.

Change-Id: I6b1ef158e1fdb32b392aa15bff71d0fe30ce6f1f
2018-05-09 12:50:17 +00:00
Neels Hofmeyr 9c50ca5488 bts: fix TC_dyn_osmo_pdch_unsol_deact
TC_dyn_osmo_pdch_unsol_deact sends a release request on an already released
lchan, which obviously would never trigger a change in the PCU configuration
and hence it makes no sense to expect a PCU info ind to be sent.

Instead of f_dyn_osmo_pdch_deact(), which expects a PCU info_ind, just send a
CHAN_REL and expect a trivial REL_ACK.

Drop some unused local vars.

Change-Id: I6b790e866ce4e66d9385b286b727ae41a83d3e67
2018-05-09 12:50:17 +00:00
Neels Hofmeyr 29402a1efd add bts/expected-results.xml
Change-Id: I677b65cbfd5762ff016b188a0f18ce1e5710f45d
2018-05-09 12:50:17 +00:00
Harald Welte 0ea2d5efb4 bsc: Add TODO notes about extensions of PDCH tests
Change-Id: I3c0d338a9b8affe7f77c1b0b392999b5af668c71
2018-05-09 12:22:39 +02:00
Harald Welte 0472ab4415 bts: Add RLL tests
This adds a series of test cases to BTS_Tests.ttcn implementing testing
of the RLL sub-layr of RSL, i.e. the translation between LAPDm frames
on the Um interface and the RLL frames on the Abis side (and vice vrsa).

Related: OS#3174
Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
2018-05-09 08:54:53 +02:00
Alexander Couzens 187ad5da87 sgsn: add test for attach_second_attempt
Do an attach direct after an attach succeeded.
Relates: OS#2958

Change-Id: I767c3e3b0af6e7c6a1f9436fd17e2f515b0bbd05
2018-05-03 04:25:10 +02:00
Alexander Couzens 8f0fb009b7 sgsn: fix typo in comment of BSSGP_ConnHdlrPars:imsi
Change-Id: I544a626d914075c0fcf13017553017b898525e8c
2018-05-03 04:25:08 +02:00
Neels Hofmeyr de17222ead update expected results
bsc:
  TC_assignment_sign fails with different message

msc
 fixed:
  TC_lu_clear_request
  TC_emerg_call_imei_reject
  TC_cm_serv_req_vgcs_reject
  TC_cm_serv_req_vbs_reject
  TC_cm_serv_req_lcs_reject
  TC_cm_reest_req_reject
  TC_cl3_rnd_payload
  TC_lu_and_mt_sms
 new:
  TC_smpp_mo_sms
  TC_smpp_mt_sms

sgsn fixed:
  TC_attach_umts_aka_gsm_sres

Change-Id: Ie9ef25fb2081ebab7a2b08c06307fa391f8f747a
2018-05-02 12:03:52 +02:00
Neels Hofmeyr 0ecb2e3516 sgsn: test umts aka with gsm sres response
Add ability to test UMTS AKA, by f_gmm_attach() with flags to select UMTS AKA
and to respond to it with GSM AKA SRES.

Add TC_attach_umts_aka_umts_res and TC_attach_umts_aka_gsm_sres.

Change existing TC_attach_* to also call f_gmm_attach(). (Actually,
f_gmm_attach() is almost exactly the previous TC_attach function body.)

osmo-sgsn change I36807bad3bc55c0030d4f09cb2c369714f24bec7 will implement
proper handling of GSM AKA response and make TC_attach_umts_aka_gsm_sres pass.

Related: OS#3193 OS#3224
Change-Id: I201ffeaee4439a413ab8289aceeccca9aba40a7a
2018-05-02 09:14:36 +00:00
Harald Welte d2394e9032 ggsn: Disable GTP-U tx sequence number by default
GTP-U transmit sequence numbers are entirely optional and probably
don't serve any real purpose in real-world deployments.

While OsmoGGSN in userspace implements support for it, the kernel GTP-U
implementation doesn't.  This means a number of tests fail against
kernel GTP-U only for that reason.

Let's switch all tests to disable GTP-U sequence numbers, and only
enable it in one specific test.  This way, we can execute the tests
also against kernel GTP-U.

Related: OS#3215
Change-Id: I666f5276749ef6a1a4dc170a3b9a747f626f6b2c
2018-04-26 09:09:32 +00:00
Harald Welte 3e0b039c56 ggsn: Fix typo: 'gptu' -> 'gtpu'
Change-Id: I1da2e0da6b94dc43c742ec551d3b5de100ce405f
2018-04-26 09:09:31 +00:00
Harald Welte efa7d919f5 RSL: Introduce template (value) annotations
Change-Id: I18828ccbc7d28dd190e745f020c724acdb0cdc8b
2018-04-18 23:23:22 +02:00
Harald Welte d879bd9aa0 LAPDm: Re-structure: Merge Frame type A+B which are really the same
A is B with zero-length payload.  No need to separate them.

Change-Id: I7b3079899f42a61d67be03e3a17346af80d7b3be
2018-04-18 23:23:22 +02:00
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