Commit Graph

2082 Commits

Author SHA1 Message Date
Harald Welte 94528c7e58 CCID_Tests: Fix USB VendorID
The VendorID of the sysmoOCTSIM is 0x1d50, not 0x1df0.

Change-Id: Id0eda6e661bca6bed7367c3af1a38b795ea959b0
2020-07-30 22:12:30 +02:00
Harald Welte c6fde3f751 CCID_Tests: Ensure the response to "SELET MF" is two bytes (SW) long
we used to accept arbitrary length responses, which made us fail to
catch the bug described in OS#4684

Change-Id: I35721ce55b58a2f70ea30a0d1bd16d2ac58dfcab
Related: OS#4684
2020-07-30 22:12:30 +02:00
Pau Espin c6136cd4e4 Introduce test TC_si_acc_ramp_rotate
Change-Id: I29acf4f117ccea53028c780cc9feb1da1fc16739
2020-07-30 11:27:10 +00:00
Neels Hofmeyr 7944004f28 bsc CBSP: add log context for CBSP port errors
Change-Id: Ifd90e84ee65d0cb03eefc7ae1da2605650daf7ac
2020-07-29 20:03:50 +00:00
Neels Hofmeyr ee3b927ea4 bsc CBSP: add numerous mtc.stop after fail verdicts
I found that I had to wait 30 seconds after a failure verdict.

Change-Id: I8314c53037948fae51028119c81ea247baed44ec
2020-07-29 20:03:50 +00:00
Neels Hofmeyr 1011c01fb5 bsc CBSP: drop unused vars 'pages'
Change-Id: I252fed22cccfc77a4f9cfdd2a0e3070ceeefc547
2020-07-29 20:03:50 +00:00
Pau Espin 85a8443c3c bsc: Introduce test TC_si_acc_rotate
Related: SYS#4911
Change-Id: I18d0243353fce547d126d62c34415628a21cb52b
2020-07-24 11:05:44 +02:00
Pau Espin ffe4739a5b deps/Makefile: Update to newer titan.ProtocolEmulations.M3UA master containing build fix
For more info, see https://git.eclipse.org/r/c/titan/titan.ProtocolEmulations.M3UA/+/166637

Change-Id: I2550d6883464835e5977a8876c514c8ab707fac4
2020-07-24 11:03:55 +02:00
Vadim Yanitskiy 7431e9e8db GPRS_Components: s/f_ms_rx_imm_ass_pacch/f_ms_rx_pkt_ass_pacch/g
Immediate Assignment is sent on AGCH/PCH, while on PACCH we have
Packet Uplink/Downlink Assignment instead (see 11.2.29, 11.2.7).

Change-Id: I56473ae5dfa565d2c9d26984b14685a4163bf69a
2020-07-23 04:57:05 +07:00
Vadim Yanitskiy e2a6fdf304 fixup library/GSM_RR_Types: fix BYTEORDER in MobileAllocation
The following bitstring in TITAN:

   0                 N    // N = NF - 1
  -------------------->
   0001 1011 1110 0100    // '0001101111100100'B

needs to be be encoded as follows 'on the wire':

   N                 0    // N = NF - 1
  <--------------------
   0010 0111 1101 1000    // '0010011111011000'B

so it basically gets inversed => we need to use BYTEORDER(first).

Change-Id: Iea2e3a9a7a0557d1ab5d935877d2161ee0988077
Fixes: I70b1baf01859d0cf3b8cec1aed04d73fc097a9b1
Related: SYS#4868, OS#4547
2020-07-23 04:53:16 +07:00
Vadim Yanitskiy 06c416125e library/RLCMAC_CSN1_Types: fix length field in GprsMobileAllication
- Length of field 'MA_BITMAP' is specified in bits, not bytes;
  - The value range of field MA_LENGTH is 0..63, therefore:
    - value  0 means that field 'MA_BITMAP' is  1 bit long,
    - value  1 means that field 'MA_BITMAP' is  2 bits long,
    - value 63 means that field 'MA_BITMAP' is 64 bits long.

Change-Id: Iec19da18637febfa15bc09175bc51504c721c42f
Related: SYS#4868, OS#4547
2020-07-23 04:50:59 +07:00
Vadim Yanitskiy 9fa1db5572 library/RLCMAC_CSN1_Types: fix byte/bit order in GprsMobileAllication
According to 3GPP TS 44.060, table 12.10a.2, given that the number
of bit positions in MA_BITMAP equals NF, the first bit position
in MA_BITMAP corresponds to ARFCN_INDEX = NF-1, the last position
corresponds to ARFCN_INDEX = 0.

