Commit Graph

1760 Commits

Author SHA1 Message Date
Harald Welte 94c88f4bd5 WIP: gen_links.sh + regen_makefile.sh for make SCCP_Tests
Change-Id: Ib6004d2b23c8207faac7f8b7bd07e84c404cd84d
2020-01-12 11:48:58 +01:00
Pau Espin 925818ac36 pcu: Check received IMSI suffix from PCUIF paging request
Change-Id: Ia11447fb71ea0b6a8fcce1a28e93cc166d22ef7a
2020-01-11 00:24:03 +00:00
Vadim Yanitskiy 1c9754dc0d MSC: add test cases for concurrent MO/MT SS/USSD transactions
Both test cases make use of the existing functions:

  - TC_multi_lu_and_mo_ussd: f_tc_lu_and_mo_ussd_single_request(),
  - TC_multi_lu_and_mt_ussd: f_tc_lu_and_mt_ussd_notification(),

starting several (*) BSC_ConnHdlr components in parallel.

(*) The maximum amount is limited by 16 - this is as much
    as both GSUP and SCTP emulation components can handle.

Change-Id: I2fb1c5d285163d5245d92fa24c197a5027ecbe6f
Related: OS#2931
2020-01-10 16:03:27 +00:00
Vadim Yanitskiy f3906e63f8 library/GSUP_Emulation.ttcn: extend size of GsupExpectTable
We already have 16 entries in the GsupImsiTable. Let's also extend
the GsupExpectTable, so we can have 16 components of type
BSC_ConnHdlr running in parallel.

Change-Id: Ibca0e9196c25ab00803041b81f7b490ba2f0a3ba
2020-01-10 16:03:27 +00:00
Vadim Yanitskiy ae74774138 MSC: f_ran_register_imsi(): allow passing omit as TMSI
Change-Id: I6dd2f77283a79e83f028115f4cc42f05db885838
2020-01-10 16:03:27 +00:00
Vadim Yanitskiy 70d15bf48f MSC/Iu: fix SS/USSD tests: pass g_pars.tmsi to f_ran_register_imsi()
Makes both TC_iu_proc_ss_abort and TC_iu_proc_ss_paging_fail pass.

Change-Id: If7d58cb50d2810975bd547e4e828783b0255d809
2020-01-10 16:03:27 +00:00
Alexander Couzens 752f86b8aa library/GSUP_Types: add support for OSMO_GSUP_NUM_VECTORS_REQ_IE
OSMO_GSUP_NUM_VECTORS_REQ_IE allows the GSUP client to ask
for a specific amount of auth tuples.

Change-Id: I1be95c6a06610744b81ba043d236fce108598b79
2020-01-10 16:01:19 +00:00
Pau Espin 8df1011e30 bsc: Fix typo in comment
Change-Id: Iafaf4c500f05a2c98e8b151bbae0c15370b3bf22
2020-01-09 18:21:53 +01:00
Vadim Yanitskiy 373b054d45 MSC/Iu: add missing SS/USSD test cases from MSC_Tests.ttcn
Change-Id: I99e888708ed1efeab12a4c88c734a78619a39888
2020-01-07 23:30:39 +01:00
Vadim Yanitskiy 2dd9661220 MSC/GSUP: make session ID for MT SS/USSD configurable
This would allow to run multiple SS/USSD transactions in parallel.

Change-Id: I326b5e47f4c1e9f9209efa64c143c3dc64132edb
2020-01-07 21:49:45 +01:00
Philipp Maier dd841d3a05 BTS_Tests: tolerate empty measurement result on chan est.
On channel establishment the first measurement result may lack the
measurement reports from the MS. This is normal behavior, so lets
tolerate that.

Change-Id: Ib2f511991349ab15e02db9c5e45f0df3645835a4
Related: OS#2975
2020-01-06 10:32:15 +00:00
Vadim Yanitskiy afb15a8424 MSC: fix SM-RP-OA (SMSC Address) expectations for MT SMS
Since [1] we started to match the SMSC Address in f_mt_sms_expect().
That change caused test case failures because OsmoMSC hard-codes
a different SMSC Address. Let's fix this.

[1] Ib467eeca6439bc6cce72293fbb5bb48f6d233db9

Change-Id: I3bdb6a74c8b02e4bf8dc88634e2380c924242b4b
2020-01-05 21:06:43 +01:00
Pau Espin 6f319f9794 ggsn: Drop unneeded m_ggsn_supports_echo_interval
Latest osmo-ggsn release is 1.5.0, so this param is not needed at all.

