AgeCommit message (Collapse)AuthorFilesLines
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: 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
2018-07-25MGCP_Test: add function to check for RTP err countersPhilipp Maier2-47/+50
At the moment we check the error counters of the RTP statistics in the testcases. However, in most situations we will do the check to make sure that no errors occurred (all counters == 0). Rather than having a long tail of if statements in the testcases we should have a function for this. This also makes it much easier in case we add more error countes lateron. - add and use function f_rtpem_stats_err_check() Change-Id: I69e5f80b0765284ec99056ce62c315461967d2a1 Related: OS#3384
2018-07-25fix length of frame generated by f_TC_rll_ud_indStefan Sperling1-1/+1
Because trxcon now requires frames of a minimum size some BTS tests which send unpadded frames with a short payload have started to fail. Extend the payload size generated by f_TC_rll_ud_ind() to make TC_rll_unit_data_ind_DCCH pass again. Change-Id: Ibaa4124ebdec96623f48c38fac702e9bbd843869 Related: OS#3415
2018-07-25bsc: stop all components before terminating testcaseDaniel Willmann1-0/+1
It seems mtc.stop() alone does not really solve the race conditions when shutting down components. The error happens when messages are sent on ports which are no longer connected since the receiving component has terminated. Some web search suggested that one should stop all components before calling mtc.stop (slide 38). Slide 33 also mentions the difference between .stop and .kill. Kill removes the port connections while stop does not. And I think looking at the logs when the testcase teminates (through mtc.stop or otherwise) it is internally calling kill on all the components. So hopefully stopping all components and then stopping the mtc will fix this nasty issue. I verified locally that the situation improves between commits now when running BSC_Tests.TC_paging_imsi_nochan_all 20 times in a loop and otherwise generating load on the system. It reliably failed before this patch and I wasn't able to get it to fail with it. Change-Id: I398883492919ceabcf94b5cc2361c63ec772d9d5
2018-07-25BTS: fix length of frames generated by f_TC_chan_act_encrStefan Sperling1-1/+1
Since trxcon now drops L2 frames of an incorrect length, some BTS tests which send unpadded frames with a short payload have started to fail. Extend the payload size generated by f_TC_chan_act_encr() to make these tests pass again: TC_chan_act_a51 TC_chan_act_a52 TC_chan_act_a53 Found by: Vadim Yanitskiy Related: OS#3415 Change-Id: I0f9a40503a4ed4fce10d9655f845ac49d33f4041
2018-07-24introduce a TTCN3 test suite for SCCPStefan Sperling12-17/+336
This test suite acts as an SCCP server on top of M3UA. SCCP tests are run against the sccp_demo_user program which can be found in libosmo-sccp/examples. This program must be started in client mode: sccp_demo_user -c The SCCP test suite should then work out of the box with the provided SCCP_Tests.cfg file and this additional change to sccp_demo_user default point codes: There is currently only one test, for the libosmo-sccp crash reported as issue OS#2666. The implementation of this test is currently using an ugly workaround due to shortcomings of the M3UA Emulation layer (see source code comments). Whether a better solution is feasible is still to be determined. The test requires a patch to the SCCP Protocol Emulation which has been submitted upstream: Change-Id: I03f5e8b282a7396b45417495c88d8fb81b26cda8 Related: OS#2666
2018-07-24MGCP_Test: check payload type of received RTP packetsPhilipp Maier2-0/+36
When an RTP packet is received, the payload type is not checked, so we will not detect if the MGW emits packets with a wrong payload type for some reason. - Introduce a statistics counter that counts packets with wrong PT - Update testcases so that they check for the statistics for wrong PT count. Change-Id: I83d4b04656a16ced624024245a2fcb7a0ad48a8a Related: OS#3384
2018-07-24Reply to wildcard ep in CRCX with a concrete endpointDaniel Willmann1-0/+1
BSC_ConnectionHandler.ttcn:563 This helps TC_gsup_cancel which previously encountered a Dynamic test case error: Using the value of an optional field containing omit. The test still fails, but this time because it "Received unexpected BSSAP instead of CM SERV REJ". Change-Id: I9fedf2573487066b951804a328ba428d2189c4a4
2018-07-24Fail if f_streamId_by_trx() can't find a stream idDaniel Willmann1-1/+2
Change-Id: Ie58278edf7050254d7cdced48b4b7870e0e8d577