Commit Graph

973 Commits

Author SHA1 Message Date
Neels Hofmeyr dadde17425 ttcn3-tcpdump-stop.sh: print colored verdict
Change-Id: I0d2d6171430f1eebb5377edac5e237a99ddbd743
2018-06-23 11:43:00 +00:00
Philipp Maier 76a8d0160e MGCP_Test: ts_CRCX_no_lco: check media description instead of media attribute
The testcase ts_CRCX_no_lco looks at the media attributes to see
if it findes the expected default codec there. In this testcase
we expect PCMU/8000/1 as media attribute, but this is a codec from
the fixed payload type domain. The MGW may not list this info inside
the media attributes. Listing the payload type number in the media
description is sufficient. We should check this instead.

- Remove media attribute check
- Check meida description for PCMU (0)

Change-Id: I69600a1025e68011e8fc5d8bf22d842d9c63bf53
Related: OS#2658
2018-06-23 11:40:04 +00:00
Vadim Yanitskiy 2a978b9fd8 msc/USSD: use more informative names for test cases
Let's explicitly indicate is a SS/USSD message MO or MT.

Change-Id: I87f16f935f015dbd2ac2867d8ea5e155cc365e3f
2018-06-21 22:06:45 +07:00
Vadim Yanitskiy da5a405d9f msc/USSD: drop the TC_lu_and_ussd_wrong_code test case
As we are about to finish the implementation of GSM TS 09.11, in
our case it is 'SS/USSD over GSUP', OsmoMSC will not decide itself
which USSD request-code is known, and which is wrong.

Change-Id: Ic104a49bb2dce2127063bcef8443ee6b639c9f19
2018-06-21 22:06:45 +07:00
Vadim Yanitskiy 911257ebb2 library/GSUP_Types.ttcn: SS Info IE is optional for GSUP_PROC_SS_*
The 'SS Info' IE is optional for GSUP_PROC_SS_{REQ|RSP} messages,
and is not carried in some cases, e.g. when a subscriber aborts
an active transaction by pressing the 'red button'.

Change-Id: I20d9028acbe0c457d2a2cf72eff372b749d8dc30
2018-06-21 21:58:39 +07:00
Vadim Yanitskiy 52f8b6ee1d library/L3_Templates.ttcn: fix f_facility_or_wc(omit)
According to GSM TS 04.80, table 2.5, the Facility IE is optional
for RELEASE COMPLETE message. So, if this IE is omitted, then the
whole TVL shall be omitted. It's time to fix this.

Change-Id: I216195ef71c95997708dad8c31b172b6f6cdc461
2018-06-19 22:20:35 +07:00
Vadim Yanitskiy b59ae2dfcf library/SS_Templates.ttcn: add empty Return Result template
According to GSM TS 04.80, table 3.4, the Return Result component
may be empty, i.e. may not contain any results nor operation code.
It is used, for example, in responce to the network-originated
USSD notification.

Change-Id: Iaaff110c5f61cc87eda6143cd841f9832f6074bf
2018-06-19 22:20:35 +07:00
Neels Hofmeyr 378a49ce60 bsc: handover: actually send Handover Detect
Until now, the test went from RR Handover Command directly to RR Handover
Complete, and osmo-bsc didn't mind it. However, the normal handover procedure
requires an RSL Handover Detect to be sent in-between those. Send that.

Change-Id: I6e54edcc3a99e116d852eca8e48c7a5bc685e832
2018-06-18 17:54:33 +02:00
Neels Hofmeyr 92d4842022 bsc: fix TC_chan_rel_hard_rlsd_ms_dead: ignore RLL REL
The intention is to ignore RLL REL requests, and not to actually block the alt
statement in f_expect_chan_rel() if any RLL REL messages show up.

Change-Id: I3bbcdc41d186a3464cd4adb5c5b770bdec056993
2018-06-16 15:58:03 +02:00
Harald Welte ed380d135d hlr: Port HLR tests to use GSUP_Emulation
Going via GSUP_Emulation (rather than using GSUP_CodecPort directly)
adds many benefits, such as:
* ability to have multiple transactions in parallel
* no silent discard/ignore of unexpected GSUP messages, like those
  for IMSIs we don't expect.

