Commit Graph

1086 Commits

Author SHA1 Message Date
Harald Welte 3db03118a3 add ttcn3 test suites slides from OsmoDevCon 2018
Those slides are copied from http://git.gnumonks.org/laforge-slides/plain/2018/osmodevcon2018-ttcn3_test_suites/
to make sure they are more easily found.  It would be nice to convert
them into an actual asciidoc book with one chapter per test suite which
would be built from within this repository.   This way we can keep
documentation and code better in sync.

Change-Id: I8a0d66babc165678ec53a1ee1c673e93708b8b79
2018-09-16 12:39:51 +02:00
Vadim Yanitskiy 7b8c522741 BTS: enable encryption + RLL tests for Lm (TCH/H) channels
Since OS#3419 is resolved and TCH/H channel is supported by
trxcon, both encryption and RLL tests can be finally enabled
on Lm (TCH/H) channels.

Change-Id: I78f82a5f2a7b21d91692b1c99a9ff125e65cab64
Related: OS#3256
2018-09-16 16:58:57 +07:00
Alexander Couzens 4786b3f5ed library/GSUP_Types: correct value of the GSUP_CancelType
The comment in the c header of OSMO_GSUP_CANCEL_TYPE_UPDATE says:
1 = /* 0 on the wire */,
2 = /* 1 on the wire */

Change-Id: I4d22af9fee19e6036dbb555422759e3c1285416a
2018-09-16 03:33:30 +02:00
Alexander Couzens 0c6324ff12 sgsn: implement TC_attach_usim_resync
Test the UMTS AKA resync procedure with USIMs.

MS -> SGSN: Attach Request
MS <- SGSN: Identity Request IMSI
MS -> SGSN: Identity Response IMSI
MS <- SGSN: Identity Request IMEI
MS -> SGSN: Identity Response IMEI
HLR<- SGSN: SAI Request
HLR-> SGSN: SAI Response
MS <- SGSN: Auth Request
MS -> SGSN: Auth Failure (with AUTS)
HLR<- SGSN: SAI Request (with AUTS & RAND)
HLR-> SGSN: SAI Response (new key material)
MS <- SGSN: Auth Request (new key material)
MS -> SGSN: Auth Response
MS <- SGSN: Attach Accept
MS -> SGSN: Attach Complete

Change-Id: I52a8dc45bb67d4ca9f3efade278d3308bb0da73d
2018-09-14 16:37:04 +02:00
Philipp Maier 8aa5cb3f89 MSC_ConnectionHandler: stop properly on failure in f_establish_fully()
When the altstep in f_establish_fully() gets an unexpected ASSIGNMENT
FAIL or COMPLETE it should stop completely like it is already
implemented in many other altsteps.

Change-Id: Ib4ac7bcbac35a4ae454d1806f3fbb727834d18b7
2018-09-13 13:58:55 +00:00
Philipp Maier 82cb0b1e14 BTS_Tests: check paging channel fn (bs_ag_blks_res)
BTS_Tests.ttcn contains numorous tests that issue pagings via RSL and
observe if these pagings are visible on the UM interface as well.
However, it is not checked whether the frame number of the blocks on
which those pagings are sent actually falls into the range that is
specified for PCH. We should check this as well.

(The PCH is part of the CCCH, which also contains the
AGC. How many blocks of the CCCH are to be used by the PCH is set by the
parameter bs_ag_blks_res.)

- Check the FN of each paging message that arrives on L1CTL and make
  sure that those FN are part of the PCH.

Change-Id: I839e75ece05166518bf7132acd3017434b3d3bc2
Related: OS#1575
2018-09-12 15:59:28 +00:00
Alexander Couzens d24973deb1 GSUP_Types.ttcn: add tr_GSUP_SAI_REQ_UMTS_AKA_RESYNC
Match only on AKA RESYNC packages

Change-Id: Ibab8a76fde78db6e7a84794e0b641bcb7b1fd1a7
2018-09-11 16:20:28 +00:00
Alexander Couzens 387f7f37b1 L3_Common: extend the AuthVector to contain AUTS
AUTS is used in the UMTS AKA resync procedure.

Change-Id: Id1afa47778e6220cab375ae4b54b251801724fdb
2018-09-11 18:04:14 +02:00
Neels Hofmeyr 2068f43d68 compare_results.sh: less drastic wording
We don't currently fail test runs from mismatching results, it's just for human
convenience. So don't say things like "Failing due to skipped tests", it's
confusing.

