Commit Graph

548 Commits

Author SHA1 Message Date
Vadim Yanitskiy a4b7857b77 bts/osmo-bsc.cfg: fix deprecated BTS type 'sysmobts'
Change-Id: If2f81141707e6f2360fc57bbd5f76606294f8db8
2021-12-14 00:30:33 +00: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 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
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 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
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
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
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 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 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
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
Neels Hofmeyr bd94fe7236 bsc: add TC_ratectr_all_available_allocated and _dyn
Test new rate counters all_allocated:{sdcch,tch,static_sdcch,static_tch}

Related: SYS#4878
Depends: I2fa14531f16d3f07085620f1c50eb839c420da6a (osmo-bsc)
Change-Id: Ib3997a827c9cc43d1361bb0cf3bfab9f6d91bf82
2021-11-10 13:31:48 +00:00
Neels Hofmeyr 85fa37f977 bsc: comment: tweak TS reference
Change-Id: I53ec51240d6e9a0f93f784c8afee2f54226cc51f
2021-11-06 16:14:24 +00:00
Vadim Yanitskiy f0310e312f BSC_Tests: fix DTE in TC_lost_sdcch_during_assignment()
This test case fails in ttcn3-bsc-test-sccplite due to:

  BSC_Tests.ttcn:10212 Dynamic test case error:
    Using the value of an optional field containing omit.

Change-Id: I235027c2b53b8f2ae975e25eb7c38b1959668d6f
Related: SYS#5627
2021-11-06 00:54:32 +00:00
Philipp Maier 798d895071 BSC_Tests: set band in f_TC_fh_params_set
The function f_TC_fh_params_set sets frequency hopping parameters. The
ARFCN is also part of those parameters. However, this function does not
set the respective band for the ARFCN that it configurs. This results in
an invalid setting at the BSC that might cause unexpected behavior.

Lets make sure we configure the band parameter correctly before setting
the ARFCN

Change-Id: I447e4145c68c62b11b818e28f0081c19e9107647
Related: SYS#5369
2021-11-01 10:43:31 +01:00
Neels Hofmeyr e1a7c4d938 bsc: Introduce test TC_dyn_ts_sdcch8_all_subslots_used
Related: OS#5278
Related: SYS#5309
Change-Id: Iee37eef2012ce2c2e2f0a0db4c26abb75a947d84
2021-10-26 22:18:41 +02:00
Pau Espin ce4d5bb4a5 bsc: Use NUM_SDCCH_PER_BTS in dyn ts sdcch8 tests
Change-Id: I42bfa1a1e450d15cd4122e996d7936df88917891
2021-10-25 13:31:44 +02:00
Vadim Yanitskiy 07e4b633a4 BSC_Tests: fix a minor coding style issue
Change-Id: Ife5d37ebb7850f050c7db0723dfbda4d60d2db1a
2021-10-18 23:34:17 +03:00
Oliver Smith f8fe1329e2 regen_makefile.sh: set executable name explicitly
Set the executable name in each regen_makefile.sh explicitly with -e,
instead of having it set indirectly from the first .ttcn file. Make it
consistent by placing the name on top of each of these files.