Change-Id: Id2ddd6b81c374ad6350b62fcc5442436757d66cd
2018-06-15 17:59:40 +02:00
Pau Espin a4cecf5af7 Add README.md file for several suites
Content grabbed from [1] and converted to markdown as it's more probable
to have it displayed correctly on popular git repo hosting platforms.
Syntax for embedded graphviz taken from [2].

[1] http://git.gnumonks.org/laforge-slides/plain/2018/osmodevcon2018-ttcn3_test_suites/osmodevcon2018-ttcn3_test_suites.adoc
[2] https://github.com/stlehmann/markdown-graphviz

Change-Id: I9aad03e605569e9613665a7585d60bf308bcb54f
2018-06-14 18:55:36 +02:00
Harald Welte 99f3ca0c48 bsc: Add TC_{early,late}_conn_fail()
Those test cases simulate a BTS-originated RLL CONN FAIL IND at
"unusual" time:

a) before we actually establish any RLL
b) after / while we're tearing down the RLL

This is triggering an osmo-bsc segfault, see OS#3182.

Change-Id: I324c410d7565c189dbc91df577d92b87c036732c
Related: OS#3182
2018-06-14 12:36:13 +00:00
Harald Welte 641fcbe890 bsc: Factor out duplicated code into f_exp_chan_rel_and_clear()
There's a sequence of commands which was repeated over at least
four test cases.  Let's factor this out into the new
f_exp_chan_rel_and_clear() function, and use that function from
all the former copy+pasted sections.

Change-Id: Ic6791fce4e8787e38b818a12ed526d3e47f313ef
2018-06-14 12:36:13 +00:00
Stefan Sperling e6bf4ac879 move M3UA_Emulation dependency repository to commit R.2.A-2-g742cf02
Change-Id: Ifd258da7a0fb53eadb2aa080348a5250c307fe85
2018-06-14 11:24:15 +00:00
Alexander Couzens 0085bd7148 sgsn: add TC_attach_check_complete_resend()
MS -> SGSN: Attach Request IMSI
MS <- SGSN: Identity Request *
MS -> SGSN: Identity Response *
MS <- SGSN: Attach Complete 5x

Change-Id: I9bbbda01f3c41a2f8acf13042d6bcc86f18d74ce
2018-06-14 01:55:31 +02:00
Alexander Couzens 0ca0d9caf1 sgsn: f_TC_attach_closed_foreign: fail on recv an Attach Accept
The test expect a reject. Recv an attach accept should fail then.

Change-Id: I8a4ae6aaaa71dabb1d8a2ee7585e624b962a3500
2018-06-14 01:55:31 +02:00
Alexander Couzens f9858658f9 sgsn: add TC_attach_closed_add_vty
Check acl policy closed.

VTY-> SGSN: policy close
MS -> SGSN: Attach Request
MS <- SGSN: Identity Request IMSI
MS -> SGSN: Identity Response IMSI
MS <- SGSN: Attach Reject
VTY-> SGSN: policy imsi-acl add IMSI
MS -> SGSN: Attach Request
MS <- SGSN: Identity Request IMSI
MS -> SGSN: Identity Response IMSI
MS <- SGSN: Identity Request IMEI
MS -> SGSN: Identity Response IMEI
MS <- SGSN: Attach Accept

Change-Id: I1832c339a9d54c0038433ad44e292031a8905e20
2018-06-14 01:55:31 +02:00
Alexander Couzens 2c15342ae7 lib/BSSGP_Emulation: fix removal of items in ClientList
Previous the old entries aren't removed. This only had an
impact if two different f_TC_* were using the same imsi.
When the second function tried to remove the Client again from
the ClientList, the BSSGP_Emulation failed.

Change-Id: I71103e8f8c5f18e8ebadc057cd62d85affd7ca8c
2018-06-13 15:43:24 +02:00
Alexander Couzens cf81896465 sgsn: add TC_attach_check_subscriber_list
MS <-> SGSN: Attach
VTY -> SGSN: Check if MS is in subscriber cache