Summarize once the need to update results instead.

Change-Id: Ibafa75bd54df07253780c6af3a68a0a4d148e64b
2018-09-06 14:35:07 +02:00
Neels Hofmeyr a9acec4c21 compare_results.sh: speed up comparison loop
The script takes quite long to parse each and every line O(n**2). Rather
directly pick only those lines that contain the test name in the grep that
feeds into the loop.

Change-Id: I0d4987b11c3feaef3a7fc56d764c43386865004f
2018-09-06 14:33:55 +02:00
Neels Hofmeyr 873ae201bd update expected results
Change-Id: I32c29e62ca317937db771f8fb1540bb1fe9da2ab
2018-09-06 14:13:34 +02:00
Alexander Couzens 15faf92611 L3_Template: add template ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC
ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC send a Authentication & Ciphering failure
to resync the USIM with the HLR.

Change-Id: Ia58dc1483757887ca14cfae19e30f9c91fef5874
2018-09-04 17:15:03 +00:00
Alexander Couzens cf3c93d959 sgsn: add TC_attach_gmm_attach_req_while_gmm_attach
Testing the corner case of receiving an Attach Request
while not (yet) sent an Attach Accept.

MS -> SGSN: Attach Request IMSI
MS <- SGSN: Identity Request IMSI (optional)
MS -> SGSN: Identity Response IMSI (optional)
MS <- SGSN: Identity Request IMEI
MS -> SGSN: Attach Request (2nd)
MS <- SGSN: Identity Response IMEI
MS <- SGSN: Attach Accept
MS -> SGSN: Attach Complete

Change-Id: I0bac50dc5a72ba8f9010b05bcb98aa7ff0b81cf6
2018-09-04 18:24:52 +02:00
Alexander Couzens 03d1224474 sgsn: rework TC_attach_closed_add_vty to be executed in a single BSSGP_ConnHldr
When stopping and starting BSSGP_ConnHdlr multiple times, there
are Port connecting problems. Using a single iteration of
BSSGP_ConnHldr.start() works around this problem.

Change-Id: I8e5ae832f3908a172b9beb6d936074b806e0c799
2018-09-04 18:24:52 +02:00
Alexander Couzens fa0a75fc37 sgsn: fix TC_attach_check_complete_resend
TC_attach_check_complete_resend tests if the SGSN sends out the SGSN
Attach Accept multiple times. If the MS disappear,
there is no need for a ATTACH REJECT.

Change-Id: I3fa5c100b8389e184acf1e71e2792e5474c22dec
2018-09-04 18:24:52 +02:00
Alexander Couzens d81876a3ff sgsn: increase the timeout of some TC
Because of multiple BSSGP connections, the tests need more time to complete.

Change-Id: I12baf4b2425d0d862755d03d16127b18968e28f2
2018-09-04 18:24:52 +02:00
Alexander Couzens 1d1744fe9e sgsn: use vty cmd `reset sgsn state`.
Cleans most of the sgsn state.
Depends on the SGSN commit I92096f3f6ea49e75676e30e9921d00210bac5382.

Change-Id: Idff3de6f1b8f5cb503edc5c6256ce2bf7ec7aaa2
2018-09-04 18:24:52 +02:00
Alexander Couzens be837bdd69 sgsn: introduce TC_attach_rau_a_b
MS <-> SGSN: Successful Attach
MS  -> SGSN: Routing Area _a_ Update Request
MS <-  SGSN: Routing Area _a_ Update Accept
MS  -> SGSN: Routing Area _b_ Update Request
MS <-  SGSN: Routing Area _b_ Update Accept
MS  -> SGSN: Detach (PowerOff)

Change-Id: Ie636778628c216e315bd6f5bc11e0e5bd9c218a5
2018-09-04 18:24:52 +02:00
Alexander Couzens 90fe6a2bf7 sgsn: add optional bssgp index for f_upd_ptmsi_and_tlli f_bssgp_client_llgmm_assign f_process_rau_accept
f_process_rau_accept can send the RAU Complete over the correct BSSGP

Change-Id: Ib9a65f0d09d3689911843a1b40e2a4114710e5b5
2018-09-04 16:22:24 +00:00
Stefan Sperling 91d4c9dcf5 update DTX fill frame test expectations
Fix an off-by-one in frame number comparison: Ensure that we
won't stop testing until after fn + 104 has been received.

