Commit Graph

816 Commits

Author SHA1 Message Date
Pau Espin feb6fa4413 log_merge.sh: Fix removal of log files
Files are not being expanded and fails:

Removing Input log files !!!
rm: cannot remove 'GGSN_Tests*.log': No such file or directory

Change-Id: I74e1f00c5e2b41668ebf2060f547fcc01212956d
2018-03-20 22:21:57 +01:00
Stefan Sperling 7b5e178290 make ttcn3 RNC paging tests pass
We do not implement paging by RNC. Fix test expectations accordingly.

Change-Id: I490fdaa9a73565c7e53e9a7eeafa0ee89c29b9d8
Related: OS#3073
2018-03-20 19:32:43 +01:00
Stefan Sperling 049a86ee1e add regression test for paging with unknown MCC/MNC
Verify that the BSC does not page a subscriber when a cell identifier
with an unknown MCC/MNC is provided by the MSC.

This test introduces a magic value which represents an unknown MCC/MNC
combination: MCC=678 MNC=f90

Change-Id: I0b0af14a9a1cb7e5a7a4ec12cc489473fd7ead02
Related: OS#2980
2018-03-20 15:51:00 +01:00
Philipp Maier 2a98a73be4 MSC_Tests: Test what happens when the DLCX is dropped
Test the reaction of osmo-msc when the DLCX at the end of a call
is not answered. Normally osmo-msc should time out and clear the
connection.

Change-ID osmo-msc:I78f1b6a9149488a4ad3f120c1e190a83c07d4b89 fixes
a regression that causes osmo-msc to segfault due to a use after
free. This testcase provokes the situation that leads to the
crash.

Change-Id: Ic124ea116496209f9a1d8e74ae3e3a36cf866db0
Related OS#2881
Related OS#2882
2018-03-19 16:12:31 +01:00
Philipp Maier cd66857671 cosmetic: correct indentation
Change-Id: I5fdb3d3db201e33456e03ffda55752efe4ada733
2018-03-19 16:12:31 +01:00
Harald Welte 5946b33e37 msc: wait for clear-command/complete/sccp-release
Not all tests were waiting/expecting the complete connection
shutdown, which results in the possibility for CLEAR CMD to arrive
during shutdown of the TITAN components and cause related errors.

Change-Id: I3a6c2e1f78b58f86ef84d4e323f432016a9afa7e
2018-03-18 23:33:42 +01:00
Harald Welte 04b5ec3ec7 fix regression in start-testsuite.sh (false shellcheck advice)
Change-Id: If05d13c0dedfedf517005e5418acc677ddc5e75f
2018-03-18 23:10:01 +01:00
Harald Welte 8734231093 Osmocom_VTY_Functions: Less logging verbosity
We don't need to print all prompts at start of every test case

Change-Id: I32d13b6f97f76ab6057cc213c1698c1eb97b9d90
2018-03-18 22:46:14 +01:00
Harald Welte bdb3c45a38 msc: Fix TC_cl3_{no,rnd}_payload
It may very well be that the MSC is first accepting the SCCP connection
and possibly sending a L3 (error) message before clearing/closing
the SCCP connection in case of errors in the COMPL L3 info.

Change-Id: I4cf08608413e9e1fb54848849baed79204f5dcd1
2018-03-18 22:46:14 +01:00
Harald Welte 96505f0fa0 BSSMAP_Emulation: handle zero-length L3 Info in f_bssap_l3_is_rr()
Change-Id: I5666911d67388347d04724635cf6f56e164a82f8
2018-03-18 22:37:34 +01:00
Harald Welte edbab816ba MSC_Tests: Fix to use 2-digit MNC
Until recently, OsmoMSC didn't distinguish 2-digit from 3-digit MNC,
and the config file states '42' as MNC while the tester used '042' in
several locations.  This causes almost all MSC_Tests fail with recent
osmo-msc.

Let's fix the tests to use '42', as they should always have.

Change-Id: Id02bfd74127cf5551923912934240035106a8a4e
2018-03-18 17:09:02 +01:00
Harald Welte ae5791defd start-testsuite.sh: Use shellcheck to harden script
Change-Id: Iaf887da7ad95ba8b1fe93fe6c29f0518961d2fbb
2018-03-18 15:22:39 +01:00
Harald Welte b537461a9c log_merge: Use shelcheck to harden the script
Change-Id: I1b3a35b5f7ada2dbb0401a5d90a77a53979e1183
2018-03-18 15:22:39 +01:00
Harald Welte e1f9b74602 log_merge: Fix input filename pattern
Change-Id: Iece1063403673a65007f41b6955e384a67acd45f
2018-03-18 15:22:39 +01:00
Harald Welte d45cef33b2 log_merge.sh: Use Module.Testcase like the pcap files
So far, pcap files used Module.Testcase.pcap while log files
used Module-Testcase.merged - let's unify this a bit.