Change-Id: Ie1c3cde2a01e8ea49aadcb1f7384995cb68039cb
2020-01-05 11:21:07 +00:00
Pau Espin d19ba6dbbe mgw: Drop unneeded mp_enable_conn_timeout_test
Latest osmo-mgw release is 1.7.0, so this param is not needed at all.
Furthermore, the config can be moved to .cfg.

Change-Id: I537c0f5fd6f9e18e111c773c0e42e5f1120ce2f4
2020-01-05 11:21:07 +00:00
Vadim Yanitskiy eddebaad92 MSC_Tests.ttcn: introduce TC_mm_id_resp_no_identity
While investigating OS#4340, it was discovered that a malformed
MM Identity Request with MI Type '111'B crashes OsmoMSC.

Unfortunately, I could not find a way to encode such an invalid
message in TITAN (because value '111'B is reserved), so I
figured out that '000'B also crashes OsmoMSC.

MM Identity Request is triggered by initiating an Update Location
Request with reserved TMSI value 'FFFFFFFF'O (unknown to the MSC).

Change-Id: I62f23355eb91df2edf9dc837c928cb86b530b743
Related: OS#4340
2020-01-04 11:50:15 +00:00
Vadim Yanitskiy 322c79367b PCU: fix: actually match IMSI in Packet Paging Request
Change-Id: I0afdd53fd5d2a89e139f65a7aec412a2e12511cc
2020-01-03 22:20:50 +00:00
Vadim Yanitskiy 5e51873d9c library/RLCMAC_CSN1_Types.ttcn: fix ps / cs selection in PageInfo union
Change-Id: I40c2a3c38799a625836e4c28f476524c92077b83
2020-01-03 22:20:50 +00:00
Vadim Yanitskiy 04dd5f7aa0 MSC_Tests.ttcn: fix: verify the contents of SM-RP-DA/OA for MO/MT SMS
Change-Id: Ib467eeca6439bc6cce72293fbb5bb48f6d233db9
Related: OS#4324
2020-01-03 12:27:17 +00:00
Vadim Yanitskiy a52347ca32 library/GSUP_Types.ttcn: fix MSISDN / SMSC coding in SM-RP-OA/DA
Unlike IMSI, both MSISDN and SMSC address in SM-RP-OA/DA not only
contain the BCD encoded digits, but also a little header with
NPI (Numbering Plan Identification), ToN (Type of Number), and
Extension fields.

Change-Id: I3f55834489f3e613f541cf1e216027e8d48ccaf0
Related: OS#4324
2020-01-03 12:27:17 +00:00
Vadim Yanitskiy 437b5a6c7d MSC/BSC_ConnectionHandler: only keep SMSC address in SmsParametersRp
When sending MO or MT SMS, we never include both SM-RP-DA/OA IEs
at the same time. In case of MO SMS, SM-RP-OA is omitted, and in
case of MT SMS - SM-RP-DA is omitted.

Change-Id: Ia60bdd2498034b6b849f874cf1eee272abef2b47
2020-01-03 12:27:17 +00:00
Pau Espin d3d54a91fa msc: Introduce test TC_lu_imsi_timeout_tmsi_realloc
Related: OS#4336, OS#4337
Change-Id: I603b2b2b1ae7edd6360ea38c6bbbfedc46e9fa5d
2020-01-01 16:12:20 +00:00
Pau Espin 461ed61e4d GSM_RR_Types.ttcn: Support encoding of EGPRS Packet Uplink Assignment
Change-Id: Idf3bd12318480e8cdd26fce35e52d0a9e8c39608
2019-12-31 17:01:51 +00:00
Pau Espin 86904080a3 RLCMAC_CSN1_Types.ttcn: Support encoding of MS Radio Access Capability 2
Change-Id: Iac7d7b694bc44887443418f755e51d636abe8575
2019-12-31 16:35:29 +00:00
Pau Espin 4536c82b99 pcu: Move NS tests to PCU_Tests_RAW_NS.ttcn
Tests from PCU_Tests_RAW_SNS inherit most infrastructure from NS tests
defined in PCU_Tests_RAW, which in turn don't share that much with other
tests present in that file. This way we simplify file PCU_Tests_RAW.ttcn,
which will potentially grow once more tests are added.

Change-Id: If680d1bd7dbfe98829f330c33705e0f13bedf3c7
2019-12-30 14:06:06 +01:00
Pau Espin f04ba541c1 pcu: Pass correct fn to ts_PCUIF_DATA_CNF
Change-Id: I68fc0e3dba2cdadbe479017f31868f6dd0dabe9f
2019-12-23 14:47:44 +01:00
Pau Espin 88bf537b35 pcu: Introduce tests for CS and PS paging from SGSN/Gb
CS Gb paging and PTP CS/PS paging implemented in osmo-pcu:
I9501e02e1d7f6944497e724dbccb9a19c3f5221f
I5c52b5af740460c48bb3ba858243b1d20e624268