The DTX test case would never pass since the alt statement
was always repeated even if enough frames had been received.
Fix this by moving code which runs before frame fn + 104 is
received into an 'else' cause.

We receive SACCH frames in DTX mode so we must account for them.
Introduce separate counters for SACCH and non-SACCH fill frames
to make test failure diagnosis easier. Note that we cannot expect
a specific amount of SACCH frames during a particular test run
since their amount depends on what the current frame number window
happens to be. We can however add the counters for SACCH and
non-SACCH fill frames and obtain a meaningful result.

Change-Id: Ie573b54ab5654f027c470aa7a565d2b5b97dc74b
Related: OS#1950
2018-09-04 11:55:50 +02:00
Stefan Sperling 6a90be4bae improve connection failure message in IPA emulation
Show addresses and ports which were attempted in the IPA
connection failure message.

Example output:
Verdict: fail reason: Could not connect IPA socket from "" port -1 \
	to "127.0.0.1" port 4238; check your configuration

Change-Id: I828fe67d66bcd668aa14922b89a2feac56dc2d9a
2018-08-31 15:07:40 +02:00
Philipp Maier d65d05634c bts_tests: do not define bs_ag_blks_res in multiple locations
The parameter bs_ag_blks_res is currently defined in ts_SI3_default and
in each PagingTestCfg record. When the parameter is changed in
PagingTestCfg it must be changed in ts_SI3_default as well in order to
have coherent settings in the stestsuit and in the BTS. This can be
quite confusing so lets use the setting from ts_SI3_default when
populating PagingTestCfg to have the value of the constant in one place
only.

Change-Id: I5cbdb31c8398aa241faca34e850388d5e1682167
Related: OS#1575
2018-08-30 18:15:10 +00:00
Stefan Sperling 02585905fb show return code when sending L1CTL_FBSB_REQ fails
Provide a little bit more information when a BTS test fails
due to L1CTL FBSB failure.

Example output:
Test case TC_si_sched_default finished. Verdict: fail reason: \
  FBSB Failed with non-zero return code 255

Change-Id: I5e8f23a2615b64bdf3167d486ba808c93f0f4b23
2018-08-30 17:06:48 +02:00
Alexander Couzens f3c1b41fe4 sgsn: don't re-use the same NS for all 3 BSSGP
Create for every BSSGP a new NS instance.

Change-Id: I3448fe837eaa8efab65dccc32bacaaacd73a2f09
2018-08-28 14:27:08 +02:00
Neels Hofmeyr 3bf31d216a fix SCCPlite BSC tests: send IPA ID ACK, not GET
From libosmo-sccp.git Icffda98579e676ab6ca63c9c22cf5d151c4fe95f on, we expect
an IPA ID ACK upon first connecting, not an IPA ID GET. This might be specific
to the one MSC tested so far, but it's the status quo.

Make the IPA server in IPA_Emulation configurable, to conform and send the IPA
ID ACK upon connecting.  This fixes the ttcn3-bsc-tests,SCCPlite suite, broken
by above libosmo-sccp commit.

For other IPA clients, it is so far required to send the IPA ID GET, so only
configure the SCCPlite server in BSSAP_Adapter.ttcn to send IPA ID ACK, and
leave the others unchanged.

Related: OS#3500 OS#3498
Related: Icffda98579e676ab6ca63c9c22cf5d151c4fe95f (libosmo-sccp)
Change-Id: I34b6296a1a408729802a9659c6524c0f67a2f4fe
2018-08-24 18:29:48 +02:00
Neels Hofmeyr da4a695834 log / comment tweaks
BSC_Tests: sprinkle logs to illustrate what the dyn PDCH tests expect.

BSC_Tests: tweak comment to mention that inter-BSC HO MT *does* allow N-CONNECT
from MSC.

f_tc_assignment_fr_a5_1_codec_missing: mark the missing IE beyond doubt.

Change-Id: I93c2914e766e200d89308cc81dd803e939b9b28c
2018-08-22 19:56:12 +00:00
Daniel Willmann e8018967de MSC_Tests: Reliably pass TC_cr_before_reset
I was able to reproduce the sporadic cr_before_reset failures by running
both osmo-{stp,msc}-master with --cpus 0.1. In that case the first test
run would fail for me because no BSSMAP RESET ACK was seen. Sleeping
some seconds before sending the messages will make sure all components
are connected.

