Commit Graph

1264 Commits

Author SHA1 Message Date
Oliver Smith b7e6e6390b cosmetics
Change-Id: Icc787ee8316ac3c535dc2ba0944aaa2e69949625
2019-03-13 11:39:47 +01:00
Oliver Smith 27772489d7 add TC_pdp46_act_deact_icmp6
Change-Id: Idb19ab377b1e4462ad9620472d1eb302e9dc0c0c
2019-03-13 11:33:37 +01:00
Oliver Smith 4a0df5b5eb WIP: add TC_pdp46_clients_interact
Change-Id: I99c58e3412c3b2b68f7fbff16443fb73940a4bb0
2019-03-13 11:23:52 +01:00
Oliver Smith 62cd07948a WIP: GGSN_Tests.ttcn: test IP4v6
Change-Id: I3bab7df5caddc5c8b973c81544f954d5473ac234
2019-03-12 16:56:49 +01:00
Neels Hofmeyr c0b520d578 msc: f_tc_sgsap_reset: add final delay to fix spurious failure
Change-Id: I20fd583311ee69f2cdee6448e809214ab261f6bd
2019-03-07 23:27:37 +01:00
Neels Hofmeyr 6aaeccf093 msc: move sms sending to BSC_ConnHdlr and send from within test flow
For the sole reason that f_vty_sms_send() was put on MTC_CT for no apparent
reason, we start the test function and send an SMS with an arbitrary two
seconds delay.

Instead move it to BSC_ConnHdlr and place SMS sending in the actual test
function flow where it belongs.

Change-Id: I5f348b3d30342b7c4871a1fc8f94648923e82eea
2019-03-07 23:27:37 +01:00
Neels Hofmeyr 6b468a493e msc: as_clear_cmd_compl_disc: log unexpected message
When receiving an unexpected BSSMAP message that fails the test, log it.

Change-Id: I5cafac3318a50567f1916ea670af55558e97bf17
2019-03-07 23:27:37 +01:00
Neels Hofmeyr de76f05547 msc: add as_optional_cc_rel to ignore CC REL during call abort tests
When aborting a call with a Clear Request, it is actually a good idea to
release an ongoing call with a CC Release message from the MSC. Allow this.

Change-Id: I8378f7602fecac8262b31b47ad9327a3782c1bcd
2019-03-07 16:37:51 +01:00
Neels Hofmeyr ced8acf305 log time in tcpdump-start and -stop.sh
Also log the testcase name in tcpdump-start.sh.

The output now looks like

    ------ MSC_Tests.TC_mo_cc_bssmap_clear ------
    Thu Mar  7 13:21:00 UTC 2019
    [...]
    Thu Mar  7 13:21:04 UTC 2019
    ====== MSC_Tests.TC_mo_cc_bssmap_clear pass ======

The reason to log start and end dates came up like this: I noticed a segfault
in a tested program at a specific time. From the timestamp I tried to find out
which of the tests saw the failure. (After a segfault, all subsequent tests run
and fail, but it is not obvious which failure occured because of a segfault,
and which ones just normally failed before that.) Looking at the timestamps of
the log files didn't help, because the ttcn3_logmerge touched those after the
tests completed. So the only way is to cat each individual log file and find
the timestamp.

So this adds an overview of the timestamps without needing to open log files.

