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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 cb111b21ab. 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
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
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
With this patch, I see all ttcn3-bsc-tests failing with
"Verdict: fail reason: VTY Timeout for prompt"
This reverts commit cb111b21ab.
Change-Id: I215d7ab5eee75cf6d3afaac760af64356c943140
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
This test has been passing since osmo-bts commit
eee7247ebe0d0a54a54b53b739bdd434dfceb511, so expect
it to pass instead of fail.
Change-Id: I576f881fcb40c4fcbe6b6f767220111a0e9ffd3c
Related: OS#3173
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
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
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
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
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
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
http://www.ttcn-3.org/TTCN3UCAsia2007/Presentations/TTCN3%20UC%202007%20Concurrent%20TTCN.pdf
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
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