Note: TC_cr_before_reset is the first test executed in control so this
seems to be why it sometimes fails in jenkins.

Change-Id: Id745470231950e0a284f8c231246d3719f7617cc
2018-08-21 14:18:00 +02:00
Alexander Couzens 56101c935e BSSGP_Emulation: dont fail when removing a non-exitent client
On multiple BSSGP tests the IMSI might not anymore registered to the first BSSGP

Change-Id: Ibad8971e5acc2691da29cf7fa394d1d58eea79a4
2018-08-14 13:26:47 +00:00
Alexander Couzens 7eb5b85f39 BSSGP_Emulation: remove unused BSSGP_SP.receive(PDU_L3_MS_SGSN)
As the llc is handled outside, this function is not anymore needed

Change-Id: Ib910dec4a54e155573c162a70731f20cbf1e9c5d
2018-08-14 13:26:47 +00:00
Alexander Couzens cdfb7515ba BSSGP_Emulation: move LLC layer out of BSSGP
The LLC layer needs to be accessed by the SGSN tests
in order to do multi-BSSGP tests.
Otherwise the sgsn will see LLC frame with wrong sequence
numbers and drop them.

Change-Id: Ie9e9d7da0a78a96f4f431c9085b9e273a39535f1
2018-08-14 13:26:47 +00:00
Alexander Couzens 6b449fbf84 BSSGP_Emulation: add type record LLC_Entities
In prepartion of moving the LLC layer out of the BSSGP

Change-Id: I1a8c6a608c84a984e542510482bbfc5394ae6658
2018-08-14 13:26:47 +00:00
Alexander Couzens 8950870d40 sgsn: add f_cellid_to_RAI()
Returns a RoutingAreaIdentificationV from GbInstance. This will be useful
when using multiple BSSGP and the g_pars.ra field is not the needed ra.

Change-Id: Ide96213ab2f210590b86deaf370486c8a0a78058
2018-08-14 13:26:47 +00:00
Alexander Couzens bfda92144f sgsn: introduce TC_attach_rau_a_a()
MS <-> SGSN: Successful Attach
MS  -> SGSN: Routing Area Update Request
MS <-  SGSN: Routing Area Update Accept
MS  -> SGSN: Routing Area Update Request
MS <-  SGSN: Routing Area Update Accept
MS  -> SGSN: Detach (PowerOff)

Change-Id: Id76b4792c07816bcbe5e965f23c2b526df0923c3
2018-08-14 13:26:47 +00:00
Alexander Couzens 5dce90da14 sgsn: introduce f_routing_area_update()
Will be used by future RAU tests

Change-Id: I4064e013f73319f24bb893a9047c8b9eb7d6aac2
2018-08-14 13:26:47 +00:00
Alexander Couzens 51114d1d9b sgsn: create 3 instances of BSSGP at the same time
Allows to use different BSSGP connection within a single
test.

Change-Id: I01d7f264a0a52e248d6e754485c807266c0b14bf
2018-08-14 13:26:47 +00:00
Alexander Couzens 0e510e693d BSSGP_Emulation.ttcn: extend BSSGP_Client_CT to hold 3 instances of BSSGP
Change-Id: Ibd7abba826a08b582361e9c255e9c44185e14067
2018-08-14 13:26:47 +00:00
Stefan Sperling 05e87f20c8 fix expectations of TC_lu_imsi_reject and TC_lu_imsi_timeout_gsup
These tests were expecting two ClearCommands, but the MSC will
only send one. Remove redundant calls to f_expect_clear() outside
of the alt step. The expected ClearCommand is received inside the
alt step.

Change-Id: I77f189d9050a06fe6eac457312285cf173c842d5
2018-08-14 11:39:17 +02:00
Alexander Couzens 2c12b24a47 NS_Emulation: support multiple instances at the same time
The NS_Emulation has configuration values hardcoded or bound
to module parameters which prevents multiple instances.
Replace the module parameter based configuration with configuration
given when starting the NS_Emaulation.

Change-Id: I9128f9ad5c372779c38799269393137ba52576cd
2018-08-13 16:23:50 +00:00
Daniel Willmann f4ac4cea51 bsc: Wait for immedate assignment in f_chreq_act_ack
Sometimes TC_chan_rel_hard_rlsd_ms_dead could fail because the Immediate
assignment command would arrive in the RSL queue after it was cleared in
f_expect_chan_rel. The alt statement would now never complete since the
Immediate Assignment was blocking/hogging the queue. Wait explicitly for
the IMM ASS in f_chreq_act_ack before continuing.

