Commit Graph

3157 Commits

Author SHA1 Message Date
Oliver Smith 28029ffe50 treewide: remove FSF address
Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.

Change-Id: I8ab8f1e79fcc38d889cce4eac2e90cd4e5582b1b
2021-12-14 12:23:26 +01:00
Vadim Yanitskiy e91bbfc3aa bts/osmo-bts.cfg: use default {fn,rts}-advance values
It's better if we run ttcn3-bts-test with the default values, given
that they were significantly reduced some time ago.

Change-Id: Id97e848e5dfd0b6c504d06f62642511cfd5a0f66
Related: I7da3d0948f38e12342fb714b29f8edc5e9d0933d (osmo-bts)
Related: OS#4487
2021-12-14 00:30:51 +00:00
Vadim Yanitskiy a4b7857b77 bts/osmo-bsc.cfg: fix deprecated BTS type 'sysmobts'
Change-Id: If2f81141707e6f2360fc57bbd5f76606294f8db8
2021-12-14 00:30:33 +00:00
Pau Espin ecd1225858 library/rua: Add some more templates
Change-Id: Iab2afbc6ebaa8a41d3e951155609d4c0a2d6866b
2021-12-13 18:58:31 +01:00
Vadim Yanitskiy b77196e138 BSC_Tests.cfg: also execute LCLS test cases
Change-Id: I106052d6f89a85171f8c65f1dbfcbeaa4f35f887
2021-12-13 16:17:45 +00:00
Vadim Yanitskiy 68d418e344 BSC_Tests_CBSP: use proper default values for mp_cbc_ip / mp_cbc_ip6
Otherwise it's impossible to run the CBSP test cases locally, because
the remote peer address in osmo-bsc gets set to '0.0.0.0', so indeed
it cannot establish connection to the server.

Change-Id: I5b1d215818255717ed955c9f1a9c45505ab11a65
Fixes: OS#5351
2021-12-13 16:17:45 +00:00
Vadim Yanitskiy c041e9902f library/Osmocom_Types: use f_rnd_bitstring() in f_rnd_ra11_ps()
Change-Id: I122d386b0c8ce320687016b6cab883b8a36bdffc
2021-12-11 02:11:35 +03:00
Vadim Yanitskiy 6a2a11ff4c library/Osmocom_Types: fix maximum values passed to f_rnd_int()
It's clearly stated in a comment to this function that the returned
value is 0 <= x < max, so it's always less than the maximum.

Change-Id: If127fc6a2feeddbdd3ea636b56dadf8957941758
2021-12-11 02:08:46 +03:00
Vadim Yanitskiy 96bb9cb047 BSC_Tests: ramdomize IMSI in f_gen_test_hdlr_pars()
Using the same IMSI in each test case makes it harder to correlate
subscriber connections in the SUT with particular test cases.  A
good example is a problem described in OS#5337: some test cases
create dangling subscriber entries that never got released:

  OsmoBSC# show subscriber all
   IMSI             TMSI      Use
   001019876543210  ffffffff  3 (3*paging-start)
   001010000100001  ffffffff  1 (conn)

With this patch I am getting the following output:

  OsmoBSC# show subscriber all
   IMSI             TMSI      Use
   001016017428234  ffffffff  1 (paging-start)
   001014631230680  ffffffff  1 (paging-start)
   001011161500382  ffffffff  1 (paging-start)
   001010000100001  ffffffff  1 (conn)

so I was able to correlate the following test cases:

* (001016017428234) TC_lcs_loc_req_for_active_ms_ta_req,
* (001014631230680) TC_lcs_loc_req_for_active_ms_le_timeout2,
* (001011161500382) TC_cm_service_during_lcs_loc_req,
* (001010000100001) TC_no_msc.

Change-Id: Ie008b5566b207b13cd562c55625bad38c09b3927
Related: OS#5337
2021-12-11 02:03:22 +03:00
Pau Espin 17e0f8c5a0 break GTP_Templates dependency on Osmo_Gb_Types, BSSGP_Types, NS_Types
The resulting set of dependencies needed just to have one simple CellId
struct is huge. That was fine for sgsn testsuite since anyway those were
being used, but it's not acceptable for other testsuites (hnodeb) which
only really require the GTP side.