Change-Id: If19073ef4a5b1e2219bd5184ae30d55ffb71844a
2018-06-12 19:23:17 +02:00
Alexander Couzens 09040eff01 sgsn: TC_hlr_location_cancel_request_update: remove superflous Update Location Response
There shouldn't be any update location pending

Change-Id: I94b9307311a8095065212e1820cacc6cd2be0a3a
2018-06-12 19:23:14 +02:00
Alexander Couzens 49bb4b499f sgsn: add TC_attach_detach_check_subscriber_list
MS <-> SGSN: Attach
MS ->  SGSN: Detach Req (Power off)
VTY -> SGSN: Check if MS is NOT in subscriber cache

Change-Id: I0956d54760f19ca556fa0d16ea4c5b96ac13f2fa
2018-06-12 19:22:52 +02:00
Alexander Couzens 53f2056571 sgsn: add TC_attach_no_imsi_response
Ignores Identity Request IMSI.

MS -> SGSN: Attach Request TMSI (unknown)
MS <- SGSN: Identity Request IMEI (optional)
MS -> SGSN: Identity Response IMEI (optional)
MS <- SGSN: Identity Request IMSI
MS -x SGSN: no response
MS <- SGSN: re-send: Identity Request IMSI 4x
MS <- SGSN: Attach Reject

Change-Id: I4f41d59cfe6b0168b5e0874082fd700b56a7f0da
2018-06-12 19:22:50 +02:00
Alexander Couzens 667dd7fa84 sgsn: add TC_attach_no_imei_response
Ignores Identity Request IMEI.

MS -> SGSN: Attach Request IMSI
MS <- SGSN: Identity Request IMSI (optional)
MS -> SGSN: Identity Response IMSI (optional)
MS <- SGSN: Identity Request IMEI
MS -x SGSN: no response
MS <- SGSN: re-send: Identity Request IMEI 4x
MS <- SGSN: Attach Reject

Change-Id: Ie50c75e62e31e01c5b17969fb067664e44fd68a5
2018-06-12 19:21:16 +02:00
Alexander Couzens 234c588b72 sgsn: TC_hlr_location_cancel_*: 5 seconds timeout is to short
These tests failed on jenkins.

Change-Id: I56a62e70763b7c331fc528cd7e4064a5ec9f2a04
2018-06-12 13:51:14 +02:00
Alexander Couzens ace6fc65be SGSN: fix spaces/tabs in TC_hlr_location_cancel_request_unknown_subscriber_{withdraw,update}
Fixes: 6c47f29495 ("SGSN: add TC_hlr_location_cancel_request_unknown_subscriber_{withdraw,update}")
Change-Id: I5074dadf53ec75a9c709b28ff324e23fdcd13bfa
2018-06-12 13:51:14 +02:00
Alexander Couzens 1e6d990540 Osmocom_VTY_Functions: introduce f_vty_transceive_not_match()
fails when vty response match template.

Change-Id: I489d2a47cd4690dcfc3f1042c332014593d082a2
2018-06-12 13:51:14 +02:00
Alexander Couzens 98aa59e064 Osmocom_VTY_Functions: move f_vty_transceive_match from HLR to this library
f_vty_transceive_match will be used by future SGSN tests.

Change-Id: Ia69ab6d5639c2e10059f88c8cc97463820cb72e6
2018-06-12 13:51:14 +02:00
Alexander Couzens 02496257f6 *.default: change logging filemask from ERROR | WARNING to += PARALLEL | VERDICTOP
PARALLEL | VERDICTOP will log when the port is dying or when other
components will change to fail. This helped to find a timeout in the
SGSN tests where a function call message timed out.

Change-Id: I770ac964dc37e2752e7d35e493f707b091c739b0
2018-06-12 13:51:14 +02:00
Harald Welte 4908982036 hlr: Update expected-results
as of Change-Id Change-Id: I4f51abdf44dfc62d7e8792341aad6dafe58923da,
osmo-hlr passes HLR_Tests.TC_gsup_sai_err_invalid_imsi

Change-Id: I72fb71806c72ce29e8c6c9b25723f02009463cec
2018-06-11 22:23:10 +02:00
Harald Welte 550daf97b7 bsc: Add TC_chan_rel_hard_rlsd_ms_dead
In this test case, the MSC performs a hard SCCP release of the
SCCP connection.  This makes the BSC send a RLL REL REQ on the lchan,
but we simulate a broken/lost MS which doesn't respond to that.