To put differently, the following bitstring in TITAN:

   0                 N    // N = NF - 1
  -------------------->
   0001 1011 1110 0100    // '0001101111100100'B

needs to be be encoded as follows 'on the wire':

   N                 0    // N = NF - 1
  <--------------------
   0010 0111 1101 1000    // '0010011111011000'B

so it basically gets inversed.  Let's add both BYTEORDER and
BITORDER attributes to achieve that.

Change-Id: I8f2c8c7b234605523a4fd518210b45ea3c088ff6
Related: SYS#4868, OS#4547
2020-07-23 04:50:59 +07:00
Vadim Yanitskiy 41b4dd8957 library/RLCMAC_CSN1_Types: fix definition of PacketDlAssignment
- s/PacketDlAssignmentRel1999SubStruct/PktDlAssR99EGPRS/g,
  - fix Additions in Release 1999 (missing spare bit),
  - fix RLC_MODE field (it takes 1 bit, not 2),
  - fix PRESENCE(p0) attribute (defined twice).

Change-Id: I98efe66bf43853b580f38bed36487fa10a53298a
2020-07-22 14:49:41 +07:00
Vadim Yanitskiy fdbfd6eff2 library/RLCMAC_CSN1_Types: fix definition of COMPACTreducedMA
Change-Id: If16359edf5f0a270af3223522b9bf5efb14412e3
2020-07-22 14:48:33 +07:00
Vadim Yanitskiy 4728e09ce8 library/RLCMAC_CSN1_Types: fix definition of ZeroOneGamma
Change-Id: I197f300cdfe22bba1be6341381399420e38d81ad
2020-07-22 14:48:28 +07:00
Vadim Yanitskiy a01a05531c library/Osmocom_Types: add f_rnd_bitstring() and f_pad_bit()
Change-Id: I9be55f6979c8ce1cbf5b2ef317c998ae30488e0e
2020-07-21 16:14:20 +00:00
Vadim Yanitskiy c227ea93ae library/RLCMAC_Templates: cosmetic coding style change
Change-Id: I76931373fe9e1cf0de4263c09e36442bad7c3ce1
2020-07-21 16:14:20 +00:00
Vadim Yanitskiy f3cb4ddc86 library/RLCMAC_Templates: make ts_RLC_UL_CTRL_ACK accept a template
Change-Id: Ia71401b5c0d439eeb0dc58739ef0e68b15d4123f
2020-07-21 16:14:20 +00:00
Vadim Yanitskiy cb33c74383 library/RLCMAC_CSN1_Types: make use of 'LENGTHTO(...)+N' syntax
Thanks to LaF0rge, this syntax is now supported by TITAN.

Change-Id: I16ddc3e9f57dffba3e0f2ea80eeb63be3468da06
Related: SYS#4868, OS#4547
2020-07-21 16:14:20 +00:00
Philipp Maier c60e8477f5 MGCP_Test: fix test expectation in TC_crcx_wildcarded_exhaust
The testcase TC_crcx_wildcarded_exhaust assumes a wrong number of
endpoints. Since osmo-mgw has a wrongly solved off-by-one in its
endpoint allocation it allocates the wrong number of endpoints. This
is now fixed, lets now also fix the test expection.

(The failure of TC_crcx_wildcarded_exhaust also causes
 TC_crcx_dlcx_30ep to fail.)

Depends: Change id I73b31e3c236a61ea0a6f76ef5ff98ce589f52c77
Change-Id: I73344ef8793cc81df0a1815bb8d890e7849cdd20
Related: OS#2659
2020-07-21 09:29:15 +00:00
Vadim Yanitskiy c155930c22 library/PCUIF_Types: make PCUIF version configurable
When changing the PCUIF, we have to maintain backwards compatibility
with the release versions of both osmo-pcu and osmo-bts, not only
with the recent master.  In order to achieve that, let's introduce
'mp_pcuif_version', so the PCUIF version can be adjusted.

Change-Id: I3cf7f908e606b91dd2cbddc168827dd074aed052
Related: SYS#4868, OS#4547
2020-07-20 04:32:59 +07:00
Vadim Yanitskiy 3ddb3abdc0 library/GSM_RR_Types: fix bit/byte order in MobileAllocation
For more details, see 3GPP TS 44.018, figure 10.5.2.21.1.

