aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-09-04sgsn: fix TC_attach_check_complete_resendAlexander Couzens1-1/+4
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-04sgsn: increase the timeout of some TCAlexander Couzens1-7/+7
Because of multiple BSSGP connections, the tests need more time to complete. Change-Id: I12baf4b2425d0d862755d03d16127b18968e28f2
2018-09-04sgsn: use vty cmd `reset sgsn state`.Alexander Couzens1-1/+2
Cleans most of the sgsn state. Depends on the SGSN commit I92096f3f6ea49e75676e30e9921d00210bac5382. Change-Id: Idff3de6f1b8f5cb503edc5c6256ce2bf7ec7aaa2
2018-09-04sgsn: introduce TC_attach_rau_a_bAlexander Couzens1-0/+34
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-04sgsn: add optional bssgp index for f_upd_ptmsi_and_tlli ↵Alexander Couzens1-10/+10
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-04update DTX fill frame test expectationsStefan Sperling1-19/+47
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-08-31improve connection failure message in IPA emulationStefan Sperling1-1/+2
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-30bts_tests: do not define bs_ag_blks_res in multiple locationsPhilipp Maier1-4/+8
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-30show return code when sending L1CTL_FBSB_REQ failsStefan Sperling1-2/+3
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-28sgsn: don't re-use the same NS for all 3 BSSGPAlexander Couzens2-14/+27
Create for every BSSGP a new NS instance. Change-Id: I3448fe837eaa8efab65dccc32bacaaacd73a2f09
2018-08-24fix SCCPlite BSC tests: send IPA ID ACK, not GETNeels Hofmeyr2-3/+20
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-22log / comment tweaksNeels Hofmeyr1-1/+11
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-21MSC_Tests: Reliably pass TC_cr_before_resetDaniel Willmann1-0/+2
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-14BSSGP_Emulation: dont fail when removing a non-exitent clientAlexander Couzens1-2/+2
On multiple BSSGP tests the IMSI might not anymore registered to the first BSSGP Change-Id: Ibad8971e5acc2691da29cf7fa394d1d58eea79a4
2018-08-14BSSGP_Emulation: remove unused BSSGP_SP.receive(PDU_L3_MS_SGSN)Alexander Couzens1-8/+0
As the llc is handled outside, this function is not anymore needed Change-Id: Ib910dec4a54e155573c162a70731f20cbf1e9c5d
2018-08-14BSSGP_Emulation: move LLC layer out of BSSGPAlexander Couzens2-35/+54
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-14BSSGP_Emulation: add type record LLC_EntitiesAlexander Couzens1-0/+2
In prepartion of moving the LLC layer out of the BSSGP Change-Id: I1a8c6a608c84a984e542510482bbfc5394ae6658
2018-08-14sgsn: add f_cellid_to_RAI()Alexander Couzens1-0/+16
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-14sgsn: introduce TC_attach_rau_a_a()Alexander Couzens1-0/+31
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-14sgsn: introduce f_routing_area_update()Alexander Couzens1-14/+21
Will be used by future RAU tests Change-Id: I4064e013f73319f24bb893a9047c8b9eb7d6aac2
2018-08-14sgsn: create 3 instances of BSSGP at the same timeAlexander Couzens1-56/+65
Allows to use different BSSGP connection within a single test. Change-Id: I01d7f264a0a52e248d6e754485c807266c0b14bf
2018-08-14BSSGP_Emulation.ttcn: extend BSSGP_Client_CT to hold 3 instances of BSSGPAlexander Couzens3-112/+112
Change-Id: Ibd7abba826a08b582361e9c255e9c44185e14067
2018-08-14fix expectations of TC_lu_imsi_reject and TC_lu_imsi_timeout_gsupStefan Sperling1-2/+0
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-13NS_Emulation: support multiple instances at the same timeAlexander Couzens5-38/+62
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-10bsc: Wait for immedate assignment in f_chreq_act_ackDaniel Willmann1-0/+1
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-09add DTX fill frame BTS testsStefan Sperling3-4/+196
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-09sgsn: fill g_gb configs for the remaining Gb interfacesAlexander Couzens1-0/+26
When testing with multiple Routing Areas, multiple Gb interface are required. Change-Id: I7f56618110f04d99b1b43e69d89167e384b61a34
2018-08-08HLR: Actual USSD test casesHarald Welte1-3/+338
Change-Id: I74a3419140179b1625e82d1298864e424fb81398
2018-08-08hlr: actually register simulated MSC as "MSC" identity to HLRHarald Welte1-0/+1
Change-Id: I3b6dc719318db8aef960f3249c16c20deb5793a7
2018-08-08HLR: Add HLR_EUSE.ttcn to implement minimal external USSD EntityHarald Welte2-0/+135
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-07hlr: Link required libraries for USSD / SS messagesHarald Welte2-3/+19
Change-Id: I4501a4843b412dc06051c5e037764e581de1977a
2018-08-07move USSD_Helpers.ttcn to libraryHarald Welte2-1/+1
We want to use those also from the HLR_Tests, not just from MSC_Tests. Change-Id: I22be6c03d85dc6d6a8266b5ebce5d0c69c0551ed
2018-08-07sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround shutdown problemsAlexander Couzens1-1/+10
When introducing multiple BSSGP instances, this tests has problem when shutting down the test. Change-Id: I0cd1adf072f8ba40343e51e41f23a1de6a2bd62c
2018-08-07Call f_bssap_start in TC_cr_before_resetDaniel Willmann1-0/+2
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-02IPA_Emulation: Add missing zero byte to strings in IPA CCM ID RESPHarald Welte2-2/+2
Change-Id: I3fdc0f47381d5ba1763197d5f264696f04d0396f
2018-08-01mgw: Don't try to send packets while MDCX is underwayDaniel Willmann1-0/+2
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-07-31BSC_Tests: Avoid race condition between paging cmd and reset ackDaniel Willmann1-0/+4
Sometimes (under heavy load and when the last paging cmd arrives near the reset ack) some messages are not enqueued in the IPA_RSL port after we have received the reset ack from BSSAP. In the failures I have seen wireshark reports that no paging cmd arrived after the reset ack, see jenkins job 285: https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test/285/ Adding a sleep is always a bit crude, but since the paging cmd is scheduled through TCP while the reset ack is sent through sctp I don't see another way. Running the test under load in a loop showed improvements where I was not able to reproduce the failure with this patch. Change-Id: Ib2d60e2c59baf98e437e078d844adcc6dbdbfcd8
2018-07-30msc/USSD: introduce TC_lu_and_mo_ussd_mo_releaseVadim Yanitskiy2-0/+99
The idea of this test case is to check the reaction of OsmoMSC on MS-initiated release during an active transaction. In other words, when the network is waiting for some response from a MS, subscriber can press the 'red button' in order to terminate this conversation. It is expected that the MSC would terminate the transaction as on DTAP interface, as on GSUP interface. Change-Id: I7936ed5072ed2ae02f039dc90a1fece1e7f70a70
2018-07-30msc/USSD: add test cases with network-initiaded SS/USSDVadim Yanitskiy2-0/+209
This change introduces two new test cases for network-initiaded USSD notification and network-initiaded USSD request, which are based on the existing SS/USSD related test cases. The idea of TC_lu_and_mt_ussd_notification is to verify that a network-initiaded USSD notification can arrive subscriber in IDLE mode using Paging procedure. The idea of TC_lu_and_mt_ussd_during_mt_call is to verify that a network-initiaded USSD notification can arrive subscriber in DEDICATED mode (in this case during a call) on a separate transaction. Change-Id: I073893c6e11be27e9e36f98f11c1491d0c173985
2018-07-30msc/USSD: expect and reply SS/USSD messages over GSUPVadim Yanitskiy1-40/+81
As we are about to finish the implementation of GSM TS 09.11, OsmoMSC will forward all SS/USSD messages over GSUP to HLR, and will expect responses back from HLR. The SS/USSD payload processing will be out of scope for OsmoMSC itself. Let's modify the existing test cases in order to expect and reply SS/USSD messages over GSUP protocol. Change-Id: I01de73aced6057328a121577a5a83bc2615fb2d4
2018-07-30msc/USSD: introduce common GSUP/DTAP matching functionsVadim Yanitskiy1-0/+42
In order to avoid code duplication in the upcoming test cases, let's introduce a few functions which basically do a GSUP/DTAP message matching within the alternative statement. Change-Id: I846c2d40a7c37afa8647e644673b4df905e3e116
2018-07-27detect VTY TELNET port connection failures (attempt #2)Stefan Sperling9-0/+17
Pass the CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT parameter to the TELNET port by default. This allows tests to make progress into an error handling path if they are started while the osmo-* program they want to connect on VTY is not running. Observed with osmo-ggsn tests, where if the one test runs into a VTY connection failure the subsequent test would get stuck forever in a map() call on the VTY TELNET port. Teach the function f_vty_wait_for_prompt() about connection reports by the TELNET module. We may now receive an integer which represents the socket file descriptor for the telnet connection. This case was not handled by the previous change made in commit cb111b21aba1d5881da1a1d3f19754cbd15b3779. As a result, BSC tests started failing with "VTY Timeout for prompt" because the alt-statement in f_vty_wait_for_prompt() would not progress past the integer sitting on the VTY port's receive queue. Change-Id: I56925f93af6c55e93f3f417099db135744da6a40 Related: OS#3149
2018-07-27BTS: enable encryption + RLL tests for Bm (TCH/F) channelsVadim Yanitskiy1-1/+1
Due to OS#3418, both encryption and RLL tests have been failing. It's time to enable Bm (TCH/F FACCH) channel related tests now! Please note that Lm (TCH/H) remains disabled because of OS#3419. Change-Id: I7c0f9f9f695e089e4a30f63ec362d1e6c18abff0 Related: OS#3256
2018-07-27BTS: fix: pad LAPDm frames before sending via L1CTLVadim Yanitskiy1-2/+8
Thanks to Stefan Sperling, a critical bug was discovered in trxcon. The problem was that length of LAPDm frames was not checked before passing them to the libosmocoding API. So, if a received LAPDm frame is shorter than expected (i.e. 23 bytes), then: - in case of xCCH, there was a heap overflow (detected by ASAN), so a short frame has been encoded together with some garbage outside the primitive buffer... - in case of FACCH, as the length != 23, a frame was recognised as a speech frame, and also encoded together with some garbage. Since the bug is fixed (OS#3415), some TTCN-3 BTS tests started to fail, because most likely it was assumed that trxcon would pad the frames automatically, but it doesn't and shouldn't. Let's automatically pad LAPDm frames with 0x2b before sending. Change-Id: I16cba4e4179456bebabf0638760af011a27fd333 Related: OS#3418
2018-07-27Revert "detect VTY TELNET port connection failures in TTCN3 tests"Neels Hofmeyr8-8/+0
With this patch, I see all ttcn3-bsc-tests failing with "Verdict: fail reason: VTY Timeout for prompt" This reverts commit cb111b21aba1d5881da1a1d3f19754cbd15b3779. Change-Id: I215d7ab5eee75cf6d3afaac760af64356c943140
2018-07-27detect VTY TELNET port connection failures in TTCN3 testsStefan Sperling8-0/+8
Pass the CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT parameter to the TELNET port by default. This allows tests to make progress into an error handling path if they are started while the osmo-* program they want to connect on VTY is not running. Observed with osmo-ggsn tests, where if the one test runs into a VTY connection failure the subsequent test would get stuck forever in a map() call on the VTY TELNET port. Change-Id: I9acf7793d5d68aec6d087cff254a10d8b673dab1 Related: OS#3149
2018-07-26update expected test result for TC_sacch_multi_chgStefan Sperling1-3/+1
This test has been passing since osmo-bts commit eee7247ebe0d0a54a54b53b739bdd434dfceb511, so expect it to pass instead of fail. Change-Id: I576f881fcb40c4fcbe6b6f767220111a0e9ffd3c Related: OS#3173
2018-07-26msc: Fix random error of TC_cl3_rnd_payloadDaniel Willmann1-1/+5
The random length for that test could go out of bounds leading to a Dynamic test case error when sending the message. The limiting field here is the lengthIndicator of PDU_BSSAP which includes the length of the PDU_BSSMAP mesageType, cellId as well as the layer3 info IE and lenght indicator additionally to the l3info payload. So maximum length for the payload can only be 240 bytes (if the cell ID is encoded in the longest possible way as BSSMAP_FIELD_LAC_RNC_CI). Change-Id: I7be33e261a11f03a80a6b770b6acf0a4be49b85b
2018-07-26bts: Stop all components before mtc.stop in f_shutdownDaniel Willmann1-0/+1
This is the bts version of patch 637ef6c8 Again I picked a test that sometimes failed - BTS_Tests.TC_sacch_info_mod - and ran it 20 times before and after this commit. Before it failed roughly half the time with a DTE and after I was not able to make it fail. Change-Id: I96f02037283b79a93ef4d659b00a90ac519c0a75
2018-07-25MGCP_Test: Test what happens when two ends use different PTPhilipp Maier2-5/+24
It is legal that two connections use the same codec but negotiate different dynamic payload types for both connections. Then the MGW is expected to receive packets with one PT and send them with the other PT. This is currently not done in osmo-mgw so the two tests that this commit adds are expected to fail for now. - add testcase TC_two_crcx_diff_pt_and_rtp - add testcase TC_two_crcx_diff_pt_and_rtp_bidir Change-Id: Ib4606dfc08764410ee9e450949361544adb07cd3 Related: OS#3384