Change-Id: I900ae41c3586bad41451bbcf481963384c6db061
2018-03-18 14:37:37 +01:00
Harald Welte e3cae215c9 Make Console Loggign a bit more verbose: add all USER "log()"
Change-Id: Ib5a78079dd31def39fb649a4e7dc027c53692abc
2018-03-18 14:16:37 +01:00
Harald Welte 5a78e109da add log_merge.sh script to generate per-testcase merged logs
Change-Id: Ife6153d2cc10f85e79e8df7a0e34a44648618976
2018-03-18 14:16:37 +01:00
Harald Welte 30010711f5 selftest: Remove unneeded broken symlink
Change-Id: I41f062e7658665e13d7ccbfecd6c5788d9b37a75
2018-03-18 12:52:23 +01:00
Harald Welte c87abfcb60 Remove M3UA/MTP3/SCCP code from this repo, use upstream repos
Originally, this code was not yet in an official upstream git repo.
However, it has been for many months, so let's remove our local copy
and use upstream git repositories like for all the other modules.

Change-Id: I2c616fb865df32cfec323d42e5d0d06de40c497b
2018-03-18 12:52:20 +01:00
Harald Welte 1d5a0ac2cf SCCP: Fix connection refusal table according to A.1/Q.713
There's one value (00010001) which is not listed in the table,
and hence the exisging code contains an off-by-one error due to
the missing line.

Change-Id: Ib2072a5fa3dabd66e0af53b77672f3a67d1e21f0
2018-03-17 22:25:31 +01:00
Harald Welte 12055479de bsc: fix shutdown
Change-Id: I23932927bd6bb9b5e447acbeafc2748a77513a0d
2018-03-17 20:30:39 +01:00
Harald Welte c306859aea bsc: Clear RSL port of all BTSs, not only those where we expect paging
After all, we don't want stale queue entries especially in those where we
are not expecting any paging.

Change-Id: Id876b68087ef13d58177027b7e664404e6b7b2d9
2018-03-17 20:30:39 +01:00
Harald Welte 24135bd27f bsc: Fix encoding of 2-digit MNC (paging tests)
The TTCN-3 data types are abstract data types,  Encoding artefacts
like 'F' for padding shouldn't be seen by the user.  Hence, let's
pass a 2-digit-long or 3-digit-long hexstring into the encoder
functions and let them determine if they should introduce any 'F'
for padding or not.

Change-Id: If4d3dfc16381493d7e710be746ed963975051fc1
2018-03-17 20:30:39 +01:00
Harald Welte 2caa106251 bsc: TC_paging_imsi_load: retransmit 'no paging buffer space'
If 5 seconds expire, the BSC will automatically re-fill a credit
of 20 paging slots [to work with BTSs where the paging buffer space
indications somehow are missing].  Let's make sure we don't hit
that case, even if the operating system sleeps for more than 5s
in this test .

Change-Id: I1c65096a685b70dc5183592382ec03553ba3628f
2018-03-17 18:21:48 +01:00
Harald Welte 3b57ab5d8f bsc: TC_paging_imsi_load: clear RSL queue before checking for paging
Change-Id: I27ce27b3f9e33e7696fee71032fe28ce9ea6327c
2018-03-17 18:21:48 +01:00
Harald Welte 8af4d797fa BSC_Tests: Fix TC_rsl_unknown_unit_id / TC_oml_unknown_unit_id
We are testing purely IPA/RSL/OML, and half-starting the BSSAP/M3UA
emulation is not a good idea, if it generatees events that we don't
catch

Change-Id: Ie90cd88e63ba6062e4ea2592045e9c97bc11887e
2018-03-17 18:21:48 +01:00
Harald Welte 6a12969ba8 BSC_Tests: Adjust TC_ctrl to match new '3 digit MNC situation
Change-Id: Ia19aeb1a7adf4f838bd289b0140a98501907d1ae
2018-03-17 18:21:48 +01:00
Harald Welte 557006605b bts: Add TC_sacch_multi_chg
Change-Id: I0b002488729f30cc8d0ff6f4ca16637c35ee956f
2018-03-17 18:21:48 +01:00
Harald Welte 075d84c895 bts: Add TC_sacch_multi to test for scheduling of multiple SI on SACCH
Change-Id: I2b9a68a0dc004c2ebc8a39f0c7b7aad690675a2d
2018-03-17 18:21:48 +01:00
Neels Hofmeyr 8df7d15a66 sgsn: test GMM Attach with 3-digit leading-zero MNC
Add general infrastructure to
- pass an MCC-MNC for BSSGP to use into f_init();
- verify that the Attach Accept PLMN matches the BSSGP one.

