Commit Graph

3578 Commits

Author SHA1 Message Date
Vadim Yanitskiy 80726d8e8f fixup: ttcn3-tcpdump*.sh: Fix output of special chars
On ArchLinux /bin/sh is actually a symlink to bash, so bash is running
in limited mode and emulating the Bourne Shell.  The shell detection
logic added in [1] does not work correctly for me because the cmdline
would be 'sh' or '/bin/sh', not 'bash'.  This is what I am getting:

  \033[1;32m====== FooBar_Tests.TC_foo_bar pass ======\033[0m

Let's switch to printf, which does interpret the backslash escapes
as expected by default, regardless of the actual shell in use.

Also fix ttcn3-dumpcap-stop.sh, which was left untouched by [1].

Change-Id: Id28193a7ca00b5501a6852e5b4a5412fbaa5e063
Fixes: [1] bf45a5cff8
2022-12-20 15:05:55 +00:00
Vadim Yanitskiy 01d0a90b68 BSC_Tests: fix a race condition in TC_chan_rel_conn_fail
Change-Id: Ic8ee641c19f47442538eaba2b120736bec793c70
Fixes: OS#5823
2022-12-20 13:03:58 +00:00
arehbein 388decda30 Revert "WIP: ns: Add test for SNS Size NSEI IE"
Revert submission 30430

Reason for revert: I did not consciously merge these, maybe some misunderstanding of Gerrit UI elements. Although it really surprises me that merging could have happened that easily without me noticing
Reverted Changes:
I85c2dc201:WIP: ns: Add test for SNS Size Num. of IP Endpoint...
I3584b7b04:WIP: ns: Add test for SNS Size NSEI IE
Ic69c461cd:WIP: ns: Add test for SNS Size Num. of NSVCs IE

Change-Id: Ifab74bd8ae568a3099637fb53f5fe407f85952b6
2022-12-12 11:00:05 +00:00
arehbein f065016dc8 Revert "WIP: ns: Add test for SNS Size Num. of IP Endpoints IE"
Revert submission 30430

Reason for revert: I did not consciously merge these, maybe some misunderstanding of Gerrit UI elements. Although it really surprises me that merging could have happened that easily without me noticing
Reverted Changes:
I85c2dc201:WIP: ns: Add test for SNS Size Num. of IP Endpoint...
I3584b7b04:WIP: ns: Add test for SNS Size NSEI IE
Ic69c461cd:WIP: ns: Add test for SNS Size Num. of NSVCs IE

Change-Id: I2b963d8d547b7c97ba8499921e42c57bab4ffaee
2022-12-12 11:00:05 +00:00
arehbein 1d35200056 Revert "WIP: ns: Add test for SNS Size Num. of NSVCs IE"
Revert submission 30430

Reason for revert: I did not consciously merge these, maybe some misunderstanding of Gerrit UI elements. Although it really surprises me that merging could have happened that easily without me noticing
Reverted Changes:
I85c2dc201:WIP: ns: Add test for SNS Size Num. of IP Endpoint...
I3584b7b04:WIP: ns: Add test for SNS Size NSEI IE
Ic69c461cd:WIP: ns: Add test for SNS Size Num. of NSVCs IE

Change-Id: I838b9b608a939ff909efe24ce3c1fdbfb539939d
2022-12-12 11:00:05 +00:00
arehbein 928459a8ab WIP: ns: Add test for SNS Size Num. of NSVCs IE
Related: OS#5208
Change-Id: Ic69c461cdb854a1b7abd27c56d70c3cbe32e6eb7
2022-12-10 15:14:03 +01:00
arehbein 1b007f08b3 WIP: ns: Add test for SNS Size Num. of IP Endpoints IE
Related: OS#5208
Change-Id: I85c2dc201ba485d7bfdcc70e1a5f8a890023c435
2022-12-10 15:13:25 +01:00
arehbein 2a6726c547 WIP: ns: Add test for SNS Size NSEI IE
Related: OS#5208
Change-Id: I3584b7b048031c798cee9566c4cc8694bf6002ac
2022-12-10 15:11:36 +01:00
Pau Espin 00fec58871 pcu: TC_paging_cs_from_sgsn_*: Fix race condition between BSSGP tx and RLCMAC rx
It can happen that the RLCMAC req arrives at osmo-pcu before the
CS_PAGING we send to it over BSSGP, in which case osmo-pcu will schedule
an RLCMAC DL Dummy Block. Take into account this scenario to avoid
failing id it occurs.

Change-Id: I30da93835c7738aefcd84691d83f39759dd4b599
2022-12-02 14:57:44 +01:00
Pau Espin 3f2b5e41ea pcu: TC_mt_ping_pong*: Fix race condition waiting for first DL data after X2002
Since recently osmo-pcu arms the X2002 in a more fitting place (later,
when paging.cnf is received from osmo-bts over PCUIF).
Since we use same X2002 value in TTCN3 to wait for the timer to trigger,
in the past it was always fine (the X2002 at osmo-pcu always already had
triggered before the one in ttcn3 after receiving the ImmAss).

However, now the timer is roughly set at the same time in both places (ttcn3 and
osmo-pcu) and hence there may be race conditions where we request a
DL data block before the X2002 triggered at osmo-pcu, in which case we
receive a DL dummy block because the TBF is not yet in the FLOW state

Change-Id: Icc94eb0544226facddcd65be65a8a41bcfc662cc
2022-12-02 14:56:03 +01:00
Pau Espin 45b98aa0ee pcu: TC_dl_flow_more_blocks: Fix race condition waiting for first DL data after X2002
Since recently osmo-pcu arms the X2002 in a more fitting place (later,
when paging.cnf is received from osmo-bts over PCUIF).
Since we use same X2002 value in TTCN3 to wait for the timer to trigger,
in the past it was always fine (the X2002 at osmo-pcu always already had
triggered before the one in ttcn3 after receiving the ImmAss).

However, now the timer is roughly set at the same time in both places (ttcn3 and
osmo-pcu) and hence there may be race conditions where we request a
DL data block before the X2002 triggered at osmo-pcu, in which case we
receive a DL dummy block because the TBF is not yet in the FLOW state

Change-Id: I67483bc423567d1fc98eb912ece1cf5cda746119
2022-12-02 14:53:31 +01:00
Pau Espin e3e2bf6e78 pcu: Fix race condition in TC_cs_max_dl waiting for timer first DL data after X2002
Since recently osmo-pcu arms the X2002 in a more fitting place (later,
when paging.cnf is received from osmo-bts over PCUIF).
Since we use same X2002 value in TTCN3 to wait for the timer to trigger,
in the past it was always fine (the X2002 at osmo-pcu always already had
triggered before the one in ttcn3 after receiving the ImmAss).

However, now the timer is roughly set at the same time in both places (ttcn3 and
osmo-pcu) and hence there may be race conditions where we request a
DL data block before the X2002 triggered at osmo-pcu, in which case we
receive a DL dummy block because the TBF is not yet in the FLOW state.

Change-Id: If7121473a3580b40d3a658dc38b9bb1421196127
2022-12-02 14:53:28 +01:00
arehbein e66c1f8e5a ttcn3-tcpdump*.sh: Fix tcpdump procs not being killed
Also: Fix possibly empty files not being deleted.

Fixes: cf8c450ed5
Fixes: OS#5796
Change-Id: I4e17d8313755c36f130982c921abf69d78c98ae6
2022-11-28 22:52:52 +01:00
Neels Hofmeyr ef0b3e6bb4 upf: in PFCP Sess Est, use local F-TEID = CHOOSE
So far the test asked osmo-upf to use an actual IP address and TEID, but
normally it is sent with CHOOSE = 1 so that osmo-upf picks a new local
TEID and returns it with the proper local IP address in the response.

This is making the test more realistic, and also prepares for testing
Network Instance handling, where osmo-upf will need to return the proper
IP addresses for specific Network Instance names.

Change-Id: Iaba372cbb2e0cf0c5bee80b09d346f9bcb78bfbe
2022-11-28 13:48:15 +00:00
Neels Hofmeyr 021a953cac UPF_Tests.cfg: fix wrong mp_verify_gtp name
The proper name is mp_verify_gtp_actions.

jenkins is not affected because it uses another .cfg from
docker-playground.git.

Change-Id: Ia13407db795021a2c3e2923c08b63ad6cdd6b0f9
2022-11-28 13:48:15 +00:00
arehbein be074e1964 ttcn3-tcpdump-stop.sh: Don't use lsof
`lsof` isn't available in the docker image, use /proc fs instead to get
the shell type

Related: OS#5736
Change-Id: I38e132f49b0711d611d08b61c28b3092c991a191
2022-11-25 23:35:51 +01:00
arehbein bf45a5cff8 ttcn3-tcpdump*.sh: Fix output of special chars
Don't print '-e' option in non-bash shells.

Related: OS#5736
Change-Id: Idac0f902d2f5eb142a3f130409451c8f77b111f6
2022-11-25 23:35:36 +01:00
arehbein bc85a324be ttcn3-tcpdump*.sh: Log stderr separately to file
The old output is preserved, too, in order to ensure
compatibility with expectations regarding legacy behavior.

Related: OS#5736

Change-Id: Ia92ff32c8ce09ab7805c5509837ec88fa4b864c5
2022-11-25 23:26:06 +01:00
arehbein cf8c450ed5 ttcn3-tcpdump*.sh: Fix scripts hanging on sudo prompt
Related: OS#5736

Change-Id: I05687f9bc0bb87c6f1d5c42ba235dbb90a49aeb6
2022-11-25 16:22:00 +01:00
Vadim Yanitskiy 94e60c851c {sgsn,gbproxy}: do not link non-existent TCCConversion.hh
Change-Id: If1a3b0bac7438aa49faa905c8879d096248edfb7
2022-11-24 03:56:46 +07:00
Vadim Yanitskiy 5bdbb252e8 library/Osmocom_Gb_Types: fix wrong IEI in ts_BSSGP_LLC_PDU
Change-Id: I219119a4e10e7a8e2ff40aabc1e526568c06f50a
2022-11-24 03:54:17 +07:00
Alexander Couzens 9e8e96feea sccp: add debug output when the expected PDU doesn't match
Change-Id: I0fab79fd333f4fdbd5b249d6ede26a5aad214ef1
2022-11-22 18:49:27 +00:00
Alexander Couzens 3b2b32e90f sccp: fix duplicated beginning of the comment
Change-Id: Iecc615dc3fa7ef17d7e58e49c780d054df0b53af
2022-11-22 18:49:23 +00:00
Neels Hofmeyr 366cdc7ec9 UPF_Tests: adjust to rename 'endecaps' to 'tunend'
osmo-upf has changed the naming of GTP action kinds, need to adjust the
test here to avoid failing tests.

Related: I49ac7b1f8b5b74f586edfed1dfb29f9af55a521b (osmo-upf)
Change-Id: I6fe4a4cf02ca05b772491d11a5edbdbd7b0b429a
2022-11-21 17:20:08 +01:00
Vadim Yanitskiy e94d9e9543 library/RLCMAC_Types: add spec. reference for the PTCCHDownlinkMsg
Change-Id: I799848f3429d6fcfb68a91648d5aaeccd2a77a7f
2022-11-16 01:35:33 +07:00
Pau Espin bfad97fa2b ggsn: Parametrize T3-RESPONSE and N3-REQUESTS
Since osmo-ggsn.git Ia15c1cfd201d7c43e9a1d6ceb6725ddf392d2c65 osmo-ggsn
supports configuration of X3 timer, which should be set to (T3-RESPONSE
* N3-REQUESTS) configured at the peer.
The default values are 5 and 3 respectively, hence X3 is by default
5*3=15 seconds.
Let's use that default value for now.
Once new osmo-ggsn version is released, we can speed up test duration by
decreasing the values of the module parameters introduced in this commit
and configure VTY gtp timers at osmo-ggsn accordingly.

Related: OS#5485
Change-Id: I02c0982674b43317a5fc8f341c03eeeb1efee77f
2022-11-05 00:20:53 +00:00
Oliver Smith a67730465e BSC: extend TC_ho_meas_rep_multi_band for ARFCN=0
Adjust the test to also check the special case ARFCN=0, which is at the
end of each sub list.

Related: OS#5717
Related: osmo-bsc Ic5e4f0531e08685460948b102367825588d839ba
Change-Id: Ia8f94d72651061427afc9e34f678544f89d0149b
2022-11-04 14:17:59 +00:00
Oliver Smith c9a5f53ede BSC: add TC_ho_meas_rep_multi_band
Related: OS#5717
Related: osmo-bsc Ic5e4f0531e08685460948b102367825588d839ba
Change-Id: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286
2022-11-04 14:17:59 +00:00
Oliver Smith 39f530751f BSC: reset handover related vty cfg after ho tests
Reset the handover related configuration to what is in osmo-bsc.cfg
after running handover tests.

Change-Id: I8ca6909dec633f0c1f26b5e72a7cfc1931c0ec54
2022-11-04 14:17:59 +00:00
Pau Espin 99e00b480d pcu: Introduce tests TC_ul_tbf_{1,2}phase_while_dl_ass_pch
Related: OS#5700
Change-Id: I6a72c36265bfdc757180cbb466492ad6bbbf16ad
2022-11-04 09:35:37 +00:00
arehbein a084fbe605 Fix missing quotes for possibly unresolved variables in shell test-statements
Related: OS#5736

Change-Id: I7e7f4f95d1a7cc886360c733908c63a2843b0906
2022-11-02 17:36:35 +00:00
Vadim Yanitskiy 6ff06a301b BTS_Tests: fix TC_conn_fail_crit: tune the MS back to BCCH
osmo-bts-trx declares a connection failure when the radio link counter
S reaches 0.  This counter is decreased every time the Viterbi decoder
yields a decoding error on the Uplink SACCH.  For more details, see
3GPP TS 45.008, section 5.2.

The scheduler in osmo-bts-trx expects NOPE indications to be sent by
the transceiver in the absence of valid Uplink bursts.  However, due
to the asynchronous nature of TRXD link, our virtual Um interface
implementation, fake_trx.py, does not generate NOPE indications on
it's own.  Instead, trxcon is sending empty TRXDv0 PDUs (BURST.req),
which are then translated to proper TRXDv1 NOPE.ind by fake_trx.py.

The TC_conn_fail_crit currently sends L1CTL_DM_REL_REQ in order to
simulate connection loss, what makes trxcon disable all active
timeslots and thus stop sending NOPE.req to fake_trx.py.

Let's tune trxcon back to BCCH, in order to ensure that NOPE.req
messages are still being sent, so that osmo-bts-trx will be able
to declare a connection failure over the RSL as expected.

Change-Id: I34aee95111eafea90eeeea861682f1b4547d7b03
Related: Ic292d180ba64206fb4d88adb284f9f9d058b4587
2022-11-01 00:02:00 +07:00
Pau Espin 15b2b94883 cosmetic: pcu: Fix typo in several comments
Change-Id: I7a2419514582cb9efd8df126bf449711f78586fe
2022-10-28 15:08:44 +02:00
Pau Espin 0b6b0d0bdb pcu: Introduce test TC_ul_tbf_finished_pkt_dl_ass_pch
Related: OS#5700
Change-Id: Id99b048e7c305fe616bb54437313a1e45449ff57
2022-10-28 15:07:11 +02:00
Neels Hofmeyr e860fc49d9 msc: test auth options, and fall-back to no-auth
Test 12 permutations of
(auth optional,required) x (a5 '0', '0 3', '3') x (hlr has auth info)

In TC_auth_options_2(), expect behavior after implementing OS#4830: if
the HLR fails to return auth info and auth + ciph are configured
optional, fall back to no authentication. This test will start
succeeding starting with commit
I5feda196fa481dd8a46b0e4721c64b7c6600f0d1 in osmo-msc.git.

All other tests yield the current behavior of osmo-msc.

Related: I5feda196fa481dd8a46b0e4721c64b7c6600f0d1 (osmo-msc)
Related: OS#4830
Change-Id: I8e3b02ca83e56ef5349d85f08407509e19fa353c
2022-10-26 15:35:12 +00:00
Pau Espin 262584764f mgw: Introduce test to validate Osmux<->RTP-AMR-BWE
Related: SYS#6161
Change-Id: I974e265938da15639acae7e2c9c589d5784ae5c5
2022-10-26 11:16:14 +02:00
Pau Espin 30f0667a4d osmux: Generate AMR OA payload paddings bits as 0
Some AMR format's payload size doesn't necessarily fit octet boundaries.
When AMR octet-aligned is used, padding bits are appended at the end to
fill the octet.
Until this patch, the padding bits where set with whatever payload fill
pattern was provided. Instead of doing so, better set the padding bits
to 0 to avoid conflicts when checking the received paytload later on,
since those bits are potentially be going to be set to 0 (eg when
converting to bandwidth-efficient).

Related: SYS#6161
Change-Id: I5bc68eb05c2f5500a259f4c73d14b51794f7f078
2022-10-26 11:16:08 +02:00
Vadim Yanitskiy 389d7e061f BSC_Tests: fix TC_mgwpool_pin_bts: do not leave MGW1 configured
For the purpose of testing MGW pooling, test cases TC_mgwpool_*
configure an additional MGW instance by calling f_vty_mgw_enable()
and then remove it by calling f_vty_mgw_disable().

Unlike the other two TC_mgwpool_* test cases, TC_mgwpool_pin_bts
does not call f_vty_mgw_disable() - this breaks LCLS testcases
executed after it.  Add the missing call.

Change-Id: I3157203888d704b25aabd2569035cd95d48c48b2
Fixes: 3f41e321c7
Fixes: OS#5727
2022-10-25 18:17:51 +07:00
Vadim Yanitskiy 382138e84c library: move IA/IAR RO templates to GSM_RestOctets.ttcn
Change-Id: I3d3ad6228c44fd06620e8e97f08b24346f876972
2022-10-21 11:00:35 +00:00
Pau Espin a6d488d551 bts: Log unexpected RSL message
This is useful when doing first look at failed tests in jenkins.

Change-Id: I6cdc53ff038858211b09c0a8eeec19603107ffe4
2022-10-21 10:58:02 +00:00
Vadim Yanitskiy a193def9f8 library: declare enc/dec functions for IA/IAR Rest Octets
Change-Id: I0ea850ab056dae8cd3ad3b12db0f3cc7756b424b
2022-10-21 10:35:27 +00:00
Vadim Yanitskiy 150d6d1bdc library: move IA/IAR Rest Octets to GSM_RestOctets.ttcn
Change-Id: Icd96fc461e37d1346950a4fa158e0421bd7330c5
2022-10-21 10:35:27 +00:00
Vadim Yanitskiy c6c194323b {ns,sgsn,gbproxy}: gen_links.sh: do not link unused modules
Change-Id: I8fddd010e2a3ce88c892887fc571ae54d84e931f
2022-10-21 10:35:10 +00:00
Pau Espin 3f41e321c7 bsc: Introduce test TC_mgwpool_pin_bts
Change-Id: If6e5ab5e5d3478621306e716836a5c7ddd129c0d
Related: SYS#5987
2022-10-21 10:59:59 +02:00
Pau Espin d2355e8f2b bsc: Add tests for MGW pool features
Add a couple tests to validate some MGW pool features, like load
balancing and skip selection blocked MGWs from the pool.

Related: SYS#5987
Change-Id: I6a8c30309be406e37190dc67b6ee5af13e1b9e68
2022-10-21 10:59:56 +02:00
Pau Espin 3c63053fe8 bsc: Support running several MGW node emulations
Change-Id: Ic84726c09ad3c6bea3ce6f0198db862d7dbb6dd3
2022-10-20 19:00:11 +02:00
Pau Espin 41b0f915c0 bsc: rename MGW component s/VirtMSC/VirtMGW/
Change-Id: Iad5609d691a746104933dacca62c5375063d49de
2022-10-20 16:51:16 +02:00
Pau Espin 36eeaf7478 cosmetic: bsc: Fix typo
Change-Id: Idd572b262561b03732ba825abee412e2fad17714
2022-10-20 16:50:31 +02:00
Pau Espin 1fcd93707b bsc: Update cfg files to use mgw pooling VTY commands
OsmoBSC has supported this VTY interface since more than a year ago.
Let's update the config files to use the new "mgw" node.

The recently submitted VTY commands without the redundant "mgw" prefix
are still not used here in order to have the config file work with
latest release which still doesn't support those.

Related: SYS#5987
Change-Id: I9b869e6bf4a3910f38014d570dce27e67af6e0d6
2022-10-19 13:38:30 +02:00
Pau Espin cec73acdd4 mgw: Update to contain similar config from docker-playground.git
Change-Id: I2aa4d86e548d6644f1dd9358f6b8b48a19c96c3c
2022-10-11 21:22:16 +02:00