Related: OS#3927, OS#2406
Change-Id: I90b5a792c1d91e38ea7b8c060ff0b459673df951
2019-12-23 14:46:07 +01:00
Pau Espin 7e9178df28 msc: Remove trailing whitespace
Change-Id: I934dd3504fa91e2006fbc9b1133836060eb0591e
2019-12-17 17:52:42 +01:00
Oliver Smith 8f9daab414 pcu: add TC_paging_cs_from_bts
1. BTS send a CS paging Request over pcu socket
2. Expect a CS paging frame

Related: OS#3927
Change-Id: Ia3ad503c243c9b3b162e204683fa4fa5447bbab3
2019-12-17 13:53:44 +00:00
Pau Espin ff8da1901b pcu: Introduce test TC_t3193
Change-Id: Ib11cd1793d985ff609b10b0e60bddadd5fcfa6d2
2019-12-17 13:53:44 +00:00
Pau Espin a7b7566e0b pcu: Introduce test TC_imm_ass_dl_block_retrans
Change-Id: Icc60cebb8583c9dc97b658def69f17e6efced384
2019-12-17 13:53:44 +00:00
Pau Espin 8948633e8c pcu: Introduce helpers to update AckNackDescription
Change-Id: Ic62ab9e4a854239b95c434068543d95c5352f1c6
2019-12-17 13:53:44 +00:00
Pau Espin 7503c872db pcu: send UL CONTROL ACK triggered by DL ACK/NACK
Change-Id: Ib409394257427cfc62da08fe06ce6c001dcf608a
2019-12-17 13:53:44 +00:00
Neels Hofmeyr c3acceca1a msc: expect only one Paging on GERAN
After discussion on this thread:
http://lists.osmocom.org/pipermail/openbsc/2019-November/013058.html

Do not expect repeated Paging on GERAN.

Pending clarification on 3G, still expect repeated Paging on Iu, though we are
not 100% certain that this is indeed required.

Fixes MSC_Tests.TC_lu_and_mt_sms_paging_repeated,
but not MSC_Tests_Iu.TC_iu_lu_and_mt_sms_paging_repeated

Change-Id: Ie914ea88f31ac158f4bd1700143bbe728dd05e0b
2019-12-12 16:28:23 +01:00
Neels Hofmeyr d8ad7c0543 msc: Iu: fix missing 'ran_is_geran := false' for TC_iu_lu_and_mt_sms_paging_repeated
Change-Id: I011795cacf62f2cac6861fe657966795e6370ddb
2019-12-12 16:21:56 +01:00
Neels Hofmeyr d076c52173 msc: fix 2 Iu tests: use f_mm_common() instead of f_mm_auth()
Fix these tests by using f_mm_common(), which takes care of Iu auth+ciph:
TC_iu_lu_imsi_reject
TC_iu_lu_imsi_timeout_gsup

Change-Id: Id2bf160ac4e1cad4770202c6a6f1b8eeeee21d68
2019-12-12 16:21:56 +01:00
Pau Espin 26b562c1bd bts: Early terminate TC_rec_invalid_frame on error
Extra debugging is added because otherwise it's extremely difficul to
find at which state the test is when debugging sporadic failures.

In f_TC_rec_invalid_frame, timer T is reused because it was actually not
being used before, only defined in there.

Change-Id: If24a81bf20d293b87adf9f37111fc7d344f169f5
2019-12-10 16:47:29 +00:00
Pau Espin a1f7d24efe bts: Update transmitted MS power as requested by BTS
New generic ms power loop algo takes into account the MS Power sent by
MS over L1 SACCH Header. As a result, the test infra must now update its
transmitted value according to what is requested by the BTS as if it was
a real MS in order for algo to output expected results.

Requires osmocom-bb I975cfc5f5d63eb32a7f8932a7f6a544c9a12233c to have
transmitted MS power values for dummy Meas Results updated as requested
over L1CTL.

Change-Id: I287761202093fbc1064f9868efe6f7f6155253ca
2019-12-10 11:23:53 +00:00
Pau Espin 65bab9e3bc pcu: Support sending message to PCU at specific FN
Change-Id: I81a29b4885f3fc6b753a1612d5fd369cd18f5dc6
2019-12-06 09:51:31 +00:00
Pau Espin 6072725622 pcu: Fix incorrect FN being send over PCUIF to PCU
The event FN contains the current FN, but the message should contain the
FN of the first burst of the block.