Add TC_attach_mnc3() to feed an MNC with three digits and a leading zero, to
verify the recent mnc3 patches. When testing against a libosmocore and
osmo-sgsn before mnc3, this results in:

Test case TC_attach_mnc3 finished. Verdict: fail reason: "mismatching PLMN in Attach Accept: 02342F; expected 023042"

With the current master branches the proper 3-digit MNC with leading zero is
fed back into the Attach Accept message.

Change-Id: I8901ec0b090e342ebb04a04f9d759fc46c7d9cab
2018-03-16 18:47:19 +01:00
Neels Hofmeyr cd11223c0f ignore results of .ttcnpp files
Add another macro ignore_pp_results to gen_links.sh.inc and call from all
gen_links.sh files, to add results of *.ttcnpp files, i.e. generated *.ttcn
files, to .gitignore.

Change-Id: Ic7fb176226771212d7700dafaf27ac71f12a4a61
2018-03-16 18:25:58 +01:00
Neels Hofmeyr 0ad8f7e098 gitignore Makefiles produced by 'make compile'
Change-Id: Ia71e76f0dce2ba2f9f5837f4d3d099dff92e8787
2018-03-16 18:25:58 +01:00
Neels Hofmeyr 310f5761d4 gitignore *.{cc,hh}, whitelist library/*.{cc,hh}
ttcn3 creates these files, and they clutter 'git status' output.

Change-Id: I6b7868ae71d3d3e710232b22a964f701ae8bd05d
2018-03-16 18:25:55 +01:00
Philipp Maier ade455b09c MGCP_Test: fix config file include path
The config file mistakenly references the defaults for the MSC.

- correct include path to use MGCP_Test.default

Change-Id: I12c6907717dfba1c31790a2b71f42e37743351af
2018-03-16 13:46:40 +01:00
Philipp Maier 94f3f1bfa6 MSC_Tests: Test SCCP clearing on release timeout
Provoke a timeout error in the MGCP FSM which then triggers a
release on the CC layer. Ignore this release and let the CC leyer
timeout. The MSC is expected to clear the SCCP connection.

Change-Id: If3e0bee11763f1c6b2cfae91f2a818ff7d0df9e7
Related: OS#2881
Related: OS#2882
2018-03-16 11:10:22 +01:00
Philipp Maier f1e02bb46b MSC_Tests: Support wildcarded endpoints (follow up)
The following tests still lack support for wildcarded endpoints:

MSC_Tests.TC_lu_and_mo_call
MSC_Tests.TC_emerg_call_imsi
MSC_Tests.TC_mo_crcx_ran_reject
MSC_Tests.TC_mt_crcx_ran_reject

- Also add support for wildcarded endpoints for those tests.

This is a follow up patch for:
Change-Id I0efeae0f8a6e98deb843e79648f84a262f1d98f8

Change-Id: I16cb2582b9d1764d7cb7e4b787368a4dd5ddf69c
Related: OS#2710
2018-03-16 09:15:32 +00:00
Neels Hofmeyr 53fb0cf22b gen_links.sh: auto-generate .gitignore files to ignore symlinks
In each subdir that is a target for symlinks, automatically ignore the results
of gen_links():

- At the top of gen_links.sh.inc, clear the .gitignore.
- In the loop, add each link name to the local .gitignore.
- In selected gen_links.sh, there is also a "manual" link creationg. So that
  this also ends up in the local .gitignore, have the link creation as separate
  gen_link() macro which at the same time adds to ./.gitignore.
- in the root .gitignore, ignore all the subdirs' generated */.gitignore files.

Change-Id: I73c11fe8362358bf7e1bdf0e1be53399b5d3351b
2018-03-16 00:08:08 +01:00
Neels Hofmeyr 1a4c4601d7 fix gen_links.sh: don't include source dir as link target
First of all, use one common place to define the gen_links() macro, in
gen_links.sh.inc.

In this new file, add a 'shift' to exclude the $DIR arg from also appearing in
$FILES.

This prevents the following wrong symlinks in the source dirs:

  M3UA_CNL113537/src/src
  MTP3asp_CNL113337/src/src
  SCCP_CNL113341/src/src