Change-Id: I0832d9b5df599baad5dec8d3a993481b4286fbb3
2019-03-07 16:33:03 +01:00
Oliver Smith c574829208 library/GSUP_Types.ttcn: add CHECK-IMEI message
Implement necessary messages for Procedure Check_IMEI_VLR (TS 23.018
Chapter 7.1.2.9). This lets the VLR ask the EIR to check if an IMEI
is valid. In the Osmocom stack, we don't have an EIR and this request
is handled by the HLR. We are able to store the IMEI in the HLR as
side-effect (OS#2541).

This is roughly based on TS 29.002 8.7.1 MAP_CHECK_IMEI service, but
only implements the bare minimum required IEs (imei and imei_result).

Related: OS#3733
Change-Id: Ie1ae5c66ad3f9b42b345020de62a0c276cd8d709
2019-03-04 16:24:28 +00:00
Harald Welte 16e92f4169 PCU: Add simple test for PCUIF RACH Indication
Change-Id: I8fa6de711391837ed16888c48b22cd29892f222f
2019-03-02 00:04:52 +01:00
Harald Welte a321981987 PCUIF: Add send + receive templates for TIME_IND
Change-Id: I57d776d8d2d8300805b8b8e724c288ba29c4b284
2019-03-02 00:04:52 +01:00
Harald Welte 0a3d63f683 PCUIF: Accept any ARFCN in tr_PCUIF_DATA_REQ
Change-Id: Ic334d8809baea86ea93f429b200204861b989030
2019-03-02 00:04:52 +01:00
Harald Welte ea3c7e945e PCU: Split RAW_PCU_CT from RAW_NS_CT
Let's split the PCUIF-side component from the NS-side component
and create a new RAW_Test_CT which derives from both.

Change-Id: I15021c5dea16e39a530d8d9080e37a7f2a6c4fa7
2019-03-02 00:04:52 +01:00
Harald Welte 913bbf6908 PCUIF_Types: Add enumerated PCUIF_BurstType
Change-Id: Ib2e2effb818da5d259032ee5b8b25788ebc646c0
2019-03-02 00:04:51 +01:00
Harald Welte 72099557a5 PCU: Add test for SNS Change Weight procedure
Change-Id: Ia63865139f63969ccde010b01ddb8fb073209f3a
2019-02-26 11:28:28 +01:00
Harald Welte 630d0e6523 PCU: Add tests for SNS with separate signalling/data NS-VC, ADD, DEL
Change-Id: Ie1d14a901b354daa4e3796fe66e7390d87c7e778
Related: OS#3617
2019-02-26 11:28:28 +01:00
Harald Welte b63c3a1e4f PCU: Add a bit more logging/tracing to ease debugging of SNS tests
Change-Id: Ic558f02f3c3ddbde0f16a7656b84486a8462b0a4
Related: OS#3372
2019-02-26 10:20:29 +00:00
Harald Welte bf76824482 PCU: Prepare for having multiple Gb connections on tester side
Change-Id: I6de4832bda18b36873f57986a34ba8082af2c853
Related: OS#3372
2019-02-26 10:20:29 +00:00
Harald Welte c4d7beb3ff PCU: Move SNS specific functions to PCU_Tests_RAW_SNS.ttcn
Change-Id: Ie41a21b6f2b95f4aaea84d8b717e96efefb704e3
RelateD: OS#3372
2019-02-26 10:20:29 +00:00
Harald Welte f7b74076c2 PCU: Add tests for our new IP Sub-Network-Service (SNS) Gb interface
The SNS-enabled Gb interface has no RESET/BLOCK/UNBLOCK procedures,
but introduces a bunch of new SNS procedures.  Most importantly the
SNS-SIZE and SNS-CONFIG procedures.

Change-Id: I0fe3d4579960bab0494c294ec7ab8032feed4fb2
Related: OS#3372
2019-02-26 10:20:29 +00:00
Harald Welte 88963dc365 PCU: Change PCU-side port to 22000
This way the tester and PCU can run on the same ip address without
conflicts.

Change-Id: I0e98877db8f0300a98f7694744a063c1143b89f3
2019-02-26 10:20:29 +00:00
Philipp Maier 6d4e094341 MGCP_Test: Add testcase to test ts101318/rfc5993 conversion
The MGW recentenly adds support to convert between ts101318 and rfc5993
when GSM-HR is used. Lets add a testcase for that.

depends: osmo-mgw Iceef19e5619f8c92dfa7c8cdecb2e9b15f0a11a1
Change-Id: I96df45fe45b53088e07b26f14173a75498a84143
Related: OS#3807
2019-02-26 09:10:41 +00:00
Philipp Maier a071ee467c RTP_Emulation: check received RTP packets
The configuration of the RTP Emulation (RtpemConfig) allows to set a
fixed RTP payload that is then used when RTP packets are transmitted.
However, when packets are received, then the payload is not checked.
Lets check the received data against some user configurable rx payload,
that is by default set to the tx payload.

Change-Id: Id0b125aaf915497d0a4f051af890fc34e09da61d
Related: OS#3807
2019-02-26 09:10:35 +00:00
Max a199a2e0a2 Log all RA values which cause test failure
Previously the first timeout in TC_rach_content() caused test to
fail. Related TC_rach_count() test shows that there're some (13-16 out
of 1000) RA values which are problematic. Let's log all such values in
TC_rach_content() before failing the test to, hopefully, spot the
pattern which sets such RA values apart.