Change-Id: I70b1baf01859d0cf3b8cec1aed04d73fc097a9b1
Related: SYS#4868, OS#4547
2020-07-20 04:32:44 +07:00
Vadim Yanitskiy cf1ed3f960 library/GSM_RR_Types: also match MobileAllocation in tr_IMM_TBF_ASS()
Change-Id: Icb13b8414d4a784eccaae2daa85232f066f92f08
2020-07-20 04:06:16 +07:00
Vadim Yanitskiy f77421f4cf PCU_Tests_NS: use ts_PCUIF_INFO_default from PCU_Tests
Change-Id: I80b33b10603e8e8c1beee17acce65f5d3873a9b2
2020-07-19 17:43:56 +07:00
Vadim Yanitskiy b1ebcc0163 BTS_Tests: introduce and use as_pcuif_check_pdch_mask()
This altstep would reduce code duplication.

Change-Id: Ic66598e3d2706da7caca7b27b9880562b0fcb9bd
2020-07-19 17:43:11 +07:00
Vadim Yanitskiy 13a29d5f65 BTS_Tests: fixup PDCH tests: consider frequency hopping
Do not resolve frequency hopping parameters unconditionally.

Change-Id: I1735a7f155f737c384e5d1e3e6f4ac97511a1c7c
Related: SYS#4868, OS#4546
2020-07-15 14:42:02 +07:00
Vadim Yanitskiy 1d55dee29b BTS_Tests: fix PDCH tests: consider frequency hopping
Change-Id: I1d805bf5392e59c4b4834757ce6124e63b174a42
Related: SYS#4868, OS#4546
2020-07-14 21:19:34 +07:00
Vadim Yanitskiy eec14f0951 BTS_Tests_LAPDm: consider frequency hopping parameters
Change-Id: Idd1ffe0ee97805b40bb5e37645aa53a9b1dc4b0a
Related: SYS#4868, OS#4546
2020-07-14 21:07:50 +07:00
Vadim Yanitskiy a9894281ef BTS_Tests: implement optional frequency hopping support
Change-Id: If0318fd320d4f112341465844555bf8d65b5f88f
Depends: I7822c3581fccba3277a63577e740e7486307635d
Related: SYS#4868, OS#4546
2020-07-14 21:07:50 +07:00
Vadim Yanitskiy 6c71c17fc5 BTS_Tests: introduce and use helper f_l1ctl_est_dchan()
This is required for the upcoming test cases running on hopping
channels.  Dealing with module / hopping parameters in every
test case is definitely not a good idea, so let's add a function.

Change-Id: Ia4f078ebbb278246ee117f580ff93f301dc60f7c
Related: SYS#4868, OS#4546
2020-07-14 21:07:38 +07:00
Vadim Yanitskiy f7181ed9c9 library/GSM_RR_Types: share send templates for ChannelDescription
They're going to be used in other modules too, not only in BTS_Tests.
Also, take a chance to rearrange the list of arguments, so the ones
with default values are placed after mandatory ones.

Change-Id: Ia33ebf2e680f16f774a981fc33422dfe5036637f
2020-07-14 20:31:07 +07:00
Vadim Yanitskiy 5bcd91996a library/GSM_RR_Types: add ts/tr templates for MaioHsn
Change-Id: I0c5581c3d95018d808907bd2bc5e8ddd0a730bea
2020-07-14 20:31:07 +07:00
Pau Espin cdbe90306b pcu: Introduce test TC_ul_tbf_reestablish_with_pkt_resource_req
Related: OS#4657
Change-Id: Ic251339afb9caa23d9a4e7bdb135d42a36a203d5
2020-07-14 09:49:31 +00:00
Pau Espin 630c1cf9c6 RLCMAC: Improve support of Pkt Ul AckNack messages
Change-Id: I8586248f435b1a70042ea25f633b75542bbc14aa
2020-07-14 09:49:31 +00:00
Vadim Yanitskiy eb662c87e2 fixup ttcn3-tcpdump-stop.sh: add flag '--force' to gzip
When a directory path for the "build artifacts" is not specified,
'/tmp' would be used by default.  When running the same text
case more than once, gzip will be asking for confirmation whether
to overwrite the existing capture file.  Let's do this by default.

