Commit Graph

816 Commits

Author SHA1 Message Date
Harald Welte 8f6ac16a92 gsup: Make tr_GSUP_ISD_REQ more tolerant
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
2018-03-01 22:43:28 +01:00
Harald Welte 09b3c50e85 hlr: Add TC_vty_msisdn_isd
This tests whether the HLR is sending an InsertSubscriberData to the VLR
of an active/registered subscriber after the MSISDN is updated in the
HLR.

Change-Id: I597a3c2d49aa6fa65007304105363a3e99fa4ae9
Related: OS#2785
2018-03-01 22:42:22 +01:00
Harald Welte 7029606aa3 hlr: Reduce code duplication by using template
Change-Id: I7dcf0d27144e5dcf29babcb679ca9ef04b1f46a3
2018-03-01 22:42:03 +01:00
Harald Welte c2c52554ee hlr: More test coverage
Change-Id: Ic93a2e7498343abcb709d7018c4d49811252342c
2018-03-01 21:20:39 +01:00
Harald Welte b2db68eddb hlr: Add hlr sub-directory to master Makefile (for 'make compile' checks)
Change-Id: Idbd8241fc7d217885f65f84e11f9f1ea13adb82e
2018-03-01 17:10:12 +01:00
Harald Welte 79420ccab2 hlr: Make test run again using current OsmoHLR / TTCN-3 library
Change-Id: I4304d6f69a349845d74a9dbe5e366525d5d8956f
2018-03-01 16:49:29 +01:00
Harald Welte d3a88a684c bts: ensure fake_trx BB CTRL IP is used from main component
.. not just from the ConnHdlr component, as in previous patch

Change-Id: I3db2884d2519dfd4ae08ff1a4dae5b488677da4c
2018-03-01 16:04:52 +01:00
Harald Welte a4d8f35c20 bts: Make IP address of fake_trx BB CTRL port configurable
Change-Id: Idbfe9e0327ed6acefd87afc8596485a488fc44d9
2018-03-01 15:47:58 +01:00
Philipp Maier ffe5f0e546 MSC_ConnectionHandler: make sure altstep exists
The altstep as_handover does not exit as each of its branches is
equipped with a repeat statement on the end. This trapps us in
an endless loop.

- remove the repeat statement at the last logical step which is
  at the RSL_REL_REQ.

Change-Id: I8cb57a9fef606f459542708206f5ea4de1def7a1
2018-03-01 14:32:59 +00:00
Philipp Maier 88f4ae890f BSC_Tests: use isvalue() instead of isbound()
Currently we use isbound() in f_start_handler() to check if the BTS
which we want to connect is indeed populated. However. isbound()
seems never become true in this particular situation.

- Use isvalue() instead of isbound()

Change-Id: I25ddd55b7626087570311999b85ec7632b162c06
2018-03-01 14:32:59 +00:00
Harald Welte 39b82d344a hlr: Integrate VTY and CTRL support
Change-Id: I3fbc26a98d31df6d4753848bba655a517801d686
2018-03-01 10:21:56 +01:00
Harald Welte 78cae923fa hlr: Rename module + file from GSUP_Test to HLR_Tests
Change-Id: I906c0046a4cf6ae95e5a0aca918f4375fedfea55
2018-03-01 10:12:56 +01:00
Harald Welte 3b4c356d7b gtp: Add some CAUSE enum definitions
Change-Id: Id52eb710201428ba180ca6ffd5129f3126e54850
2018-03-01 10:01:58 +01:00
Harald Welte ef3e1c9a89 bts: Update towards most recent "laforge/trx" branch
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
2018-02-28 23:44:00 +01:00
Harald Welte 883340c719 bts: Add PCU Interface testcases
Change-Id: I671b8e2c61705485f46602f648eb5fdc01db12f7
2018-02-28 21:05:51 +00:00
Harald Welte 56c0580c5f bts: Fix bugs in RACH Tests (timer not started, wrong CS/PS function)
Change-Id: I619264654bfeafe4b76c8702ede5876a82c32f13
2018-02-28 21:05:51 +00:00
Philipp Maier 282ca4b49a BSC_Tests: try to avoid race condition
When the test component ends and the underlaying
components are shut down. Messages from the system
under test may still be picked up and forwared. When
a message is handed from one component to one that
is already shut down, the testcase is flagged as
errornous setverdict(error).

An idea to fix thisis to stop all test ports using
all port.stop. However, this does not solve the
problem entirely. We still observing errors.

- add f_shutdown_helper() and call it from the
  end of each testcase