Change-Id: Ia8493e77df1ba8723f2c5d2a49816247b0fb55f7
2018-03-16 00:08:02 +01:00
Philipp Maier 4b2692d50b MSC_Tests: Support wildcarded endpoints
At the moment the testsuite is unable to detect when the call agent
performs a CRCX request with a wildcarded endpoint.

- Set a default endpoint name in cpars in case the MSC does
  a CRCX request with wildcarded endpoint name.

- Detect if the MSC supplied a wildcarded endpoint name. Do
  not overwrite the default setting in cpars then.

- Attach the endpoint name as Z: parameter in the response so
  that the MSC knows which endpoint to use. (Unconditional,
  does not harm on non wildcarded requests)

Change-Id: I0efeae0f8a6e98deb843e79648f84a262f1d98f8
Related: OS#2710
2018-03-14 21:08:20 +00:00
Stefan Sperling 83348bcfbf fix cell identifier generation in ttcn3 paging tests
The cell identifier used by the paging tests is 001-01, i.e. uses a
2-digit MNC. With the introduction of 3-digit MNC support in osmo-bsc,
the paging tests became incompatible with a osmo-bsc config with:

  network country code 1
  mobile network code 1

Explicitly declare a Cell_Identity with 2-digit MNC (includes an 'f').

Also, fix f_enc_mcc_mnc to properly encode 2-digit MNC values.

Related: OS#2847
Change-Id: Ide5228b403e43de8649b6eda18749ea2a9f592a9
2018-03-14 17:59:41 +01:00
Philipp Maier 8e58f596dc MSC_Tests: Respond to BSSMAP release
The testcase TC_mo_crcx_ran_timeout does not respond to the BSSMAP
relase request that is sent when the MGW times out.

- Acknowledge the release request before waiting for the MSC
  to clear the SSCP connection

Change-Id: Ifcf9ebd2cc5184524ecae735257ed12a0ca70f71
Related OS#2881
Related OS#2882
2018-03-14 12:33:34 +00:00
Harald Welte 3568dc7c4b PCUIF_Types: Upgrade to PCU interface v9
Change-Id: If024bbe51d91666fcfe9d3458d85ff269c327a7c
2018-03-13 17:41:51 +01:00
Harald Welte d378a256c7 bts: Verify the PCU protocol interface version
Change-Id: If2033720a38879cd2f4c4f8d3fe3fed1468da3cb
2018-03-13 17:03:46 +01:00
Harald Welte 99ca30ce2e remove *.default from [EXECUTE] in *.default files
The problem is that the .cfg file cannot override the [EXECUTE]
provided list of tests

Change-Id: I7e1e0499b3b32014b25ae4b515263f57a4ea6daf
2018-03-13 14:30:55 +01:00
Harald Welte ea17b91e78 bts: Add TC_sacch_info_mod and TC_sacch_filling
Change-Id: I38b3e302eddb699b2dbdae06fc929dd59de7b2dc
2018-03-12 16:04:54 +01:00
Harald Welte 21240e63f9 bts: Add f_rsl_transceive() flag to ignore all unrelated messages
f_rsl_transceive() is currently using a number of default altsteps,
but those are not applicable in all cases.  Let's make this
configurable, and use that flag during channel release.

Change-Id: I34d8e9350dbe2b032a7454d7f003262e27c802ad
2018-03-12 16:04:53 +01:00
Harald Welte 629cc6b77a bts: Add TC_deact_sacch()
This test case checks on each logical channel if the DEACT SACCH RSL
message actually deactivates downlink SACCH as expected.

Change-Id: Id8219ffce0635071cb50669b89368de51fe82843
2018-03-12 16:04:48 +01:00
Harald Welte 294b0a299c bts: Add f_shutdown() for clean shutdown; use it from tests
Change-Id: I225d2363c77dce969bda95ff27506bece586a34a
2018-03-12 16:04:45 +01:00
Harald Welte 3dc2046427 bts: Send DM_REL_REQ to L1 when closing logical channel
Change-Id: I0c0bb52b4de20dfd2d4ea8d0045ea63d84686ac5
2018-03-12 16:04:44 +01:00
Harald Welte 3c0a0f8a40 bts: f_rsl_transceive: Add altsteps for sacch/facch/meas_rep
It may be that during CHAN DEACT we still receive any of those messages,
which is not an error condition.  Let's activate the related altsteps.

Change-Id: Ic27b28ead3fc4bff82655d0e8d88fda01b71eca7
2018-03-12 16:04:42 +01:00