Change-Id: I357f3d9c5dc5963f4b709166bb659f3f66a721b8
2020-07-13 05:55:17 +07:00
Vadim Yanitskiy cb478ec0ab library/GSM_SystemInformation: add dec_SystemInformationSafe()
Some types of System Information (mostly the Rest Octets) are not
fully implemented, so calling the generic dec_SystemInformation()
may result in a DTE.  Let's add dec_SystemInformationSafeBT() with
"prototype(backtrack)", so it would return a non-zero integer if
decoding fails.  Let's add a wrapper dec_SystemInformationSafe()
that would additionally check the RR Protocol Discriminator.

Change-Id: Id4d73e0f3347e1d4c4c77aec75b767311d662292
Related: OS#4662
2020-07-12 12:34:49 +00:00
Vadim Yanitskiy f949f465ba ttcn3-tcpdump-stop.sh: compress capture files with gzip
Since we have enabled the GSMTAP logging, test case capture files
now contain a lot of textual information that can be efficiently
compressed with gzip.  That would make the "Build artifacts"
take much less space on Jenkins.

Change-Id: Ibdf5312bb9ff802d7ce7d00c690facdd79839782
2020-07-12 15:57:33 +07:00
Neels Hofmeyr 56f2478e9c bsc: SI2quater EARFCNs: span entire value range of EARFCNs
Change-Id: I992771826d57669d06887c776303f85ef22f6c71
2020-07-09 13:27:50 +00:00
Neels Hofmeyr ad132f286e bsc: more SI2quater EUTRAN ARFCN tests
Add more EUTRAN ARFCNs, reaching the maximum allowed amount.

Add tests with 12, 23, 42 EARFCNs, just for the sake of testing some arbitrary
numbers.

Add tests with 32 and 33 EARFCNs because before osmo-bsc
Iabeed10053ee5899b4def3509aedd25abb2410a9, only 32 EARFCNs could be stored by
osmo-bsc.

Add a test with 48 EARFCNs to verify the maximum amount of EARFCNs and maximum
amount of SI2quater multiplexes works as expected.

Add a test with 49 EARFCNs to verify the VTY error response when adding too
many EARFCNs, and showing that osmo-bsc still sends 16 SI2quater with 48
EARFCNs.

Depends: Iabeed10053ee5899b4def3509aedd25abb2410a9 (osmo-bsc)
Change-Id: I99bf9b3381812d1db6fd0757f65995bae48da776
2020-07-09 13:27:50 +00:00
Philipp Maier 16ade7860e BTS_Tests: extend rach content tests with emergency call
The testcase tests if a CHANNEL REQUEST on the RACH leads to the correct
CHANNEL REQUIRED message on RSL level. When a MS is sending a CHANNEL
REQUEST to establish an emergency call, it uses a slightly different
layout for the request reference (RA). Lets add another similar testcase
(TC_rach_content_emerg) to cover the emergency call situation as well.

Change-Id: Ie5b7af3e93efaa6d0b412d3b1c77bc9514424f52
Related: OS#4549
2020-07-09 12:40:26 +00:00
Neels Hofmeyr 66aeba4c9a bsc: add SI2quater tests for multiple EARFCNs
Shows bug OS#4652 in osmo-bsc, fixed by
I5df269f713456a6ccbb874d6b7faac4a6f123c67

Change-Id: I45382f88686ca60e68569e93569fc4cfb63a0e0d
2020-07-09 00:26:27 +02:00
Neels Hofmeyr 5e686dce2d bsc: add first test to verify System Information on RSL startup
Change-Id: I6a8ef404087efee491390dc1d2452ac323f145f0
2020-07-09 00:25:47 +02:00
Vadim Yanitskiy eacec8abb5 library/GSM_RestOctets: add SI2quater EUTRAN templates
Will be used in upcoming System Information tests.

Change-Id: I4162cc39ad351f5e96f5941116a424adc44efaa2
2020-07-08 23:12:58 +02:00
Neels Hofmeyr 666f043de6 bsc: change f_bts_0_cfg() to take a VTY port arg
Remove the 'runs on' clause, add a VTY port argument.
That allows using this function also on the test_CT.

Will be used by upcoming System Information tests.

