Add two helper functions which retry a VTY command until the
result matches a regular expression or a configurable timeout
expires.
Use these functions in BSC test's f_ts_dyn_mode_get, which has
seen sporadic failures due to a race condition during channel
reconfiguration, in order to hopefully close this race.
Change-Id: I308ddb06e440c165fe1e73fe2c1fb78be2e1d510
Related: OS#3690
The receive template for the BSSMAP HANDOVER PERFORMED MESSAGE is
missing, lets add one.
Related OS#3645
Change-Id: I527913203b2d5bfa26c181c4bb79481a9cd283ae
Drop 'return' statements after 'mtc.stop' as they cause following
warning from TTCN-3 compiler:
warning: Control never reaches this statement
Change-Id: I6210ecf5fcb39f751116ad63a69d2ae8651a60c5
We cannot notify RSL Emulation layer about expecting a specific FN
(during ts_RSLDC_ChanRqd) because we only know the FN after sending the
RACH request, and since notification to RSL Emulation happens async, it
can happen (verified) that ChanRqd message from BTS arrives and is
handled before we register the RACH req into the ConnectionTable.
Change-Id: I438fd3ee82d88498d928dbcc89ce9bd80d37ab64
this allows us to match on specifically 3G MM AUTH REQ, whereas
so far we only had a generic template that matched the 2G and 3G
auth req.
Change-Id: I392d61d1348bee9c88abe4bb938e99b2c3702a94
Matching the CONFIG prompt using implicit '\w+(*)' pattern is
a bad idea, because it can actually match almost anything:
- 'OsmoBlaBla(config)# ',
- 'OsmoBlaBla(config) ',
- 'OsmoBlaBla> ',
- 'Mahlzeit'!
One problem is that the parentheses are interpreted as a matching
operator (which is used to group an expression), so they should
have been escaped by '\'. Another problem is that this pattern
is not complete, because '\# ' is missing. Let's fix this!
Change-Id: I8a0e3fcfb0c4e5854b7b1e39296052e679c63c73
Related: OS#3675
Otherwise RSL layer fails this way when this event is received:
RSL_Emulation.ttcn:429 Receive operation on port IPA_PT succeeded, message from TC_chan_act_a51-RSL-IPA(3): @IPA_Emulation.ASP_IPA_Event: { up_down := ASP_IPA_EVENT_DOWN (0) } id 9
- Function main_client was stopped. PTC terminates.
RSL_Emulation.ttcn:429 Message with id 9 was extracted from the queue of IPA_PT.
RSL_Emulation.ttcn:430 setverdict(fail): none -> fail reason: "Received unknown primitive from IPA", new component reason: "Received unknown primitive from IPA"
We now fail with a clearer message "Lost IPA connection!". These
failures seem to happen under high load when the BTS doesn't get a
steady clock from osmo-trx.
Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
This function can now be called from anywhere to try and safely shutdown
a testcase. It is not optimal as we can't call "all component.stop" from
outside the mtc, but without any proper and orderly shutdown handling of
all our emulation components I believe this is the best we can do.
To use it:
import from Misc_Helpers all;
in your module and then call
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
You can also pass the function a verdict and a message and it will take care
of calling setverdict, but beware of the following:
While setverdict would accept any number of arguments as log message
and convert them to a log string f_shutdown expects one charstring.
It's possible to use the log2str function to use the log arguments in
setverdict for f_shutdown, for example
setverdict(fail, "Template didn't match: ", tmpl_foo);
would become
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Template didn't match: ", tmpl_foo));
Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
Absolute form of FAKE_RSSI command shall contain an optional
threshold value. Otherwise it's interpreted as relative form.
Change-Id: Ief89b2601277488bb1782b981aff1061ddaa6637
Add another IPA test to the BTS and BSC test suites.
This new test sends the header in one burst, followed by the
payload which is transmitted byte-per-byte.
The test uses an ID REQ message. If acting as a server, the test
can expect an ID RESP message. However, if acting as a client, the
server will close the connection when it receives the ID REQ.
The CTRL interface port on the BSC does not close the connection in
this case, so that particular port is skipped by the test for now.
Change-Id: If75cb90841bb25619b414f0cabe008a2428a9fdf
Related: OS#2010
Depends: I4804ccabd342b82d44e69dbc6eaaae220ec7d4e4
Run the chopped IPA ping test from the IPA_Testing module
as part of the BTS test suite. Contrary to the BSC version
of this test, this test listens for an IPA connection rather
than connecting to an IPA server. Make code in the IPA_Testing
module for accepting connections actually work.
Change-Id: I4804ccabd342b82d44e69dbc6eaaae220ec7d4e4
Related: OS#2010
RSPRO is the protocol used by osmo-remsim. It is embedded into an IPA
multiplex, and hence the TTCN-3 IPA code needs some extension to cover
support for it.
Change-Id: I536d6843b3e65b3ee35fbbcd6353e0fb0ce21c8e
There are two distinct types defined for a Mobile Identity LV IE.
One type definition lives in GSM_RR_Types and defines the "canonical"
IE form, with a full octet for the length.
Another one lives in RLCMAC_CSN1_Types which defines how a mobile
identity appears in paging requests. In this case, the length field
is only 4 bits in size. Rename this latter type from MobileIdentityLV to
MobileIdentityLV_Paging and add a comment to highlight this distinction.
TS 144 060 Table 11.2.10.2 explicitly states that only the value
part of this IE matches the definition of the canonical IE as
"defined in 3GPP TS 44.018" (actually, TS 44.018 further redirects
the reader to TS 124 008; see section 10.5.1.4 there).
As an aside, a third definition of the MobileIdentityLV type exists
in MobileL3_CommonIE_Types, which matches the "canonical" form.
Change-Id: I990316cd5ef5aaf079b03c344e3185ae6ab8ba6d
Related: OS#2404
This new module allows us to test IPA code in libosmocore
and libosmo-netif. Currently only one test is implemented,
which sends a chopped IPA ping message and expects to receive
an IPA pong.
The system under test is any IPA speaker on any TCP port.
Any test suite may call parametrized functions to create
an IPA testing component and run a particular test.
So far, one such test has been added to the BSC_Tests suite.
Change-Id: I246a405414e36a44dc1e308692faab8bf04da0e6
Related: OS#2010
This is quite useful when one needs to expect an RSL UNITDATA
message with any payload. Let's set 'l3_info' to '?' by default,
like it's already done for 'ts_RSL_DATA_*'.
Change-Id: I45260343b34d8d054e7efa72de11dd4cb510a8cc
The 'tr_RSL_UNITDATA_IND' is a 'response' template, so there
is no reason to restrict 'link_id' to any obvious value.
Change-Id: I29ac0a2828b565baa1d2f3ac0a922bc441378f94
Add f_gen_handover_req() like f_gen_ass_req(), to match AoIP or SCCPlite
requirements.
For incoming HO, MSC_ConnHdlr needs to know the SCCP addresses to expect the
incoming SCCP Connection from MSC to BSC. Add 'handover' section to
TestHdlrParams, and pass in the addresses from test_CT via that.
In osmo-bsc.cfg, add a remote neighbor config, so that the VTY command
'handover any to arfcn 123 bsic any' can trigger an outgoing inter-BSC HO.
Add various BSSMAP handover templates to BSSMAP_Templates.ttcn.
Add RR Ho Command template to L3_Templates.ttcn.
Move ts_BSSAP_Conn_Req() from msc/BSC_ConnectionHandler.ttcn to
library/BSSMAP_Emulation.ttcn, so we can also model an SCCP Connection Request
in BSC_Tests.ttcn (this time from MSC to BSC).
Add the two new tests to bsc/expected-results.xml.
Related: OS#2283
Change-Id: Id22852d4be7f127d827e7a8beeec55db27c07f03
After osmo-msc I73c7cb6a86624695bd9c0f59abb72e2fdc655131, osmo-msc
sends a BSSMAP Classmark Request if encounters a missing Classmark,
which is the case during LU when A5/3 is enabled.
Fix this test by answering the Classmark Request, if any.
Change-Id: I25578c050b7e105ed71b064891d4cd418ee30fcf
Enhance TC_classmark to also include the BSSMAP Classmark Request -> RR
Classmark Enquiry part. So far it was only testing the return path of RR
Classmark Change -> BSSMAP Classmark Update.
This test will thus fail with current osmo-bsc master, and will succeed as soon
as osmo-bsc If5db638fd6e8d9c2ef9e139e99f0fabe1ef16ddf is merged.
Add:
* ts_BSSMAP_ClassmarkRequest in BSSMAP_Templates.ttcn
* tr_RRM_CM_ENQUIRY in L3_Templates.ttcn
Change-Id: Idaab4d568cf986b4897ba008f6262c839d1592fb
The existing Osmocom_VTY_Functions code was centered around a global
module parameter specifying the prompt prefix. This prevented a
single test to use multiple VTY connections to different Osmocom
programs.
This patch generalize the code by widening the prompt matching
in f_vty_wait_for_prompt() and by allowing the caller to specify
the prompt prefix to override the modulepar.
Change-Id: I574b56c42fe95540af44a2c43d0fb469938c0e65
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
ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC send a Authentication & Ciphering failure
to resync the USIM with the HLR.
Change-Id: Ia58dc1483757887ca14cfae19e30f9c91fef5874
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
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
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
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
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
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
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
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:
https://gerrit.osmocom.org/#/c/libosmo-sccp/+/9652/
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: https://git.eclipse.org/r/#/c/124552/
Change-Id: I03f5e8b282a7396b45417495c88d8fb81b26cda8
Related: OS#2666
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
This will prevent subsequent failures from overwriting the verdict so we
can easily see the root cause of the test failure.
Using testcase.stop instead for errors internal to our test
infrastructure to mark them as test errors instead of failed.
Change-Id: Idc6819aaf0b01e70c38fad828dd44dcec6bdd778
Specs state in 3GPP TS 24.008 that TearDownInd IE is optional, so allow
possibility to omit it.
Also fix protocolConfigOpts being passed as parameter but not being used
in template tr_SM_DEACT_PDP_REQ_MT.
Change-Id: I006d64f51c17a22a42a225ddfa4119933e48a022
Some GTP messages like Echo Request, Echo Reply and Ind Error don't use
the TEID value. According to 3GPP TS 29.060 sec 9.3.1 in those cases the TEID is
set to 0:
"""
- TEID: Contains the Tunnel Endpoint Identifier for the tunnel to which this T-PDU belongs. The TEID shall be
used by the receiving entity to find the PDP context, except for the following cases:
- The Echo Request/Response and Supported Extension Headers notification messages, where the Tunnel
Endpoint Identifier shall be set to all zeroes.
- The Error Indication message where the Tunnel Endpoint Identifier shall be set to all zeros.
"""
Change-Id: Ic702b78028e850ed961ef805f35e10a42da34e56
When the protocol configuration options (PCO) contain an IPCP container
then lists only one one DNS server (normally there are two included, a
primary and a secondary). Than the parser in osmo-ggsn runs into an
endles loop. This testcase tries to provoke this behavior by sending
PDP CONTEXT ACTIVATE messages with PCO that contain only a single DNS
entry per IPCP container.
The hanging of osmo-ggsn is already fixed (see Depends). However when
Primary and Secondary DNS are in separate IPCP containers, then only
the first IPCP container is parsed (see also OS#3381)
Change-Id: I71761e1f9db7ceac3c3df43d2e539f8c8d53c4fc
Depends: osmo-msc Icffde89f9bc5d8fcadf6e2dd6c0b4de03440edd5
Closes: OS#3288
Related: OS#3381
In osmo-bts Change-Id Iea4a4781481f77c6163d82dcd71a844a5be87bf2
we introduce an Osmocom specific "supplementary measurement info IE"
into the RSL MEAS REP message. This commit adds the related type
definitions and extends the related matching in BTS_Tests.ttcn.
Change-Id: I5d1114c73508c67ad7cd9864d7370367612b1241
The test coverage of the RTP aspects of the MGW is currently very
minima. Lets add a few more testcase to verify RTP behaves as
expected in various situations.
- Add testcase TC_one_crcx_receive_only_rtp:
Test recvonly mode of the MGW. All packets must be absorbed by
the MGW, no packets must come back.
- Add testcase TC_one_crcx_loopback_rtp:
Test loopback mode of the MGW. All packet sent to the MGW must
come back.
- Add testcase TC_two_crcx_and_rtp_bidir:
We already test unidirectional transmissions. This test does
the same as TC_two_crcx_and_rtp but for both directions.
- Add testcase TC_two_crcx_mdcx_and_rtp:
Simulate a typical behaviour of a normal call. First create
two half open connections and complete the connections later
using MDCX.
- Add testcase TC_two_crcx_and_unsolicited_rtp:
Test what happens when a RTP packets from rogue source are mixed
into the RTP stream.
- Add testcase TC_two_crcx_and_one_mdcx_rtp_ho:
Test a typical handover situation. An existing connection is
handovered to another source on one end but the old source will
keep transmitting for a while.
Change-Id: I556a6efff0e74aab897bd8165200eec36e46629f
Closes: OS#2703
The test currently use a hardcoded payload type and encoding name.
This does mean in practice that even when an assignment with EFR
is happeining. The MGCP responses to the BSC tell that the codec
is AMR. This is not correct. The testcases should always pick a
suitable payload type / encoding name in the MGCP response
- Add constants for IANA/3GPP assigned payload types
- Add function to lookup the right encoding name for a payload type
- Initalize the encoding name and payload type in g_media according
to the BSSAP PDU.
Change-Id: I2735267091059e2f2169da80bdcd30abc2b1554b
Realted: OS#2728
The 'SS Info' IE is optional for GSUP_PROC_SS_{REQ|RSP} messages,
and is not carried in some cases, e.g. when a subscriber aborts
an active transaction by pressing the 'red button'.
Change-Id: I20d9028acbe0c457d2a2cf72eff372b749d8dc30
According to GSM TS 04.80, table 2.5, the Facility IE is optional
for RELEASE COMPLETE message. So, if this IE is omitted, then the
whole TVL shall be omitted. It's time to fix this.
Change-Id: I216195ef71c95997708dad8c31b172b6f6cdc461
According to GSM TS 04.80, table 3.4, the Return Result component
may be empty, i.e. may not contain any results nor operation code.
It is used, for example, in responce to the network-originated
USSD notification.
Change-Id: Iaaff110c5f61cc87eda6143cd841f9832f6074bf
Until now, the test went from RR Handover Command directly to RR Handover
Complete, and osmo-bsc didn't mind it. However, the normal handover procedure
requires an RSL Handover Detect to be sent in-between those. Send that.
Change-Id: I6e54edcc3a99e116d852eca8e48c7a5bc685e832
Previous the old entries aren't removed. This only had an
impact if two different f_TC_* were using the same imsi.
When the second function tried to remove the Client again from
the ClientList, the BSSGP_Emulation failed.
Change-Id: I71103e8f8c5f18e8ebadc057cd62d85affd7ca8c
The existing test simply sent 1000 messages via RSL without checking
what actually arrived on the radio interface, or without
expecting/counting any RSL DELETE IND.
Let's fix this by introducing test sending IMM.ASS at three different
rates, with related expectations in terms of nubmer of IMM.ASS arriving
on Um vs. RSL DELETE IND arriving at BSC.
Change-Id: Ib6043b76ba1d7aaff107bb612f63b5a747d8720c
Related: OS#2990
Related: SYS#2695
When a CRCX without an LCO option (codec) is sent, then older versions
of osmo-mgw will omit the port number in the SDP part of the response.
Also no default codec is selected and reported back. This testcase
pinpoints the problem.
Change-Id: Ie16cdab936ce468fe378d4ec9e1c61f81c07fb4e
Related: OS#2658
The omit force this field to be not present, while a * allows to be present or not.
As user of this tr I would expect to ignore this field rather than an explicit omit.
Change-Id: Iae91f752789273934a6382bdd474594c3c50bbe9
This is an early WIP, we actually will need to establish two calls/legs
before the BSC is able to locally correlate them.
Related: OS#1602
Change-Id: Ie6d0b9c38027abf65c7c564fc79b889d013fa6a7
Recently we introduced a few new GSUP IEs, related to TCAP-like
session management and Supplementary Services in libosmocore.
Let's sync the TTCN-3 implementation and add the corresponding
templates for SS payloads.
Change-Id: I54767e49ae98db67f71dd28278b14435860313e0
We will soon implement some LCLS related test cases, and hence
we need some templates for sending and matching received messages.
Change-Id: I5300418ae493f6c315248562938b47ae1931b452
procedure ports (like message ports) require us to specify the
destination of a message ("reply") in case it is connected 1:N and not
just 1:1. This didn't show up as a problem so far, as we typically only
had one component talking to those procedure ports at any given point
in time.
Change-Id: I696ec67080815348bb95e43ecbbf262e533e39a3
In I483ddd45c1cf631a5a9d8f862b6ca728b38bdc14 we introduced code
that makes the IPA_Emulation code to emut an ASP_IPA_EVENT_ID_ACK
[also] to the RSL port, irrespective of client/server status.
However, RSL_Emulation only handled this event in the BTS role
for BSC testing, but not in in the BSC role for BTS testing.
Change-Id: I99a5c58ea8d1e74b2ad51aed23009af6322a1007
In non-handler mode, the SCCP emulation is currently started before
there's a user registered to SCCP_SP_PORT. If the first BSSMAP
package arrives from the network, then the SCCP_Emulation will crash
as it cannot deliver the resulting SCCP user primitive to the user.
Let's split start from initialization, so user code can still register
something to SCCP_SP_PORT before starting SCCP_Emulation.
Change-Id: I55c94f18531bb7e5369500dc90f4b0ff3a420774
osmo-pcu discards PAGING-PS messages unless received on the
signalling BVCI 0. The BVCI value must be set to zero both
in the NS header and the BSSGP header. Create new ports between
the PCU_Test components which the TC_paging test case can use
to ensure that both layers send frames with BVCI value of zero.
This does not make PCU_Tests.tc_paging work yet, however the PS
paging request is now processed by osmo-pcu rather than discarded.
Change-Id: I0437123b04b7320a4f690f0646578c57abf6bc87
Related: OS#2404
Before this patch, we had some problems related to synchronization
between the IPA transport, SCCP emulation and BSSAP layer in SCCPlite
configurations.
This code ensures that f_bssap_init() will block until the IPA
connection (client or server) is established, and then start the SCCP
and BSSAP emulation components in the right order.
This in turn ensures that the initial BSSMAP RESET that we're sending
from the TTCN-3 side is only sent once the IPA connection is fully
established, and the CCM Identity handshake has happened before.
Change-Id: I483ddd45c1cf631a5a9d8f862b6ca728b38bdc14
Related: OS#2544
When sockets cannot be bound or connected, the existing TTCN-3 code prints
the following rather cryptic error messages:
"IPA-CTRL-IPA(47)@f70ff1fd5cfd: Dynamic test case error: Using the value of an optional field containing omit. (Transport endpoint is not connected)"
The "Transport endpoint is not connected" sort-of gives it away, but
let's make it more explicit by introducing explicit checks for the
res.connId and manual setverdict(fail) statements with proper error
message.
Change-Id: Id22a1b5189d81c4fca03d5e7aff60ffdd1ad56bf
For some reason, the "FIELDORDER(lsb)" only worked for U-frames,
but not for S- and I-frames. Probably a TITAN bug, but rather than
debugging that now, let's rewrite the LAPDm types as "FIELDORDER(msb)"
as that appears to work.
Change-Id: Id90ff80576fd8007def4d8d027b481eef693ddc0
This adds a series of test cases to BTS_Tests.ttcn implementing testing
of the RLL sub-layr of RSL, i.e. the translation between LAPDm frames
on the Um interface and the RLL frames on the Abis side (and vice vrsa).
Related: OS#3174
Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
Add ability to test UMTS AKA, by f_gmm_attach() with flags to select UMTS AKA
and to respond to it with GSM AKA SRES.
Add TC_attach_umts_aka_umts_res and TC_attach_umts_aka_gsm_sres.
Change existing TC_attach_* to also call f_gmm_attach(). (Actually,
f_gmm_attach() is almost exactly the previous TC_attach function body.)
osmo-sgsn change I36807bad3bc55c0030d4f09cb2c369714f24bec7 will implement
proper handling of GSM AKA response and make TC_attach_umts_aka_gsm_sres pass.
Related: OS#3193 OS#3224
Change-Id: I201ffeaee4439a413ab8289aceeccca9aba40a7a
Our TTCN3 implementation of the IPA multiplex with CCM handshaking
has been based on some wrong assumptions about the protocol logic.
To make the code stricter, we
* send an ID_ACK immediately after connecting TCP in a client
* separate client and server CCM responder logic
* always respond with ID_ACK to ID_RESP (we accept any identity)
Also, as the Osmocom CTRL interface uses an IPA multiplex but no CCM,
we introduce a boolean variable (and function argument) to clearly
enable/disable CCM support in a given IPA_Emulation component. The
CTRL_Adapter has been modified to use this flag to disable CCM.
This also removes the need of cherry-picking
"HACK: Work around IPA CCM bug in OsmoBSC"
Change-Id: I304535d28a165f76a0a140dc0a15dd81a9db28c8
from the laforge/bsc-workaround branch.
Change-Id: I6d9eaf0d69457caacc03b9049a8bc57976480617
In addition to the existing 3GPP AoIP stacking, allow BSSAP to
run on top of a SCCPlite stacking. Implement both the server and the
client role for IPA.
Related: OS#2544
Change-Id: Ie844c4de62e0ef5d5c4c366185968211a7f6d676
Don't use explicit log() statements for normal message forwarding
between ports. This will be visible in the automatically-generated log
statements anyway...
Change-Id: Idcfb1897dd00df1839cf1a0182a5a030bf71c0cb
This adds a set of four new testcases relted to dynamic PDCH switching:
One successful and one unsuccessful for each Osmo + IPA style dynamic
PDCH.
Closes: OS#3099
Change-Id: I7a7a937548a35461d86e93ead79c39a37a59563e
Add VTY functionality to GGSN tests, and use the VTY to enable/disable
GTP-U Tx sequence numbers in the running osmo-ggsn.
The GTPU packet template now makes sequence numbers optional.
A template created with its sequence number set to 'omit' will result in
a packet without a sequence number, i.e. the 'sequence number present' bit
in the packet header is cleared, and the sequence number field is omitted
from the encoded GTPU T-PDU packet.
Re-use the existing TC_pdp4_clients_interact() test for testing the
behaviour of osmo-ggsn. This test is now run twice, once with and
once without GTP-U Tx sequence numbers. Verify that packets relayed by
osmo-ggsn match its "g-pdu tx-sequence-numbers" configuration setting.
Change-Id: I1dc299407c61b1c865035add44067b8ab89001b3
Related: OS#2519
The MDISC_IPACCESS is only used for the media (CRCX/MDCX/DLCX) related
commands, not for the PDCH activation/deactivation. The latter uses
normal MDISC_DCHAN.
Also, add the inverse templates for PDCH actiation/deactivation, so we
now have both receive and transmit template for each of the 6 related
messages (activation, deactivation, plus each their ACK + NACK).
Change-Id: I170a90391859d71e1f96a72205487cccba5b6ae7
The bit-string type should be indexed by timeslot number, i.e. the first
element [0] should equal timeslot 0, the last one TS7
Change-Id: Ib89689abd998d4940895ba04f49eb140888bc73f
The existing MGW tests were entirely on the MGCP side. Let's start
some tests that exchange RTP frames with the MGW and validate that
the MGW can actually act on what is configured via MGCP.
Change-Id: If620d5f8927d0e3584e90a7a8f785c6fdd7c2d17
The connection ID part of the template must be updated after we
created the respective sockets. It was done to early.
Change-Id: I37306d841df3d27d30fd89fb99c863370517e3ff
In order to form a minimal HANDOVER REQUIRED message additional
Templates (ts_) are needed.
- Add Template ts_BSSMAP_IE_SpeechVersion
- Add Template ts_BSSMAP_IE_CurrentChannelType1
- Add Template ts_BSSMAP_IE_OldToNewBSSInfo
Change-Id: I41c2a036465d422db9348d4d2d66bb332e16e155
Related: OS#1609
The upcomming tests for inter-BSC handover make it necessary to
simulate multiple (two) BSCs to the MSC, while the current
Implementation can only handle one BSC instance at a time.
- Allow multiple BSC instances to be created
- Add a simple reset-test to test what happens when
two BSC instances are started (BSSMAP reset from two
different BSCs)
Change-Id: I52a4c8118828c1605cf672889982f987568ad17d
Related: OS#1609
In server mode, we need to handle SETUP_REQ in ExpectedCreateCallback,
not only SETUP_IND like in client mode.
Change-Id: I988668cac9970af12d59d05a3a9facca257851c6
The LastActTable stores a copy of the decoded RSL CHAN_ACT for
each channel number. This can be used by a RSL_DchanHandler to
learn parameters of its own activation.
Change-Id: I629d66e27cbe4c8b02e704a7181b3bff843e9aa4
The TTCN-3 data types are abstract data types, Encoding artefacts
like 'F' for padding shouldn't be seen by the user. Hence, let's
pass a 2-digit-long or 3-digit-long hexstring into the encoder
functions and let them determine if they should introduce any 'F'
for padding or not.
Change-Id: If4d3dfc16381493d7e710be746ed963975051fc1
Add general infrastructure to
- pass an MCC-MNC for BSSGP to use into f_init();
- verify that the Attach Accept PLMN matches the BSSGP one.
Add TC_attach_mnc3() to feed an MNC with three digits and a leading zero, to
verify the recent mnc3 patches. When testing against a libosmocore and
osmo-sgsn before mnc3, this results in:
Test case TC_attach_mnc3 finished. Verdict: fail reason: "mismatching PLMN in Attach Accept: 02342F; expected 023042"
With the current master branches the proper 3-digit MNC with leading zero is
fed back into the Attach Accept message.
Change-Id: I8901ec0b090e342ebb04a04f9d759fc46c7d9cab
The cell identifier used by the paging tests is 001-01, i.e. uses a
2-digit MNC. With the introduction of 3-digit MNC support in osmo-bsc,
the paging tests became incompatible with a osmo-bsc config with:
network country code 1
mobile network code 1
Explicitly declare a Cell_Identity with 2-digit MNC (includes an 'f').
Also, fix f_enc_mcc_mnc to properly encode 2-digit MNC values.
Related: OS#2847
Change-Id: Ide5228b403e43de8649b6eda18749ea2a9f592a9
This test case checks on each logical channel if the DEACT SACCH RSL
message actually deactivates downlink SACCH as expected.
Change-Id: Id8219ffce0635071cb50669b89368de51fe82843
The function didn't pass its arguments down into the actual L1CTL
port and instead provided '0' into t_L1CTL_RACH_REQ
Change-Id: I5af9654e1fd903420b0dfe7f2db0a6572803d9ef
For some reason, even with a perfectly valid/strong signal, the FBSB
task sometimes fails in the firmware. Let's wrap a loop around
it and try up to 10 times before failing the test.
Change-Id: I2262278dcd7e2f0cf4d293e0549527866522bece
Whenever the OPTIONAL<> construct is used for a member of a record,
we have to add an extra set of parenthsis in order to avoid bogus
"has no RAW decode method" error messages.
It seems the OPTIONAL inherits from Base_Type which will print
"which has no RAW decoding method" from its RAW_decode().
Change-Id: Idfaa11db0e2db4be144800b5bccc44d0515220d7
This code had been intended to be used, but commented out, and
never really been completed or tested.
Change-Id: Iaa573219548f2a6a2eb13408fec65c55f9e88ddb
If we have T.timeout clause in an alt/altstep, we should put
[T.running] as guard expression to avoid warnings about matching
on timers never started - at least for timers where this is a valid
situation.
Change-Id: I96db5c288e0b9c47539cccab8ae7a886d0b9fff3
We permit other subscriber data that's not the MSISDN, but we require
the MSISDN be somewhere within the IEs of the ISD_REQ
Change-Id: Ic63cd5c9a5e9ed46c70f7d7869b4ece281b97e44
The existing BTS testing code was based on a ~1 week old version
of trxcon+fake_trx from osmocom-bb.git fixeria/trx branch, which
has meanwhile evolved:
* port number change for TRX protocol
* FAKE_TIMING -> FAKE_TOA
* we can now expect responses to our UDP control commands
Let's adapt the testsuite to those changes
Change-Id: I6d0122202e5d23308421e76b75e608d206aab56e
TITAN will print warnings if a still-running timer is res-started.
It will also warn if a not-started timer is stopped, so we need
a conditional stop + start if we want to avoid any warnings in a
convenient way.
Change-Id: Iee83b4905cce3a84eb007ffd189b55f4b54f7cb6
As L1CTL is using a stream socket, we need to give the UNIX_DOMAIN
port some clue as to where our L1CTL message boundaries are in the
stream.
This requires a patched UNIX_DOMAIN_SOCKETasp test port with the
following commit applied:
commit 655cb4ab2ac006b3a73d1b679c83081d9743410a
Author: Harald Welte <laforge@gnumonks.org>
Date: Sun Feb 25 23:25:46 2018 +0100
Add "getMsgLen" function similar to IPL4asp_PT
Change-Id: Iab33f57cb4311180e521a76307a552d16287b062
The way how TTCN-3 templates work it's not possible for us to have
a parametric template for both generating DLCX with conn_id and without :(
Change-Id: Icb772ca5b9661ab39b1c161fa4ebc70544275d8f
The way how TTCN-3 templates work we cannot use a template parameter
to decide if we want to match only on messages that contain a matching
RTP_PT2, or (alternatively) on any messages whether or not they have
a RTP_PT2 IE at all :(
Change-Id: I7a4f5d7e1d44994316717da5b769e278ea188b12
We're testing at 80% and 200% of PCH capacity, both for either IMSI-only
or TMSI-only paging requests. The way how we test ensures:
* the expected number of paged mobile identities end up on the Um interface
* we implicitly check the queuing limit of 200 paging records by
overflowing it in the 20-seconds-of-200%-load cases
* we implicitly check the batching of mobile identities into different
paging types
* we test the PCH load reporting over RSL
As a side note, in case you were ever wondering what's the expected
paging throughput / capacity, there are now helper functions to compute
it. For our combined CCCH/SDCCH4, it's about 16 IMSIs per second or
about 32 TMSIs per second.
Change-Id: I0b80b72bdab3d80d915296d70e1174623fbd8610
The BTS needs some of the SI3 parameters like BS_AG_BLKS_RES for
internal computations, so make sure we send it after the connection
has been established.
Change-Id: I5dc3724f79e669f52593cd776806d84b4dd4bf5c
So far we only dispatched received Common Channel messages from the
wire / IUT into the CCHAN_PT. Now the tester can also send Common
Channel messages back to the wire / IUT.
Change-Id: If3d5516c14ea3fbbd8c3de35eaa8ea5f18a00933
This is a template that goes beyond the 3GPP specs, as it expects
presence of certain optional IEs which we know are always present
in the OsmoBTS case.
Change-Id: Ibf37565ab4fe70515b598a2757953628aa780241
which allows us to send RR IMMEDIATE ASSIGNMENT (DL/AGCH) and
RR MEASUREMENT REPORT (UL/SACCH) messages from tests.
Change-Id: Ic75041e84c15c77805ecafb823bf7108920675ca
When emulating the BSC side of RSL, this can be used by a test case
to wait for the RSL connection to be established.
Change-Id: Iad2f6e4cb6a8f3b77e452f36a83ec11e7554e6c7
So far we assumed we emulate the BTS side and talk to a BSC.
Let's make this configurable and disable the BTS-side spcific code
paths by means of a 'bts_role' boolean type.
Change-Id: I0d0460cbb633b470f6117d07643f68aefb1530eb
Let's use the preprocessor to avoid IPA_Emulation pulling *all*
dependencies into each and any of our projects. The code readability
suffers a bit from the many #ifdefs, but compilation speed increases
if we don't have to pull in all those (recursive) dependencies.
After all, a BTS test case will never need SCCP, GSUP or MGCP.
Change-Id: Ic0231adbd2171214de133d26b3fbf36130ee8aa0
So far, the RSL templates have been used for BSC testing, i.e.
TTCN3 behaving like a BTS. Now we want to test the BTS, so we
have to "invert" the receive/send direction and hence also need
the inverse templates.
This doesn't add *all* of them, but a sufficiently large number for our
first testcases against OsmoBTS.
Change-Id: Ica9cfae5a691e4d967d046b04e5bb16a71a89adf