Change-Id: Ibfeb377101f406608c0193f08729c0e6d084281e
Related: OS#1854
2019-02-25 16:31:11 +01:00
Harald Welte 43d36b90d5 msc: update expected results
Change-Id: I1151e9333da14bb2714712b57914e03e4d5b785b
2019-02-22 21:26:58 +00:00
Harald Welte 4c422b76ff MSC: Verify CSFB INDICATOR is present in CLEAR COMMAND
When a CSFB voice call is cleared by the MSC, it must include the
CSFB INDICATOR in order to trigger the BSC to perform actions
required for Fast Return to LTE.

This patch changes TC_sgsap_lu_and_mt_call() and
TC_bssap_lu_sgsap_lu_and_mt_call() to ensure the CSFB INDICATOR IE
is present as expected.

Change-Id: I6ce3a34f85aca7143cf7925cb9319bc679e8d395
2019-02-22 21:24:11 +00:00
Harald Welte b1b853a8ec PCU_Tests.default: Remove content of [EXECUTE] section
If we have tests stated in the .default file and we have them stated
again in the .cfg file, they will be executed twice.  Let's align
the PCU tests suite with those of other network elements.

Change-Id: Ieeaf70153f4dc61978569d06e20947fa939cabdd
2019-02-21 15:54:46 +00:00
Max 1181f2d105 Log FN and RA on RACH test timeouts
Change-Id: I6caac582649e38e77938602fa675d50bdde57790
2019-02-21 16:46:05 +01:00
Pau Espin 446e07bc77 bts: Fix race condition in f_dyn_ipa_pdch_(de)act
Test BTS_Tests.TC_dyn_osmo_pdch_act_deact was sporadically failing due
to receiving IND_INFO on the PCU port with pdch_mask related TS bit set
to 0 after sending a PDCH ACT. That happened due to a race condition
because PCU send IND_INFO periodically. As a result, it can happen that
BTS sends an IND_INFO after PCU.clear was called and before the PDCH ACT
is handled.

Change-Id: If11ef05d97aa5f6caaa731f3817c1fecfc3edf7c
2019-02-21 13:31:35 +00:00
Harald Welte 9fbcf4b01e PCU: Tests for the BSS/PCU side NS/BSSGP implementations
The existing (unused) PCU_Tests are operating on top of a NS + BSSGP
emulation, i.e. they're aimed at testing higher protocol layers.  Also,
they required BTS+BSC to run next to the PCU.

The new PCU_Tests_RAW introduced in this patch are the exact opposite:
* they test the PCU alone (attach to PCUIF and Gb interface)
* they don't require BTS or BSC to run
* they don't use NS + BSSGP emulation but raw NS/BSSGP frames to
  test the very NS/BSSGP implementation inside of OsmoPCU.

Change-Id: I7ad76b96974cf0a686ad0f00ccd09d1a9df8b4d5
Related: OS#2890
2019-02-21 11:53:42 +01:00
Philipp Maier 6137c32e05 MGCP_Test: Add VTY access
The MGCP_Test testsuite currenty lacks VTY access capabilities, lets
add them so that future testcases can access the VTY in order to change
options on the fly.

Depends: osmo-ttcn3-hacks Ife949c61156222de3026280071226ef6f5dbd959
Change-Id: If383f81af3306f8f5bdf50152498ae1303d390df
Related: OS#3807
2019-02-20 17:00:33 +01:00
Harald Welte 07e8dde671 PCUIF: Use OCT4 for IP address, not uint32_t
In TTCN-3, a 4-byte octetstring is the more usual representation for
IP addresses, not an integer type.  This is also what functions like
f_inet_addr() etc. are using as types, and we may want to use them
in combination with the PCUIF.

Change-Id: Ia08e1bb8a9bfbd5bf5b63922c77bb221ce1a12f5
2019-02-18 20:42:16 +01:00
Harald Welte e1fd916b21 PCUIF: Prepare for simulating BTS side of PCU Interface
Our TTCN-3 PCUIF code so far was only used to simulate the PCU side
of the interface: connecting to the socket as a client.  However,
it's also useful to emulate the BTS side of the interface: Listening
for a connection as a server.

Also, the send/receive templates are prepared for the inverse role.