- perform an all port.stop; in f_shutdown_helper()
  to freeze all communications between the ports
  of the different components.

Change-Id: Id3bc840c0428d08dfbeedacc408b3dd1cd0fa7ec
2018-02-28 09:45:23 +00:00
Harald Welte 685d598171 bts: Add test for high-resulotion timing offset / TOA256
this adds a new test that uses VTY to enable TOA256 support in
the uplink supplementary measurement and then tests TCH/H measurement
reports

Change-Id: Id39a71429596d46289a82e539796308816ad86f3
2018-02-27 22:32:54 +01:00
Harald Welte 8da4824ecb bts: Add TELNET/VTY module so we can interact with BTS VTY
Change-Id: Ia1d6ba2c3534d2daaa5ea1fe60b32a99fa4ddad9
2018-02-27 22:32:54 +01:00
Harald Welte 57fe8232db bts: Instruct trxcon for TA=2 at every testcase start
as fake_trx keeps running during the entire test suite run, and
the protocol being UDP based, it doesn't know when BTS_Test will
re-start and hence the old TA/FAKE_TIMING value will remain until
it is set.

Let's explicitly set a FAKE_TIMING of two bits at start-up of each
test case during f_init()

Change-Id: I9f07768346e0d68a4dbe36780e36b799d27a7f06
2018-02-27 22:32:54 +01:00
Harald Welte c3a3f45268 Add new f_timer_safe_restart() function for warning-safe restart
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
2018-02-27 22:32:54 +01:00
Harald Welte 54a2a2dcd2 bts: TC_rach_max_ta
Change-Id: Idd7335f753f8b1a7d91274dc2c99d51d882309d3
2018-02-27 22:32:54 +01:00
Harald Welte 8c24c2b7d2 bts: Add TC_rach_content and TC_rach_count
Change-Id: I87abd7172b52aaaaf59bb079de1df99a9edd7381
2018-02-27 22:32:54 +01:00
Harald Welte 6fc784e3c8 L1CTL: Add message segmentation helper via getMsgLen()
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
2018-02-27 22:32:49 +01:00
Harald Welte 48494ca245 WIP: bts: SI scheduling tests
This imports those tests from ../sysinfo/Tests.ttcn which deal with
the scheduling of SI, not with the actual payload/correctness of their
contents. (the latter tests must move to the BSC test suite, as the BTS
is only concerned with scheduling the opaque SI blocks as received from
the BSC).

Change-Id: I65f4b91e81174717a0c484ba5c22bede68683ae1
2018-02-25 17:25:04 +01:00
Harald Welte 93640c6e25 bts: Add some more comments for better code grouping
Change-Id: Ibe68067f20d72318716c6a27f02d7bc9b56f1b01
2018-02-25 16:59:33 +01:00
Harald Welte f10153fc36 bts: Set not only SI3 but also SI2+SI4 during initialization
Change-Id: I9146792285cdb7225150320d1949aaec28290abf
2018-02-25 16:34:05 +01:00
Harald Welte 262f122ab4 Helper functions in GSM_Tyes and Osmocom_Types
Change-Id: Ibd8f215a7cd4564126503c3552bbcceb6d31c779
2018-02-25 16:33:38 +01:00
Harald Welte 82ccef7c18 Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation
Let's have one SI3 definition rather than multiple...

Change-Id: I3c4754c9a69cb2fa51d88ef6358d5399dbb29860
2018-02-25 16:17:33 +01:00
Harald Welte 3ae11dade5 bts: Add TC_ipa_crcx_mdcx_mdcx_dlcx_not_active (2x MDCX on lchan)
Change-Id: I58475e15958002e18cbe9d471bb5c8959bbf7bed
2018-02-25 13:36:06 +01:00
Harald Welte 9912eb5824 bts: Add TC_ipa_crcx_sdcch_not_active (CRCX on SDDCH)
Change-Id: I8286cc5c36f4abff301f54f831adb672a1661a79
2018-02-25 13:30:15 +01:00
Harald Welte 2d14259658 bts: Sleep for some time after RSL is up before using it
This is a work-around for an OsmoBSC bug, see OS#3000