Change-Id: I2831d4caf7f045b3396d28a978328e8a1097d8d3
2018-08-10 07:20:11 +00:00
Stefan Sperling 4880be4385 add DTX fill frame BTS tests
Add tests TC_tch_sign_l2_fill_frame and TC_tch_sign_l2_fill_frame_dtxd.

TC_tch_sign_l2_fill_frame is already passing and verifies that fill
frames are sent if there is nothing else to transmit on a SDCCH4/SDCCH8,
TCH/H, or TCH/F signalling channel where DTX is disabled for downlink.

TC_tch_sign_l2_fill_frame_dtxd is currently failing. It verifies that
only specific fill frames are sent, as required by GSM 05.08 for TCHF
signalling channels with DTX enabled for downlink. At present, our
implementation generates no fill frames in this case, which is one
piece of the problem described in issue OS#1950.

Change-Id: Id4e0de6e78b62cd408f600a57a28617d91da64af
Related: OS#1950
2018-08-09 11:08:44 +00:00
Alexander Couzens 5e2ba75b48 sgsn: fill g_gb configs for the remaining Gb interfaces
When testing with multiple Routing Areas, multiple Gb
interface are required.

Change-Id: I7f56618110f04d99b1b43e69d89167e384b61a34
2018-08-09 03:26:43 +02:00
Harald Welte 4ea1f8a114 HLR: Actual USSD test cases
Change-Id: I74a3419140179b1625e82d1298864e424fb81398
2018-08-08 11:06:34 +02:00
Harald Welte 4a3242ebb2 hlr: actually register simulated MSC as "MSC" identity to HLR
Change-Id: I3b6dc719318db8aef960f3249c16c20deb5793a7
2018-08-08 11:06:34 +02:00
Harald Welte f9d449edd6 HLR: Add HLR_EUSE.ttcn to implement minimal external USSD Entity
As OsmoHLR is getting support for external USSD Entities (EUSEs),
we have to implement this function in the test logic in order to
test it.

Change-Id: Ibab210b06abfd5a21e81c7f7fbe574c4f67414a0
2018-08-08 11:06:31 +02:00
Harald Welte e490438672 hlr: Link required libraries for USSD / SS messages
Change-Id: I4501a4843b412dc06051c5e037764e581de1977a
2018-08-07 23:32:32 +02:00
Harald Welte b409ff2819 move USSD_Helpers.ttcn to library
We want to use those also from the HLR_Tests, not just from MSC_Tests.

Change-Id: I22be6c03d85dc6d6a8266b5ebce5d0c69c0551ed
2018-08-07 23:32:32 +02:00
Alexander Couzens 5e71c14750 sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround shutdown problems
When introducing multiple BSSGP instances, this
tests has problem when shutting down the test.

Change-Id: I0cd1adf072f8ba40343e51e41f23a1de6a2bd62c
2018-08-07 18:12:52 +00:00
Daniel Willmann 42d1d5baf7 Call f_bssap_start in TC_cr_before_reset
This function starts the SCCP component which will relay the BSSAP
messages to/from port SCCP_SP_PORT which is connected to BSSAP_DIRECT.

Ticket: OS#3286
Change-Id: Icee085d5fe610061c85d7fe7cf62cbccd8cfa556
2018-08-07 18:15:59 +02:00
Harald Welte 95686e0bd7 IPA_Emulation: Add missing zero byte to strings in IPA CCM ID RESP
Change-Id: I3fdc0f47381d5ba1763197d5f264696f04d0396f
2018-08-02 15:14:03 +02:00
Daniel Willmann 43a1a0be9e mgw: Don't try to send packets while MDCX is underway
TC_two_crcx_and_one_mdcx_rtp_ho sometimes failed while trying to send an
RTP packet without a connected port. f_flow_modify re-bind()s the port,
sends the MDCX and then connect()s it after the MDCX ACK returned the
IP/port combination.
If the transmit timer fires off between the bind and connect the
resulting send call will fail.

Change-Id: Idf93ceb830a44dafa56430ab5178f05da6bdd6fb
2018-08-01 17:55:54 +02:00