Current OsmoBSC master will fail this test, and that's exactly why we
need it.

Change-Id: I800168499c2ab30af72625aba6fc740bc16e5653
Related: OS#3333
2018-06-11 19:22:13 +02:00
Harald Welte c3260d9a4c bsc: Reduce TC_bssap_rlsd_does_not_cause_bssmap_reset to 4 lchan
This test establishes an SDCCH for each iteration.  However,
* due to OS#3333, osmo-bsc is currently not properly releasing those
  lchan's,
* due to OS#3222, we furthermore don't allocate "larger" channels like TCH

and as a result on a combined CCCH system we only have 4 SDCCH, which
is less than the 8 that we try to use here.

Change-Id: I0f7fff54248a505387bdfe105259e8ad10ce6c77
Related: OS#3333
Related: OS#3332
2018-06-11 17:48:16 +02:00
Harald Welte 32574eef07 bsc: Avoid duplicate DISC.req in TC_bssmap_clear_does_not_cause_bssmap_reset()
Change-Id: I11b4a1e95dcc522f2a9c14a8b625eab2356a1c18
2018-06-11 15:22:59 +02:00
Harald Welte a189718a4e BSC_Tests: ensure different RA+FN in *_does_not_cause_bssmap_reset()
For each of the SCCP/BSSMAP connections we create, let's make sure we
use a different RA and frame number, to make sure the test is more
realistic, and to aid any debugging.

Change-Id: I35540979c38d46f03702812e93742d7db772c533
2018-06-11 15:22:59 +02:00
Harald Welte 1b1be37288 bts: no need to import GSM_RR_Types twice
Change-Id: Ie3c45df74baebfefb36e09a27b820093f7b9218b
2018-06-11 15:22:59 +02:00
Harald Welte 935fbe336a bsc: Don't expect BSC to release SCCP in LCLS.TC_lcls_connect_clear()
While osmo-bsc was still affected of OS#3331, it would release the SCCP
connection from the BSC side.  This is illegal as per 3GPP spec and
has meanwhile been fixed in osmo-bsc master.  However, the testcase
BSC_Tests_LCLS.TC_lcls_connect_clear() relied on the broken behavior,
let's fix that.

The testcase now releases the SCCP connection from the simulated MSC
side in response to the BSSMAP Clear Complete from the BSC.

Change-Id: Ic3e1f8729a093b04941ec7ca72664d53adb21229
2018-06-11 15:22:59 +02:00
Harald Welte e8d750e668 bts: More complete AGCH / IMM.ASS testing
The existing test simply sent 1000 messages via RSL without checking
what actually arrived on the radio interface, or without
expecting/counting any RSL DELETE IND.

Let's fix this by introducing test sending IMM.ASS at three different
rates, with related expectations in terms of nubmer of IMM.ASS arriving
on Um vs. RSL DELETE IND arriving at BSC.

Change-Id: Ib6043b76ba1d7aaff107bb612f63b5a747d8720c
Related: OS#2990
Related: SYS#2695
2018-06-10 21:44:29 +02:00
Vadim Yanitskiy 0aaf48d893 msc/USSD: test USSD-request during an active call
The idea of this testcase is to check if MSC can correctly
handle a USSD-request during an active call.

What we do here:

  1) Perform Location Update
  2) Establish a MT-call
  3) Perform *#100# request
  4) Release the call

Change-Id: Ifa3cd1aeeb34ccf5864f78b76a88aaa6d5e51839
2018-06-10 20:37:19 +07:00
Vadim Yanitskiy b9d09f99ee msc/USSD: add unknown request code testcase
The idea of this testcase is to check reaction of the network on
reception of USSD request with unknown/unhandled request code.

It is not clearly defined by the GSM specs, how the network
should react in such cases, but looking at GSM TS 04.80,
section 4.3.2 "Error types description", the UnexpectedDataValue
error looks suitable. Commercial networks also use this error
when an unknown request code is sent.