Change-Id: I9a552984a895b08d3f517bdc5844b810eb57700f
Related: OS#3000
2018-02-25 13:19:44 +01:00
Harald Welte a3f1df9cd7 bts: TC_ipa_crcx_twice_not_active + TC_ipa_crcx_mdcx_dlcx_not_active
Change-Id: Ie643203c4fa4ba0baf5c640d9fd8eaf9fd85cd5b
2018-02-25 13:01:19 +01:00
Harald Welte 1eba37487b bts: Introduce f_rsl_transceive() and reduce code duplication
Change-Id: I56de61e08bd1508a0531f720561ead84d1075de3
2018-02-25 13:01:17 +01:00
Harald Welte 2a7e7163c1 RSL: Make ts_RSL_IPA_DLCX require a conn_id value
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
2018-02-25 13:00:42 +01:00
Harald Welte 30527454ac RSL: Add more IPA related templates
Change-Id: I432c75c25e20dd211c8a429bfd9d407999f6e99a
2018-02-25 13:00:03 +01:00
Harald Welte 6cb400ae89 RSL: ts_RSL_IPA_MDCX_ACK contains *local* IP+Port, not remote
the IPA_MDCX_ACK contains the BTS-side IP/Port, despite the MDCX
containing the BSC-side IP/Port!

Change-Id: Ided8acff720aeb52232d17c8f142a97557f4b424
2018-02-25 12:59:59 +01:00
Harald Welte 8bd0f82b00 RSL_Types: Remove RT_PT2 from tr_RSL_IPA_CRCX_ACK
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
2018-02-25 12:59:56 +01:00
Harald Welte 02369801d5 Osmocom_Types: Add c_UINT16_MAX / c_UINT32_MAX
Change-Id: I99f3b08b07a46042a8c1e13a420743c58e94603b
2018-02-25 12:59:54 +01:00
Harald Welte a871a38a18 bts: Add TC_ipa_dlcx_not_active()
Change-Id: I5c8eec8ba56b35aa8d7df87649389392ffd1a78c
2018-02-25 12:59:36 +01:00
Harald Welte 01d982cced bts: low-level RSL ERROR REPORT Testing
Change-Id: If1cc6c672d5a0cf8eb8ef23b96eb1e80ceef30f1
2018-02-25 12:59:33 +01:00
Harald Welte 68e495b48a bts: Add paging related tests
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
2018-02-25 12:58:36 +01:00
Harald Welte 7484fc41b4 bts: Type Definition + Template for SI3; Send SI3 at start of test
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
2018-02-25 12:57:21 +01:00
Harald Welte 874c22393e RSL_Types: Add ts_RSL_BCCH_INFO() for sending BCCH_INFO
Change-Id: Id9ad914f67137e38c7ad259c7a74de0e98c8f50d
2018-02-24 04:52:43 +01:00
Harald Welte 34252c56c7 RSL_Emulation: Make CCHAN_PT bi-directional
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
2018-02-24 04:51:50 +01:00
Harald Welte 7076738db4 Add initial OsmoBTS test suite
This Test suite implements the BSC-side of Abis RSL and is used to
test OsmoBTS.  It contains provisions for using L1CTL against
(virt_phy + osmo-bts-virtual) or (trxcon + fake_trx + osmo-bts-trx)
to also simulate the MS/Um side, bu those provisions are not used
yet.

Implemented tests currently are only related to RSL dedicated channel
activation / deactivation.

We still terminate OML inside OsmoBSC, and let the test suite deal
exclusively with RSL to keep complexity low.

Change-Id: I8ced0d29777aad3ec842d54eabea87dfcc943c79
2018-02-24 01:20:38 +01:00
Harald Welte 5377d2f730 GSM_Types: add rxqual2ber and rxlev2dbm + ivnerse functions
Change-Id: I6293f6a9b73d5614cbb61c64617af4dd8afc1e73
2018-02-24 01:03:09 +01:00
Harald Welte 7f26f5524d Add TRXC (OsmoTRX Control) protocol types + codec port
Change-Id: I3b5e81693e5cf8ee8a2c360bde8b16c5276d2297
2018-02-24 01:03:09 +01:00
Philipp Maier 1e6b442263 bsc: fix TC_paging_imsi_a_reset
The testcase TC_paging_imsi_a_reset sends a paging request that
causes pagings on all cells. Then it performs a BSSMAP reset and
checks if the paging has stopped. In order to be sure that paging
requests from before the reset procedure are not mistakenly
detected as after-reset-pagings the RSL queue is cleared. However
this is only done for IPA_RSL[0], which means IPA_RSL[1] and
IPA_RSL[2] still contain old paging requests, which lets the test
fail.

- Clear IPA_RSL[1] and IPA_RSL[2] as well.

Change-Id: If0cdc0325fd0e1dcf3e4ce52e4de27adb4d9cf48
2018-02-23 18:10:46 +00:00
Harald Welte 39b47be947 RSL_Types: Add tr_RSL_MEAS_RES_OSMO()
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
2018-02-23 19:03:54 +01:00