Change-Id: I779ff2903cab8c13ffb8fe10a4cacd996bafe69a
2019-02-18 20:25:00 +01:00
Harald Welte f4bf131eca Osocom_Gb_Types: Add send/receive templates for SNS-SIZE and SNS-CONFIG procedure
Change-Id: Iaa12c468a9e665d2050945cfc0a60dab4024071c
2019-02-18 20:25:00 +01:00
Harald Welte 387ab37dfd Osmocom_Gb_Types: Differentiate send (value) and receive templates
Change-Id: I90400c42d3dff0a1de0022320d76f10ac748a206
2019-02-18 20:25:00 +01:00
Harald Welte a7377d8c74 General_Types: Add BIT13, BIT28, BIT29, BIT30
... required by USB CCID.

Change-Id: Idf4f54b2d57d7b29c39c4b6f9bfa1022745cba89
2019-02-17 20:51:54 +01:00
Harald Welte c682666fea IPA_Emulation: Integrate OML decoding/encoding; add OML port
Change-Id: Id0dabe7eca4f81d22a60b346ac598be81533f53c
2019-02-17 14:29:21 +01:00
Harald Welte 0aa0abc36d Add TTCN-3 definition of GSM Abis OML protocol (TS 12.21)
Change-Id: I65f71bf7f54cbe3290757e810b1df1e54929bdd1
2019-02-17 14:29:17 +01:00
Daniel Willmann f6c5da90f0 Fix compilation on eclipse-titan 6.5.1
Newer eclipse-titan makefilegen already sets CPPFLAGS like this:

CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include$(TTCN3_SUBDIR)

where TTCN3_SUBDIR expands to '/titan' and TTCN3_DIR to '/usr'

If we add /titan after include we end up with
-I/usr/include/titan/titan/ which will cause the compile to fail due to
a missing TTCN3.hh include.

Check the titan version so we retain backwards compatibility.

Change-Id: If9fef29ce243be112d3735f0236335197f8f140f
Related: OS#3179
Sponsored-by: On-Waves ehf.
2019-02-15 07:49:54 +00:00
Philipp Maier 8e07a4a8d6 MSC_Tests: Make sure only sgsap related tests use the SGs interface
At the moment the SGs interface is started and connected in all tests in
the testsuite. This may be a problem because the IUT may lack the SGs
support. In this case all tests would fail because of the missing SGs
interface.

Lets initalize and connect the SGs interface only for SGs related tests
to prevent unrelated test failures.

Change-Id: I8e012e3599ad00db2e132b6463499f8a4a2307f1
Related: OS#3614
2019-02-14 18:23:28 +01:00
Philipp Maier db7fb8da95 MSC_Tests: run TC_gsup_mt_multi_part_sms late
The testcase TC_gsup_mt_multi_part_sms is known to fail osmo-msc in a
way that meaninful sms delivery is not possible anymore. This is due to
a bug in osmo-msc, but in the testsuit it makes running certain normally
working testcases impossible. Lets move at at the end of the testsuite
so that it rus late and other tests won't get blocked.

Change-Id: I581cd80895ea992a15389c6f73816769864e6d4c
Related: OS#3614
2019-02-11 10:53:35 +01:00
Philipp Maier 4ec4e60a26 MSC_Tests: make sure SGs tests don't interfere
The IMSIs used with the SGs tests are partially re-used in other SGs
testcases and also in unrelated testcases. Lets give each SGs test a
unique IMSI to prevent unrelated interference with other tests.

Change-Id: I417d9c5f0fbab7483d1b31dc20a99f63ee1bbfe6
Related: OS#3614
2019-02-11 10:30:17 +01:00
Harald Welte 9978710c4b bsc: Test CSFB "Fast Return" in new TC_chan_rel_hard_clear_csfb
When a MSC releases a connection using the BSSMAP CLEAR CMD, it can
specify that this call was part of CSFB.

The BSC is then supposed to add a special IE to the RR RELEASE
message which will help the phone to switch back to LTE as soon
as possible.

This commit adds a new test case testing for exactly that behavior.

The test does *not* verify if the EARFCN information contained is
actually correct, only that the IE is present in the RR RELEASE.

Change-Id: I7501fb25578412c882ff92da5d388f3079bbce7f
Requires: osmo-bsc Ibfbb87e2e16b05032ad1cb91c11fad1b2f76d755
Related: OS#3777
2019-02-05 17:45:29 +01:00
Harald Welte 924b6ea17b bsc: replace octet string with decmatch when matching RR RELEASE
The 'decmatch' keyword allows us to match the decoded version of some
octetstring, which is very useful in the situations where we have
the L3 message only as octetstring but want to check if it matches
some L3 template.