Change-Id: Iba0b1d1a3d7d875c5443a7bcaff399f9681624ad
2019-12-06 09:51:31 +00:00
Pau Espin 6e3b68988a pcu: Verify contents of data dl blocks originated from emulated SGSN
Change-Id: I4fe79572094038cbb26d5195c0544846ca2550b5
2019-12-06 09:51:31 +00:00
Pau Espin 1a4d4e97b7 library: VTY: Allow hyphens in VTY prompt
Old versions of osmo-pcu print "Osmo-PCU" as VTY prompt. This commit
allows supporting this kind of prompt.

Change-Id: Ia5acbbe5828901726f7f15c4a99d596e94914c4b
2019-12-04 22:26:33 +00:00
Harald Welte beba4e56a0 remsim: Two new bankd test cases about slotmap re-creation
If a slotmap is re-created with identical client+bankd, we expect
no change and the client-bankd connection to persist.

If a slotmap is overwritten with a create for a different client
than the currently connected one, we expect the client connection
to be closed.

Change-Id: If81e1511521fe478d2367104cd1c7eba254d6450
Related: OS#4278
2019-12-04 22:10:58 +01:00
Harald Welte bca0ecd282 resmim: Adjust TC_createMapping_busySlot to current bankd code
Since osmo-remsim Change-Id I83e319d22896b881c0d882542842f500075aa546
createMapping will overwrite any existing mappings that may already
exist for that bank-slot.  We need to adjust our test expectations
accordingly.

Change-Id: Ia8de9edd7edb0437cd783b7d045571ff69820c42
Related: OS#4278
2019-12-04 22:10:53 +01:00
Harald Welte d14ad4ccba remsim: Reset the bankd-side state at start of test
In general we don't want that bankd retains state from one test
case to another.  Let's issue the new RSPRO ResetStateReq at the
start of each relevant test

Change-Id: If810ccbbc848dd2448a4eaea20c80f60f15a2e84
2019-12-04 21:55:05 +01:00
Harald Welte eb172b3942 remsim: Update RSPRO for ResetState{Req,Res} messages
Change-Id: Ia9520b50c4ec2e703cc876cc7f79f3aeda90dba3
2019-12-04 21:55:05 +01:00
Pau Espin a3f0a85eb2 pcu: TC_mo_ping_pong: Check DL block is sent and ACK it
Function f_rx_rlcmac_dl_block_exp_data() still misses proper
verification of data. Apparently the received message has 2 blocks,
first with expected 10 bytes, but next one contains 18 bytes with 4
actual bytes and other bits are padding.

Last DL ACK/NACK sent is not yet working correctly. osmo-pcu seems to be
unable to match it against sent DL block (I think due to non-matching
FN), and instead drops it and schedules after timeout an IMM ASS to try
to send DL block again.

Change-Id: Icf66dd5c07690368722c586632c38fb7e770053c
2019-12-04 16:33:31 +00:00
Harald Welte 4b61204e85 hlr: Don't attempt to find AUTN in 2G-only tuple
In Change-Id I40c6cf7e28ad9331e6c27fe7acafa3f9e277eedf we introduced
a patch that verifies the AMF separation bit for 3G/3G vs 4G
authentication.  However, the test ignored the fact that AUTN cannot
be present in pure 2G tuples.

This makes TC_gsup_sai pass again.

Change-Id: I9b61e62a58b583461dd5e67dd12119be282cae21
2019-12-03 20:08:57 +01:00
Harald Welte 0a1fd0e667 GSUP_Types: Split RAT_TYPE_IE to SUPPORTED / CURRENT
We added the RAT_TYPE_IE while the respective change in libosmocore
was still in gerrit review.  Meanwhile the support there has been
split into two parts: A list of supported radio access types and
another IE indicating the current RAT.  Let's catch up with that
in the GSUP implementation.

This makes TC_gsup_sai_eps() pass again.

Change-Id: I2c609dc523cbec562c6c6a05f4c7d600649ff52d
2019-12-03 20:01:08 +01:00
Eric Wild 7f5cfd4e5d pps exchange after power on
Change-Id: Ibe289de5134eec4f7ba26c75ceb4714ad523f0da
2019-12-02 23:29:46 +00:00
Harald Welte 1d9986a199 ccid: Many more CCID tests
Change-Id: Id046aff7c35b5ad3ab55fdf53a53e7637602d147
2019-12-02 23:29:46 +00:00