Fix for warning:
ttcn3_makefilegen: warning: File `BSC_Tests.ttcn' was given more than once for the Makefile.

Related: OS#5252
Change-Id: I5ed03f8f3ed905483620dc7bae33b617bbb8507f
2021-10-13 11:12:22 +02:00
Oliver Smith 2e0e624060 regen_makefile.sh: files/flags in separate lines
Make all regen_makefile.sh more readable and diff friendly by moving
each entry in FILES and CPPFLAGS_TTCN3 into separate lines. Order
entries alphabetically.

Related: OS#5252
Change-Id: I6b6866eb9f6ec6232e4ae434517457a4c8c1c050
2021-10-12 16:35:01 +02:00
Neels Hofmeyr 34174bde0a bsc: verify TSC in inter-BSC ho (out) RR HO Cmd
Related: SYS#4895 OS#5244
Related: Iae20df4387c3d75752301bd5daeeea7508966393 (osmo-bsc)
Change-Id: Icabcedc59d80e812c3d6ba5d6db5e2bb9b319252
2021-10-02 15:01:35 +02:00
Neels Hofmeyr 6a955cc46d bsc: verify TSC in RR HO Cmd of TC_ho_neighbor_config_*
Related: SYS#4895 OS#5244
Related: Iae20df4387c3d75752301bd5daeeea7508966393 (osmo-bsc)
Change-Id: I09cb07561a57527880b87147495619a3bbbceb3f
2021-10-02 15:01:35 +02:00
Neels Hofmeyr c741fcb426 bsc: TC_ho_int: verify TSC in HandoverCommand
For intra-BSC handovers, also verify the correct Training Sequence Code
in the RR Handover Command (not only in the Channel Activation as added
in previous patch).

Related: SYS#4895 OS#5244
Related: Iae20df4387c3d75752301bd5daeeea7508966393 (osmo-bsc)
Change-Id: I32e3553581eb17812082f1f2ee96cc978e8db668
2021-10-02 15:01:22 +02:00
Neels Hofmeyr c2cf45481a bsc: TC_ho_int: verify TSC in Chan Act
OS#5244 reports an error in the Training Sequence Code used in the
Channel Activation for a handover target channel. Verify the TSC to
uncover this bug.

Related: SYS#4895, OS#5244
Related: Iae20df4387c3d75752301bd5daeeea7508966393 (osmo-bsc)
Change-Id: I1ed6f068c85b01e5a2d7b5f2651498a1521f89af
2021-10-02 13:11:22 +02:00
Neels Hofmeyr bf7202046d bsc: add const list of TSC expected per BTS
Reduce code (comment) dup by having one const definition for default
TSCs instead of magic numbers.

Will add another use of this in upcoming patch testing correct TSC in
handover.

Related: SYS#4895
Change-Id: I3733ebbbfd74630e095a08b83023974aad177b34
2021-10-02 13:10:58 +02:00
Neels Hofmeyr 92cfa1c45a bsc: add TC_lost_sdcch_during_assignment()
Reproduce a segfault happening when the SDCCH (primary) lchan is lost
in-between a TCH Channel Activ and its Channel Activ Ack.

Related: SYS#5627
Related: I3b1cd88bea62ef0032f6c035bac95d3df9fdca7a (osmo-bsc)
Change-Id: I81cccdea450885d5241cab62000ad355d464dd49
2021-09-29 16:02:01 +02:00
Neels Hofmeyr 40a45d143f bsc: fix TC_reassignment_fr for SCCPlite test suite
In SCCPlite, there is only one DLCX. Turns out the DLCX doesn't have to
be part of the interlave, just call f_expect_dlcx_conns() which takes
care of AoIP vs SCCPlite expectations.

Related: SYS#4895
Change-Id: Id8931185dfa9f229ca7af033a97cabd040db0c2a
2021-09-23 23:00:05 +02:00
Neels Hofmeyr 969abd0f8e bsc: fixup for TC_cm_reestablishment: properly del MGCP ep
Fix SCCPlite run of TC_cm_reestablishment.

I'm not sure why it works for AoIP before this patch, but now it works
for both SCCPlite and AoIP.

Related: SYS#5130
Change-Id: I1c87272c5bb1ac452927054a9eef104d795e02f8
2021-09-23 22:27:37 +02:00
Neels Hofmeyr f65ce87f97 bsc: do not run TC_stat_num_msc_* for SCCPlite
Avoid test breakage in ttcn3-bsc-test-sccplite, due to different
osmo-bsc configuration.

Related: SYS#5542
Change-Id: Iaf976ac12dbb2ee1930a7acfcf3cb452db34beed
2021-09-23 18:41:13 +02:00
Neels Hofmeyr 5d7d13f5eb bsc: add TC_ctrl_trx_rf_locked
Related: OS#5542
Depends: Ie46fd730797b64fb185d705c3507e36f5f23ef4b (osmo-bsc)
Change-Id: I2bb5096732f75a7341c7e83951e63c5a2038b469
2021-09-14 08:31:04 +00:00
Neels Hofmeyr a41ae30a1e bsc: verify new CTRL 'rf_states' and 'bts.N.rf_states'
Related: SYS#5542
Depends: I14fa2678fc8f2c11a879c5e9615ac552782c5b7e (osmo-bsc)
Change-Id: I01e6f391a5e71b0606c42be9b57f8a1687d59bcb
2021-09-14 08:31:04 +00:00
Neels Hofmeyr 5ce3ae400d bsc: add TC_stat_num_bts_connected_* tests
Related: SYS#5542
Depends: I2057a798e681a169cc03243a09b3d6449734c010 (osmo-bsc)
Depends: Idace66b37492fe96b2f2e133a69cac7960ca279c (libosmocore)
Change-Id: Ic1b35b7406547f92818afe399a2383d154576409
2021-09-14 08:31:04 +00:00
Neels Hofmeyr 0bc470d206 bsc: add TC_stat_num_msc_connected* tests
Verify MSC connection count stats.

Related: SYS#5542
Depends: Idace66b37492fe96b2f2e133a69cac7960ca279c (libosmocore)
Depends: If76bbf9b3adb64c68d5c31c6b526fa71a99996ae (osmo-bsc)
Change-Id: I178dcf4516606aa561d47b06061b8a416d3c40cf
2021-09-14 08:31:04 +00:00
Neels Hofmeyr 9db8e0e077 bsc: reset MSC link stati in f_init()
I want to add tests that verify the stat items reflecting the MSC
connection status. To be able to run a test expecting fewer connected
MSC after a test that launched more MSCs requires the links to be reset.

Related: SYS#5542
Depends: I1975941b790d2b30d0904d41e456220cba26ecff (osmo-bsc)
Change-Id: Ice3056dc46c94f9399f8379db7aeb7193782f2f2
2021-09-14 08:31:04 +00:00
Neels Hofmeyr 58be48a16a bsc: make TC_stats_conn_fail less fragile
Add a delay between sending the RSL Conn Fail IND and checking the stats
values, so that osmo-bsc has a good chance of receiving the message and
promoting the failure into the stats values first.

Even though jenkins shows no failures, when testing locally, this test
fails a lot for me without that bit of delay.

Change-Id: Iaf0173239528337283b23f70840d36ad25f14950
2021-09-14 08:30:13 +00:00
Neels Hofmeyr 2315874f28 bsc: add TC_imm_ass_pre_ts_ack
Also test the early IA feature for non-dyn TS in 'pre-ts-ack' mode, for
completeness' sake.

Related: SYS#5559
Change-Id: I6ba84b4b618dd99ec2095aaf611209e525f2b5f4
2021-09-09 11:46:27 +00:00
Neels Hofmeyr 07603cffe9 bsc: properly check TSC and ARFCN in early IA tests
Tests have shown that the Training Sequence Set was not correct in early
IMM ASS messages. Add validation of the TSC and ARFCN in IMM ASS
messages for all early IA related tests. This makes the tests fail.

Related osmo-bsc patch linked below makes the tests pass again.

Related: SYS#5559
Related: I9f26074154600d854a0b3baee2f38a6666f4cb56 (osmo-bsc)
Change-Id: I4479244b0c53648e62e84e1ebf986f51d659484f
2021-09-07 19:24:23 +02:00
Oliver Smith 59a843cac1 Cosmetic: bsc: remove outdated comment
The mentioned bug was fixed 3 years ago, and there are already lots of
tests below so remove the comment.

Related: OS#3182
Change-Id: I3df4dbd1647dae78eccd31c49c3aec3cf9e12a6f
2021-08-27 08:26:21 +00:00
Oliver Smith af03bef6a2 bsc: add TC_stats_conn_fail
Verify that stat bts.N.chan.rf_fail_sdcch works correctly.

Related: SYS#4878
Change-Id: I310ea1609168bc26790875767943e0545ed05177
2021-08-27 08:24:23 +00:00
Neels Hofmeyr c8b95c1b04 bsc: add TC_imm_ass_pre_ts_ack_dyn_ts
Test the experimental 'immediate-assignment pre-ts-ack' implemented in
I19e6a3d614aa5ae24d64eed96caf53e6f0e8bb74

Related: SYS#5559
Change-Id: I2ae28cd92910d4bc341a88571599347a64a18fe5
2021-08-17 22:06:57 +00:00
Neels Hofmeyr 7a6d0607b2 bsc: add TC_imm_ass_pre_chan_ack_dyn_ts
Related: SYS#5559
Change-Id: Ic5a3b930c57a5c61514137986eb4f8f8c1f2a1ba
2021-08-17 22:06:57 +00:00
Neels Hofmeyr b07b295bb0 bsc: add TC_imm_ass_pre_chan_ack
Add tests for the new early IMM ASS feature in osmo-bsc:
  'immediate-assignment (post-chan-ack|pre-chan-ack)'

Related: 0b44493d3de03d2750527e224df67b473fe39f93 (osmo-bsc)
Related: SYS#5559
Change-Id: If71f4562d532b6c5faf55f5fd073449a8a137ebf
2021-08-17 22:06:57 +00:00