Change-Id: I0a91e067f7e8062bf991fef8b0d4d8da740bfafc
2019-02-05 17:45:29 +01:00
Harald Welte cc32ed9096 BSC_Tests: Don't make invalid assumptions about RR RELEASE
The RR RELEASE message does not always have to be '060D00'O,
which constrains it to:
* not having any optional IEs
* not having a cause value != 00

Let's relax the matching to accept any RR RELEASE message, whatever
the cause may be, and whether or not there are any optional IEs at the
end.

At the same time, also remove some copy+pasting but rather have one
template that gets used everywhere.

Change-Id: I4b9d078c9b66f040fe673b5d957cf8e2c6d5892c
2019-02-05 15:05:26 +00:00
Vadim Yanitskiy 5ac49ccf61 MSC_Tests.ttcn: introduce TC_gsup_mo_mt_sms_rp_mr
The idea of this test case is to verify SM-RP-MR assignment for
a few concurrent MO/MT SMS being sent over GSUP.

Basically, the algorythm is the following:

1.0 establish a RAN connection,
1.1 send CM Service Request for MO SMMA indication,
1.2 submit MO SMMA indication on DTAP,
1.3 expect MO-ForwardSM-Req on GSUP,

2.0 send MT SMS using MT-ForwardSM-Req on GSUP,
2.1 expect CP-DATA/RP-DATA for MT SMS on DTAP,

3.0 compare both SM-RP-MR values (for MT, assigned by the MSC),
3.1 send MO-ForwardSM-Res for MO SMMA on GSUP,
3.1.1 expect CP-DATA/RP-ACK for MO SMMA on DTAP,
3.2 send CP-DATA/RP-ACK for MT SMS on DTAP,
3.2.1 expect MT-ForwardSM-Res for MT SMS on GSUP.

Change-Id: I17cbbaa64d9bce770f985588e93cd3eecd732120
2019-02-01 18:55:29 +00:00
Vadim Yanitskiy be1ff4b177 MSC_Tests.ttcn: introduce TC_gsup_mt_sms_rp_mr
The idea of this test case is to verify SM-RP-MR assignment for
a few MT SMS being sent over GSUP. Basically, the algorythm is
the following:

  1.0 send the 1st SMS using MT-ForwardSM-Req on GSUP,
  1.1 expect Paging Request on RAN,
  1.2 establish a RAN connection,
  1.3 expect CP-DATA/RP-DATA for the 1st SMS,

  2.0 send the 2nd SMS using MT-ForwardSM-Req on GSUP,
  2.1 expect CP-DATA/RP-DATA for the 2nd SMS,

  3.0 compare both SM-RP-MR values assigned by the MSC,
  3.1 send CP-DATA/RP-ACK for both 1st and 2nd SMS messages,
  3.2 expect MT-ForwardSM-Res for both 1st and 2nd SMS messages.

The SM-RP-MR values for both 1st and 2nd messages shall not match.

Change-Id: I3a52d44f4abde9b6b471b9108c1cee905884c9bc
2019-02-01 18:55:29 +00:00
Philipp Maier c704a88b40 BSC_Tests: fix vty interface for channel allocator tests
The tests presented in Change I109d986dd7ece1a56422a669ca64353ed46f7ed6,
are using a slightly outdated vty syntax and fail because of that. Lets
update the VTY syntax.

Change-Id: I302e8872dbdc8e65d51902a881f777863de22915
Related: OS#3503
2019-01-29 16:02:45 +01:00
Philipp Maier ac09bfc4ce BSC_Tests: Add tests to check channel allocator
When a channel is assigned via the assignment request throught the A
interface, the MSC may offer either FR, HR or both. When FR and HR are
permitted, a preference is set on one of the two.

At the moment we do not check how the bsc is reacting to those
preferences and its also not checked how the behavior is when the
preferred rate is not available because all lchan of that type are
already in use. Lets add a set of tests to verify this.

Change-Id: I109d986dd7ece1a56422a669ca64353ed46f7ed6
Depends: osmo-bsc I397e68e26d6a1727890353fa34f4897b54795866
Related: OS#3503
2019-01-29 12:49:47 +00:00