After this change, GTP_Templates only requires GSM_Types, which ends up
in a much smaller subset of dependencies being pulled in.

Change-Id: Icd8234908af445b798517fe110cd0648969179a4
2021-12-09 15:25:50 +00:00
Daniel Willmann 116d8b5feb gbproxy: Test BVC bringup with conflicting BVCs
Different pcus try to establish the same BVC. Ensure that all the other
BVCs still remain functional.

Change-Id: I46eb0205b4c86b5f1bdc241ef0b2e12135c028e4
2021-12-08 07:47:29 +00:00
Vadim Yanitskiy 999ceb6637 BSC_Tests: add TC_rll_sapi_n_reject_dlci_cc
Change-Id: I9d7042ab4f3f7dea88811bd1b90d829065063f33
Related: SYS#5047, OS#4728
2021-12-07 07:39:08 +00:00
Vadim Yanitskiy a7fc5a6e7f bsc: f_create_chan_and_exp(): ensure that SCCP connection is up
This change fixes sporadic failures of TC_cm_serv_rej:

  RAN Connection table not found by component TC_cm_serv_rej(2648)
        BSC_Tests.ttcn:11106 BSC_Tests control part
        BSC_Tests.ttcn:10550 TC_cm_serv_rej testcase

The reason is that sometimes a BSSAP/DTAP PDU (with CM Service Reject)
gets enqueued before the SUT has established an SCCP connection to the
virtual MSC.  This causes a lookup error in the RAN connection table.

A simple solution would be to add a receive statement after calling
f_create_chan_and_exp(), like it's done everywhere else:

  f_create_chan_and_exp();
  BSSAP.receive(tr_BSSMAP_ComplL3); // <---

But a more general solution is to expect and receive this message in
f_create_chan_and_exp(), so we can reduce code duplication and make
the API more convinient.  This is exactly what this change does.

Change-Id: Ic675168e29919e1234cb49440c4a630238ff5d70
Related: SYS#4878
2021-12-07 07:38:33 +00:00
Vadim Yanitskiy a47cd4e6aa library/BSSMAP_Templates: parametrize codec list for tr_BSSMAP_ComplL3
Change-Id: I4abd77ebe47791adf2708e1c31614383d18e54b8
2021-12-07 07:38:33 +00:00
Vadim Yanitskiy f63b6baa92 bsc/osmo-bsc.cfg: fix deprecated BTS type 'sysmobts'
Change-Id: If53c49157ec861163f3d993972414674ab18119f
2021-12-06 17:55:25 +00:00
Vadim Yanitskiy 9a8155c251 bsc/osmo-{bsc,stp}.cfg: tune logging configuration
Change-Id: I955c0b8dbf74761d525c6bfb195eed418af24ab6
2021-12-06 17:55:25 +00:00
Vadim Yanitskiy 172bc6ebd2 msc/BSC_ConnectionHandler: fix early return in f_mm_ciph_geran()
In [1] I forgot to invert an if statement.  This regression caused
most of GERAN specific test cases to fail due to "Tguard timeout".

Change-Id: I8cbaff00abfd9eb252dc3011df848e2e24fe5a1e
Fixes: [1] Ib7ebe8fd675295beb02cadebb19d8465dffeb732
Related: OS#5333
2021-12-06 17:55:26 +03:00
Vadim Yanitskiy 600ebb235e Makefile: add target for generating tags
Change-Id: Ic2c68c12471d872f449e29082a98df14b47bbda4
2021-12-05 09:36:06 +00:00
Vadim Yanitskiy 0649d1c0db msc/BSC_ConnectionHandler: refactor and split f_mm_common()
Reduce nesting and improve readability by splitting GERAN/UTRAN
specific CMC/SMC message handling into separate functions.

Change-Id: Ib7ebe8fd675295beb02cadebb19d8465dffeb732
Related: OS#5333
2021-12-04 11:01:57 +00:00
Vadim Yanitskiy 23d6665945 ttcn3-tcpdump-stop.sh: order the SUT to print talloc report
The idea is to generate a talloc report after execution of a test
case and store it together with PCAP files.  This might be useful
for detecting memory leaks and finding the relevant test cases.