Change-Id: Ib059d9690f92f5f76025bca2b84496716a2a4cf0
2020-07-08 15:27:50 +00:00
Neels Hofmeyr 0b7365bb57 bsc: split f_init_bts() from f_init()
For SI tests, it is necessary to first startup the VTY, then issue some config
commands, and only then start up the BTSes. By this separation that can be done
by:

  f_init(nr_bts := 0);
  f_vty_transceive(...);
  f_init_bts(bts_idx := 0);

Will be used by upcoming System Information tests.

Change-Id: I24afb07735c3827f52760214fcb7a239190c3402
2020-07-08 15:27:50 +00:00
Neels Hofmeyr bb2777451a GSM_SystemInformation: add SI2quater
Change-Id: I879c37eb51ece55d79346c6bf1a4951c3f11c77e
2020-07-08 15:27:50 +00:00
Neels Hofmeyr c865573668 GSM_RestOctets: SI2quater fixup: rename "Cell List" to "Repeated Cells"
So far the naming is so that the EUTRAN_NeighborCell sounds like it reflects a
single E-ARFCN, while in fact it contains a list of E-ARFCNs. In 3GPP TS 48.018
it is more accurately named "Neighbor Cells", in plural.

There is another "list layer" that allows repeating these lists of E-ARFCNs,
which the spec names Repeated Neighbor Cells, i.e. have a list of (=repeat) the
lists of E-ARFCNs.

  Repeated Neighbor Cells = {
     // first cells list
     Neighbor Cells = {
          cell descriptions = {
                  { e_arfcn = 1, meas_bw = 3 },
                  { e_arfcn = 2, meas_bw = 3 },
                  { e_arfcn = 3, meas_bw = 3 },
          },
          prio, thresh, ...
     },
     // second cells list
     Neighbor Cells = {
          cell descriptions = {
                  { e_arfcn = 4, meas_bw = 3 },
                  { e_arfcn = 5, meas_bw = 3 },
                  { e_arfcn = 6, meas_bw = 3 },
          },
          prio, thresh, ...
     },
     ...
  }

Adjust the naming of the SI2quaterRestOctets members to more closely resemble
this structure, adopting the naming in 3GPP TS 48.018:

  EUTRAN_NeighborCell -> EUTRAN_NeighborCells
    because it is really a collection of multiple E-ARFCNs

  EUTRAN_NeighborCells -> EUTRAN_RepeatedNeighborCells
    because it is a list of E-ARFCN lists, and 3GPP TS 48.018 names it
    "Repeated Neighbor Cells".

Also rename the EUTRAN_NotAllowedCells accordingly.

Change-Id: Ib11d72c04cdb8997ec97321257fb58b2c113e790
2020-07-08 15:27:50 +00:00
Pau Espin e1195bbc42 cosmetic: pcu: Fix whitespacing typos
Change-Id: I38f752f709e593d1cfd3489a6ac590360f22a10f
2020-07-08 11:36:33 +00:00
Neels Hofmeyr 4e18cccb9c msc: verify conn and VLR cell id in most tests
osmo-msc failed to record the Complete Layer 3 Information LAC and CI in the
MSC-A as well as the VLR record. Since osmo-msc
Iee1781985fb25b21ce27526c6a3768bf70d4dc9a and
I194271af2acb37b4f8cc2d106ab2fd2b0d443589, osmo-msc properly records these for
successful Complete Layer 3 procedures.

Incorporate verification of the LAC and CI in all tests calling f_perform_lu()
and f_expect_clear(). Implement by scraping the output of vty
	'show subscriber imsi 1234 conn'

Some tests model a failure to attach, or expire the VLR record: for those, add
parameter verify_cell_id to g_pars, and pass it as false, to skip checking the
LAC and CI.

Disable CI checking for all Iu tests globally in f_verify_vty_lac_ci(), see
OS#4634.

For the latest build, which does not yet record LAC and CI properly, provide
mp_enable_cell_id_test, which skips all cell id verification if set to false.
Put to effect by docker-playground I052fea208021509e12826c50474b96474e7a58c2.

Related: OS#4627
Depends: Iee1781985fb25b21ce27526c6a3768bf70d4dc9a (osmo-msc)
Change-Id: Ie410714a96353f74a52a104c56fa0a08683e0004
2020-07-08 01:45:09 +00:00
Neels Hofmeyr a5f0ed2ba4 GSM_SystemInformation: use GSM_RestOctets for SI3 and SI4 rest_octets
Change-Id: I3f00dd0b4863582fc5edf08149103150b8b5e97b
2020-07-06 16:49:52 +00:00