Change-Id: I6a3fcaafc37972a38c13722f0b511ea5e1e3fbd8
2018-06-10 20:36:51 +07:00
Pau Espin 752ffd565a bts: Set L1CTL rxlev_exp as module parameter
Change-Id: If63e5c2d6abe1dd6dddd1a12e703ed069b940ab4
2018-06-07 17:15:27 +00:00
Neels Hofmeyr beb58a6020 update expected results: bsc, sgsn
Change-Id: Icc8bb648b3c79b2e29450ca38dd95bad1d2d09aa
2018-06-07 15:47:26 +02:00
Philipp Maier 45635f4379 MGCP_Test: Test non LCO crcx
When a CRCX without an LCO option (codec) is sent, then older versions
of osmo-mgw will omit the port number in the SDP part of the response.
Also no default codec is selected and reported back. This testcase
pinpoints the problem.

Change-Id: Ie16cdab936ce468fe378d4ec9e1c61f81c07fb4e
Related: OS#2658
2018-06-06 17:16:21 +02:00
Philipp Maier ac8fc7f859 MGCP_Test: expect TC_crcx_illegal_double_lco to pass
The osmo-mgw now rejects multiple appearances of LCO, the testcase
TC_crcx_illegal_double_lco now passes.

- update expected-results.xml

Change-Id: If4a68e9373b34696236935cce936e9d3c254511b
Related: OS#3119
2018-06-06 16:54:01 +02:00
Vadim Yanitskiy c3cb53383f USSD_Helpers.ttcn: add f_USSD_FACILITY_IE_RETURN_ERROR
Change-Id: I9f2b526cb67224cab81364cec34efd42bbb44327
2018-06-06 10:59:11 +00:00
Harald Welte 343b774d21 bsc: Fix f_establish_fully() for cases where we expect ASSIGN FAIL
When f_ass_patch_lcls() was recently introduced during LCLS support
patches, we broke any testcases that *expected* an ASSIGNMENT FAIL
by overwriting the ASSIGNMENT FAIL with an ASSIGNMENT COMPL.

This patch fixes f_ass_patch_lcls() to only patch 'assignmentComplete'
members, if this assignmentComplete is actually chosen.

This fixes BSC_Tests.TC_assignment_fr_a5_1_codec_missing

Change-Id: I64fbf4cc3178a91913143960475a0d3758779ced
2018-06-05 21:45:02 +00:00
Alexander Couzens d8604ab9ae L3_Templates: tr_GMM_DET_REQ_MT: use * instead of omit for `cause`
The omit force this field to be not present, while a * allows to be present or not.
As user of this tr I would expect to ignore this field rather than an explicit omit.

Change-Id: Iae91f752789273934a6382bdd474594c3c50bbe9
2018-06-05 13:04:41 +00:00
Harald Welte 83f6dbfa34 BTS_Tests: Don't wait indefinitely for ASP_IPA_EVENT_UP
Change-Id: I5150660319896fe7f597ca333395923f128c8d87
2018-06-03 19:07:25 +02:00
Harald Welte 5d50a283ee bsc: Enable LCLS in osmo-bsc.cfg
Change-Id: I39b0812423dd22f677334ad0ac406a23a1214fa9
2018-06-03 15:15:25 +00:00
Harald Welte ff579f90e5 LCLS: Introduce a copy+pasted f_connect_handler() function
... using the original one is hitting a ttcn3_compiler bug in
TITAN 6.3.1, see https://www.eclipse.org/forums/index.php/m/1789918/

Change-Id: I7c2dfd3c6e63b54c019fba0c07a1bb777d68f6b5
2018-06-03 10:34:22 +00:00
Harald Welte cc0b014903 bsc: Add LCLS related test cases
This is an early WIP, we actually will need to establish two calls/legs
before the BSC is able to locally correlate them.

Related: OS#1602
Change-Id: Ie6d0b9c38027abf65c7c564fc79b889d013fa6a7
2018-06-03 10:33:41 +00:00
Harald Welte 75b3426009 bsc: Disable verbose logging of MGCP encoder/decoder
Change-Id: I8147029a20828e762819be35ffebd801b22d2b6b
2018-06-03 12:29:45 +02:00