To enable this feature, make sure that osmo_interact_vty.py from
osmo-python-tests is installed (see [1]), and the following
variables are set (see [2]):

* OSMO_SUT_HOST (e.g. "127.0.0.1"), and
* OSMO_SUT_PORT (e.g. 4242).

Change-Id: I1b03b17426d8760c55976e3b78ca2f3af248c055
Depends: [1] Ida8e08e7fe4f171f934a2d4eef4568da7c398f5c
Related: [2] Icd4c2d80db934535d499598282ed9416d8088163
Related: OS#5328
2021-11-30 18:25:49 +03:00
Neels Hofmeyr bcfc944bf6 bsc: properly test assignment counters
Verify the BTS level assignment:attempted_speech / _sign as well as
assignment:completed_speech / _sign counters, in four selected
assignment tests (fr, hr, amr_f, amr_h).

Shows a bug where we counted a speech assignment as
assignment:completed_sign.

Related: SYS#4878
Depends: Ie9fcd1e86f27ecb2f11e2e8813faac365cb470b8 (osmo-bsc)
Change-Id: Icb1386ec2ccd70eb3c026301b9b08ad7177278f7
2021-11-30 13:21:16 +00:00
Neels Hofmeyr 734b1a3950 bsc: properly test various bts.N.chreq:* counters
Related: SYS#4878
Depends: I1fde77d5d5920093ab037184eb3518876804353d (osmo-bsc)
Change-Id: I17a7702b151ac03fd9f7ecd6927ef42133aad953
2021-11-30 13:21:16 +00:00
Neels Hofmeyr 4dec8cc384 bsc: cosmetic cleanup for f_ctrs_*_init()
Related: SYS#4878
Change-Id: I357bfa811a07336ca57dac2d49bf80189047916d
2021-11-30 13:21:16 +00:00
Daniel Willmann 65bddfc801 gbproxy: Update expected-results.xml
Change-Id: Id987d1c8e4a901ff9397f0e58072bc039de4e030
2021-11-30 09:26:36 +01:00
Daniel Willmann c7c8e32fef gbproxy: Add flush_ll test without new bvci
Depends: Ic33d08992ea84af006d133db6aec508a7b7c7f28 (osmo-ttcn3-hacks)
Change-Id: I9af6f0829bf10031b86e587529b86706fea3a413
Related: OS#5332
2021-11-30 09:24:07 +01:00
Oliver Smith 8b343d3655 BSC_Tests: TC_paging_counter: add bsc pag expired
Test the new bsc.N.paging:expired stat in TC_paging_counter too.

Depends: osmo-bsc I9c118e7e3d61ed8c9f1951111255b196905eba4d
Related: SYS#4878
Change-Id: I8931bf1bc2f4e0d4b168168cdb83683bb350d961
2021-11-29 21:15:31 +00:00
Oliver Smith 8b6d1804e1 library/Misc_Helpers: add f_osmo_repo_is()
Create functions to check which from Osmocom repository the SUT is
running. Put it in Misc_Helpers instead of a new library file since
Misc_Helpers is already available in many/all? tests and it fits there
too.

Depends: docker-playground Ic06532f7a67e59458652c5cf4c8f6fee8113e703
Related: OS#5327
Change-Id: Ic33d08992ea84af006d133db6aec508a7b7c7f28
2021-11-29 21:15:31 +00:00
Vadim Yanitskiy fff454062a msc/osmo-msc.cfg: remove deprecated 'periodic location update'
T3212 is set to 60 min. by default in osmo-msc.  There is no need
to set the value explicitly, so let's use the default.

Change-Id: I4a053af23ae9371c945c7634053827bb3813a67a
2021-11-28 03:48:02 +03:00
Vadim Yanitskiy e301838023 msc/osmo-{msc,stp}.cfg: tune logging configuration
Change-Id: Ic74014a3509f913c5668639e02b9306d73bb219d
2021-11-28 03:33:14 +03:00
Alexander Couzens 59087c5037 msc: disable encryption for iu/utran tests
Add seperate UEA1/2 tests later.

Change-Id: Id98038e1d92942b55480a60821088d4a445b7b28
2021-11-27 00:33:52 +01:00
Daniel Willmann ef8e50ef30 BSSGP_Emulation: Handle FLUSH_LL_ACK differently
The BVCI that this message might contain should not be used to route it.
It referes to the BVCI that the PDUs were transferred to (BVCI (new)).

Instead broadcast to all components.

Change-Id: Ia1df35da44ef28d91501bb898e1059bf1390129b
2021-11-26 12:05:20 +01:00
Pau Espin b54acca15f hnb: Introduce HNB_Tests testsuite
A new Iuh CodecPort + Emulation is introduced to (de)mux RANAP and RUA
in the same SCTP socket.
The Iuh_CodecPort.ttcn file has currently a hack to be able to test
HNBAP, since titan seem to be reporting sinfo_ppid=0 when in fact it
received sinfo_ppid=20 (HNBAP).

A couple tests are added to validate HNBAP HNBRegister Request  + Accept
or Reject. In current osmo-hnodeb state, both tests pass if run
separately, but fail if run sequentially since osmo-hnodeb still doesn't
re-connect properly after first test finishes and connection is dropped.

Related: SYS#5516
Change-Id: I7227917148e98a2c777f4b05d8d2eca6e9c121b7
2021-11-24 17:52:49 +00:00
Neels Hofmeyr afe2ea5c4f bsc: show bug: do inter-BSC-out HO by measurement report
So far all handover tests trigger handover via VTY command. This means
that any bugs introduced in measurement report handling and handover
target selection are by definition not caught.

Almost a year ago, fixing a handover oscillation bug for intra-BSC
handover introduced a segfault for inter-BSC handover targets, because
for those the target.bts is NULL. Show this bug.

Related: OS#5324 SYS#5259
Related: I5a3345ab0005a73597f5c27207480912a2f5aae6 (osmo-bsc)
Change-Id: Iba033c32015173f57dbb1c211aefab1a9094e29d
2021-11-24 15:26:50 +01:00
Vadim Yanitskiy 89f198cb8c library/DNS_Helpers: type 'char' was substituted with 'charstring'
Change-Id: I0c93002cf915a8ce7e63f208693b2b63ae52ac38
Related: SYS#5602
2021-11-19 03:31:19 +03:00
Philipp Maier 1298b09cb4 MGCP_Test: fix TC_dlcx_wildcarded
Due to the migration to a multithreading scheme the timing behavior of
the stats items has slightly changed. There is now a 1 sec update cycle
in which the stats items are regenerated. This means we have to wait 1
sec. before we can query the endpoints.used stats item.

Change-Id: I90613616f9ff85ca59464dfd45d331ed1a54d9c5
Related: OS#5316
2021-11-18 19:10:55 +00:00
Vadim Yanitskiy c18ff4734b BSC_Tests: fix a race condition in TC_fh_params_handover_cmd
As can be seen from ttcn3-bsc-test run #1565 on Jenkins [1], it may
happen that the VTY command requesting handover reaches the IUT earlier
than the SCCP 'SACK CC' message.  In this case, the 'SUBSCR_CONN' FSM
remains in state 'WAIT_CC', so we get an error:

  (bts=0,trx=0,ts=0,ss=0) (ARFCN 871) --> BTS 1 Manually triggering Handover from VTY
  SUBSCR_CONN(msc0-conn204)[0x5633b2877af0]{WAIT_CC}: Received Event HANDOVER_START
  SUBSCR_CONN(msc0-conn204)[0x5633b2877af0]{WAIT_CC}: Event HANDOVER_START not permitted

The easiest way to avoid this is to introduce and artificial delay
after the connection establishment and before triggering the handover.

[1] https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test/1565/

Change-Id: I19f7ca942e22d7930a56d1a525414f137a9ef831
2021-11-18 19:10:34 +00:00
Vadim Yanitskiy 2bcea3dec8 MSC_ConnectionHandler: use select() in f_ChDesc2RslChanNr()
Change-Id: Iefef18b7f6330dbfb61a98c8c037c9c904cf0c24
2021-11-18 19:10:34 +00:00
Pau Espin 6b1b0ff2b6 stp: Drop mp_osmo_stp_newer_than_1_4_0
osmo-stp 1.5.0 has been released, so we can drop this.

Change-Id: I9a24b44be77d5ab615b833dda418748fb162fc3d
2021-11-16 19:24:55 +01:00
Pau Espin 1538c3b616 pcu: Drop mp_osmo_pcu_newer_than_0_9_0
osmo-pcu 1.0.0 was released, so we can drop references to older osmo-pcu
versions.

Change-Id: Ife37fc92c5b1ebf7e87b66c136ae900f44861510
2021-11-16 19:22:07 +01:00
Pau Espin 4c23aeabc4 pcu: Drop mp_send_all_data_ind
osmo-pcu 1.0.0 was released, so we can drop references to older osmo-pcu
versions.

Change-Id: I6720f066731b4336f8527643bed16ae7ea047c20
2021-11-16 19:22:01 +01:00
Pau Espin 37a4c150e1 bsc: Always enable dynts sdcch8 tests
Release 1.8.0 is already released, so latest should support this.

Change-Id: Ifbbedde9878274d3008290ec69916e28d7adba3b
2021-11-16 19:02:27 +01:00
Neels Hofmeyr 87a6561f8b bsc: f_TC_cm_serv_rej: tweak f_sleep()ing
Make the test more stable by sleeping a bit before stopping all
components. Also reduce the f_sleep(3.0), an accidental leftover from
initial debugging.

Related: SYS#4878
Change-Id: I005af13baac4bca2a431b09b2a6bbfe7077342e0
2021-11-16 15:01:44 +00:00
Pau Espin 59aa109194 pcu: Introduce test TC_ul_tbf_reestablish_with_pkt_dl_ack_nack
Change-Id: I2058862cf11d0027b040eb6d9c0a27524df593b5
2021-11-16 11:32:55 +01:00
Pau Espin e8a9444356 pcu: Introduce test TC_t3172_*
Related: OS#3928
Change-Id: I3f4368c99b00453b471c3d741fecb8864ecdc628
2021-11-16 11:32:25 +01:00
Pau Espin 209dc7d4e1 pcu: No need to set t3142 in TC_ratectr_all_available_allocated
That's a copy-paste artefact from another test.

Change-Id: Ib0ec4a9bb4f48330ab5ced94fe6b705a9fc69603
2021-11-15 17:07:35 +00:00
Pau Espin 6eb4d25ba0 pcu: Introduce test TC_ratectr_all_available_allocated
Related: SYS#4878
Change-Id: Ide1254954b5cf02a19e190b19d06c7aaeedb6ede
2021-11-15 12:51:45 +01:00
Pau Espin 907ba20f37 pcu: Fix race condition in TC_n3101_max_t3169 and TC_n3103_max_t3169
I cannot reproduce the issue in my local system with docker, probabluy
due to different performance from jenkins builder. It triggers almost
every time in jenkins nightly TTCN3 PCU_tests though.
A similar fix was already introduced recently for TC_n3105_max_t3195
since PCU started submitting empty (idle) blocks when there's no TBF
listening on that PDCH. We need to update the test to account for that,
since our TTCN3 timers are not necessarily exactly matching the one at
the PCU side.

Change-Id: Ia5344df15c612c70a6cdd7bb6f12dc7524a23bf4
2021-11-15 11:15:12 +01:00
Pau Espin 518e82faf9 pcu: Introduce as_ms_rx_ignore_empty helper
It will be further used in follow-up patches.

Change-Id: I3c80ba4b8d229fa4a75dfd04abb7c5aae26e221c
2021-11-15 11:13:11 +01:00
Neels Hofmeyr b758187c86 bsc: add test for CM Service Reject counter
Related: I79b1261e5a281d9797eaaf9c27d90edd8e27c78b (osmo-bsc)
Related: SYS#4878
Change-Id: I0214b27da18af87eca9715ebf7eeeff945e3e12a
2021-11-10 14:32:50 +01:00
Neels Hofmeyr ac432fa4b3 bsc: add testing of incoming_intra_bsc_ho rate_ctrs
Related: SYS#4878
Related: Id9f2c6e2865ebe680879018fff08d283ce24c983 (osmo-bsc)
Change-Id: Iba229313d73fa20266f6d4eac5820579fb14c604
2021-11-10 14:32:27 +01:00