Commit Graph

1820 Commits

Author SHA1 Message Date
Pau Espin 123ec855a0 gitignore: Add *.d files
my ggsn_tests directory becomes bull of those files after make
ggsn_tests.

Change-Id: Iece4dc883db95c2ea3b6c50a55ff34022a4c0bd6
2020-03-03 16:48:34 +01:00
Harald Welte 9d09c4d3fd ttcn3_makefilegen: Generate gnu make files (we use Linux...)
Change-Id: I21de4dd375139ad24c742c12a948f7ba0b0ade76
2020-03-02 14:25:47 +01:00
Harald Welte 4895d7a1d3 BSSGP/IuUP: Fix license disclaimer copy+paste
The license disclaimer already stated GPLv2-or-later, it just stated
confusingly you should look at the AGPL for reference.  Fix that.

Change-Id: I673c5c177a8e4010921f1fed747ce376f274da54
2020-03-01 20:27:19 +01:00
Harald Welte b12a0ffc03 remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range()
Validate if osmo-remsim-server permits out-of-range integers in REST.

Change-Id: I449541420a15826ed0d2f1460e3ca4b3468662c3
2020-02-20 18:48:22 +01:00
Harald Welte 3993c81b79 remsim: Add TC_slotmap_del_nonexistant()
Let's test that deleting a non-existant slotmap from server renders
HTTP status 404.

Change-Id: Ib74fea146017ffc68b75ec175472842b689891c3
2020-02-20 10:12:28 +01:00
Harald Welte b79bc601da remsim: Update TODO list
Change-Id: I1c6b1c7c1ced88db56940d2cef78193a13a15af6
2020-02-20 10:06:15 +01:00
Harald Welte 15be5d6866 remsim: Add global guard timer to client+bankd tests
Change-Id: I85d436a91d1c805f2fb66138ef7e2fb73107f2d1
2020-02-19 20:09:02 +01:00
Harald Welte 34b9da299c remsim: Add tests using stdin/stdout of osmo-remsim-client-shell
osmo-remsim-client-shell allows to send C-APDU via STDIN of the program
and receive R-APDU via STDOUT.  We can attach to that using the PIPEasp
TTCN3 port, and hence test a [local] osmo-remsim-client-shell
transceiving APDUs from/to a simulated bankd in the test case.

The only sad part about this is that we now will need to have the
implementation under test (osmo-remsim-client-shell binary) in the
same container as the TTCN-3 test, as it will fork/exec it.

This is why we disable it by default and a modulepar must be used to
enable those particular tests.

Change-Id: I3a69c692cf3e6bbe04ce58594050b20da0c37d16
2020-02-19 19:56:30 +01:00
Harald Welte 625faadb76 Native_Functions: Add f_str_to{lower,upper}()
TTCN-3 interestingly doens't seem to have any case-insensitive string
matching or functions to convert to uppwer/lowercase.

Change-Id: I2e6e0fd2da001a3cc6d9c31c9e766ae54bf17b2f
2020-02-19 19:52:22 +01:00
Harald Welte 8aefd11dd2 deps/Makefile: Call Github repositories ECLIPSEGITHUB
ECLIPSEGIT and ECLIPSEGIT2 are really difficult to distinguish,
let's call the former ECLIPSEGITHUB, i.e. the eclipse organization
at github.

Change-Id: I3a12164f76b85168c3afe85af2dd4be42f3e560b
2020-02-18 21:47:06 +01:00
Harald Welte 6effabbd62 DIAMETER: Add tr_DIA_AIR() to send AuthInfoRequest
Change-Id: Ib30fafaa2c660d32e864a57f4d3b0f50a158de6c
2020-02-18 21:39:59 +01:00
Harald Welte 9073295230 remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn
VPCD (specifically ifd-vpcd) is an ifd-handler (reader driver)
for a virtual smart card reader integrated with pcsc-lite.  It is
part of the virtualsmartcard project.   Using this ifd-vpcd, we
can implementa virtual smart card reader beneath osmo-remsim-bankd,
which allows us to implement both the smart card [reader] below
osmo-remsim-bankd as well as the osmo-remsim-server + client above
osmo-remsim-bankd - in other words a fully virtualized test fixture for
bankd.

Change-Id: I967f2d526f4ef1278bd2ac1d590a8dce732379d5
2020-02-17 22:47:11 +01:00
Harald Welte 776b0e5444 remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect
This extends remsim-client test coverage to situations where the
server removes an existing/established mapping, and possibly later
establishes a new mapping.

Change-Id: I8df29a91718b6b2829415fc040b647a58eb71292
Related: OS#4399
2020-02-16 16:33:06 +01:00
Harald Welte c7b496cd06 remsim: More comments in RemsimClient_Tests
Change-Id: I02363eaaaae6d7b849cd2a1d2b07f1343d58c2f2
2020-02-16 16:33:06 +01:00
Harald Welte 77cde21fb5 remsim: New TC_slotmap_del_active_client() test
This test verifies that a slotmap delete via REST will not only
delete it from the bankd, but also from the client.

Change-Id: I8c4e53231b5386b00fe2938cde2091aa8b2e2027
Related: OS#4399
2020-02-16 15:35:59 +01:00
Pau Espin 5a012eed43 bts: Introduce new module for performance tests
A new module is created since its tests are aimed at running against
real HW set ups to check performance of the system under high loads.
As a result, tests in here will usually require a specific config file.

One first test is introduced to activate all TCH/H channels and see if
the BTS (+BTS-TRX) can keep on going fine for a while.

Related: OS#4365
Change-Id: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d
2020-02-13 12:39:35 +00:00
Oliver Smith 36cb88c6cc deps/Makefile: fix ECLIPSEGIT2 clone URL
Switch to working clone URL, after more repositories stopped working
with the old URL. Revert 865ba37553
("deps: Work around disappearing eclipse.org git repositories").

Related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=559943
Change-Id: I04b690a262765f60b671225e1a5425e2750d093f
2020-02-10 11:25:26 +01:00
Harald Welte 865ba37553 deps: Work around disappearing eclipse.org git repositories
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=559943
and https://bugs.eclipse.org/bugs/show_bug.cgi?id=559944

Change-Id: I8942e71e674d46dda7fb81d2076fa189ee31eecd
2020-02-08 14:17:33 +01:00
Harald Welte c5a8021557 remove titan.TestPorts.GPIO module
We don't use it, and it suddenly disappeared from git.eclipse.org,
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=559942

Change-Id: I5e5b9ab3dca9ff574980dad37616cdc981dd8607
2020-02-08 14:02:45 +01:00
Oliver Smith 421ea89aab hlr: add TC_MSLookup_mDNS_service_other_proxy
Ask proxy HLR about configured sip.voice service, and expect result.

Related: OS#4380
Change-Id: I2c956119783972b5e6828bed7554a8a79984d8a2
2020-02-06 16:21:47 +00:00
Oliver Smith da83c8307c hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_proxy
Ask proxy HLR about gsup.hlr service, and expect no answer.

Related: OS#4380
Change-Id: Ic42c909e6540b2294b1109dc19c1df348224457b
2020-02-06 16:21:47 +00:00
Oliver Smith 18b48081fe hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home
Request "gsup.hlr" service right after creating subscriber from the home
HLR. "TC_MSLookup_mDNS_service_other_home" is similar, but does not query
the "gsup.hlr" service. The "gsup.hlr" service has a different code path
in OsmoHLR:
- it exists without being explicitly configured and returns the IP and
  port of the HLR's own GSUP server
- the request is answered, even if the subscriber is not attached to the
  HLR (for Location Update via proxy)

Related: OS#4380
Change-Id: Id567989e4be7ac2d3857d3ea61a1ca3a2401a8dc
2020-02-06 16:21:47 +00:00
Oliver Smith b51a53fdfa hlr: add TC_MSLookup_GSUP_proxy
Let OsmoHLR act as proxy between MSC and home HLR during Location
update.

Related: OS#4380
Change-Id: I945e651f1346e56dbe3c02d9d08ccd95cc8d6626
2020-02-06 16:21:47 +00:00
Oliver Smith d5696eb56e library/DNS_Helpers: add f_enc_IPv4
Used by upcoming D-GSM test, to pass the IP of the emulated GSUP server.
The code is based on f_enc_dns_hostname() in the same file.

Related: OS#4380
Change-Id: I8a5450988711680c93cfd657a34db759a56bc41e
2020-02-06 16:21:47 +00:00
Oliver Smith 07786da45b library/GSUP_Types: add dest name to some messages
Prepare for upcoming D-GSM test, that lets OsmoHLR act as proxy. It
forwards the messages based on the destination name, so the testsuite
must set it correctly.

Related: OS#4380
Change-Id: I7623b7a7c7a18ba18a38d0834979d18ab0fbb961
2020-02-06 16:21:47 +00:00
Oliver Smith 6e81f7e940 hlr: add emulated GSUP server (second HLR)
Prepare for upcoming D-GSM test, which needs to emulate a GSUP server.

Related: OS#4380
Change-Id: Idbfe8a145c90a524145089a06d9bbefac4d7edd8
2020-02-06 16:21:47 +00:00
Oliver Smith deb80a6a82 hlr: add TC_MSLookup_mDNS_service_other_home
Send an mslookup mDNS request to the home HLR, asking about a service
that is not "gsup.hlr". Hence the "_other" in the test name, service
"gsup.hlr" has different code paths, and related tests will be added in
follow-up patches.

This is the first test using MSLookup_mDNS_Emulation, so add related
test infrastructure.

Related: OS#4380
Depends: osmo-hlr I2fe453553c90e6ee527ed13a13089900efd488aa
Change-Id: Ia7f92d33691f910549353b16a7b0efc18e521719
2020-02-06 16:21:47 +00:00
Oliver Smith 39ca7c3fe8 deps: set titan.TestPorts.UDPasp_commit
Fixes: 7c5cb6eb8a ("deps: use UDPasp from osmocom github fork")
Change-Id: I141b906d2a5969afb5f6e27413fa1c18c54d5708
2020-02-06 16:21:47 +00:00
Daniel Willmann 69cfc5e417 SGSN_Tests_Iu: Enable Iu tests that made the SGSN crash
Depends: osmo-sgsn I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2
Change-Id: I96851c7c06c8f95ad280a275c2b83d825f0c88cb
Related: OS#3727
2020-01-28 14:44:39 +01:00
Daniel Willmann 1c1161119d SGSN_Tests: Wait for RAU Accept after receiving SecurityModeCmd
We don't want to pass the test or return from this function before
receiving a RAU accept. With Iu we expect a Security Mode
Command/Complete before the routing area is updated, but we do want to
wait for the actual RAU Accept or fail when receiving a RAU Reject.

Change-Id: Id89e2c6dae8cbdb5e8dee1c92960dc3346590a95
Related: OS#3727
2020-01-28 14:41:57 +01:00
Daniel Willmann 1c2ff0fa93 SGSN_Tests: Only call f_bssgp_client_llgmm_assign for Gb RAN
Calling this function with Iu RAN (ran_index > 2) does not work because
BSSGP_PROC[ran_index] doesn't exist.

Change-Id: Ieef654e3886759a40763ece3903de9127ba8d9c6
Related: OS#3727
2020-01-28 14:39:25 +01:00
Pau Espin e30d543576 sccp: Introduce test TC_it_avoids_tiar
Related: OS#4343
Change-Id: I3a970a9b7ed7fb178095760025dd83c570dcff5e
2020-01-21 14:22:20 +01:00
Pau Espin 1269b1b4c6 sccp: verify inactivity timers are not started in TC_udt_without_cr_cc
Related: OS#4343
Change-Id: I2cc5e41e33aac300d33887caed1cc3fbdffcbb17
2020-01-21 14:22:15 +01:00
Pau Espin 392eaf32fe sccp: Don't use hardcoded SCCP local references
as tests are added or order is changed, local references used by the system under test may
change, so let's take and use the one notified instead of harcoding
values.

Change-Id: I2b52cc637c20d5644f413030edd9040a6e6bfe2f
2020-01-21 13:18:41 +01:00
Vadim Yanitskiy 2521906537 MSC: add a test case to check T3212 expiration during paging
Long story short: some time ago I noticed that OsmoMSC crashes if
T3212 expires during the Paging procedure. This is not the case
anymore (as the test case shows) and apparently the bug has been
fixed, hovewer I believe it makes sense to add this test case.

Change-Id: If9147ae8b07d5120d2853b9acda2313910ac48be
2020-01-20 20:54:00 +00:00
Pau Espin f7ba234acf sccp: Introduce TC_udt_without_cr_cc
Change-Id: I752af1ae4a34d8d72472e716fe721198f1ba46b1
2020-01-20 20:24:10 +01:00
Pau Espin a2473da683 sccp: Introduce test TC_tiar_timeout
Existing templates are moved to SCPP_Templates.ttcn and new ones
required for the test are added there.

Related: OS#4343
Change-Id: I7b56fe77ac3b350d722c74b043e6ecabc48dcf31
2020-01-20 20:15:26 +01:00
Pau Espin 94b7a68f76 sccp: Stop test on rx unexpected sccp msg
Change-Id: I3889d7f275d3461fb51209d28c101a5570aca9b3
2020-01-20 19:31:46 +01:00
Pau Espin 6cd16469ff stp: Remove unneded copy of ConvertASPAddressToEncodedAddress_itu()
Since commit d0575c2fd8, we are using a
forked version of titan.ProtocolEmulations.SCCP with a change to allow
us to run those function directly from its module, no need to copy them
anymore.

Change-Id: I5fe700bd751e1f8f432d052ae6a2f013c5b89580
2020-01-20 18:18:45 +01:00
Oliver Smith 7c5cb6eb8a deps: use UDPasp from osmocom github fork
Has additional SO_REUSEADDR patch, which is needed for D-GSM mslookup
mDNS testing.

Related: SYS#4618
Change-Id: Ie7e1c3dbd67dba9079a5768e442faffc936fd7fa
2020-01-20 07:32:40 +00:00
Oliver Smith 66fde7672e deps: add titan.ProtocolModules.DNS
To be used in mslookup mDNS tests.

Related: SYS#4618
Change-Id: I89dd528b7934892c5a24209374e8218a95db6ab3
2020-01-20 07:32:16 +00:00
Oliver Smith 62a1c63436 hlr: f_perform_UL: add CnDomain parameter
Make it possible to do CS location update, not only PS. This is needed
for upcoming D-GSM related tests.

Related: SYS#4618
Change-Id: Idd699f054c9242614b9bea066428293f8b2da9c2
2020-01-20 07:31:45 +00:00
Pau Espin e187091e16 sccp: Rename module param sccp_cfg to mp_sccp_cfg
Change-Id: Ied9fbfb9bd35a99205ca13db033dd9ea03d51238
2020-01-17 17:34:23 +01:00
Harald Welte 9adf57b5ac Add SCCP_Tests_RAW for testing the actual SCCP implementation
Using SCCP_Tests_RAW.ttcn we can trasnceive decoded MTP3 primitives
containing decoded SCCP messages against a remote SCCP implementation.

Related: OS#4343
Change-Id: I07c43cfac9cdbdeccf102cd08309ca9ec64968cc
2020-01-17 17:34:23 +01:00
Pau Espin c64d7269b2 sccp: Modify SCCP_tests to be run against sccp_demo_user in srv mode
It's easier to handle several tests if they are the ones connecting to
the program under tests.
Forthcoming SCCP_Tests_RAW require use of this mode too.

Take the chance to tweak other values which were wrong, in order to have
CR answered correctly with a CC later on.

Related: OS#4343
Change-Id: Ibf99b1546411b9a9b4375b82f1003d93d3c1645d
2020-01-17 17:25:46 +01:00
Vadim Yanitskiy 2d3f846572 MSC/SMPP: fix RP-ACK expectations in TC_smpp_mo_sms
The MSC shall not send RP-ACK before the response from ESME.

Change-Id: Ide1376cae8e75412039b7dc9f0b8bb390eab2280
Related: OS#4351
2020-01-15 16:08:31 +00:00
Vadim Yanitskiy 3382076554 MSC/SMPP: introduce TC_smpp_mo_sms_rp_error for OS#4351
This test case reproduces the problem described in OS#4351:

  1. MS/UE submits a MO SMS which it getting touted to an ESME;
  2. MSC prematurely responds with RP-ACK to the MS/UE;
  3. ESME responds with DELIVER-SM error;
  4. SMS transaction is already terminated (by RP-ACK).

Expected behaviour:

  1. MS/UE submits a MO SMS which it getting touted to an ESME;
  2. ESME responds with DELIVER-SM error;
  3. MSC terminates the SMS transaction with RP-ERROR.

Change-Id: I33c6ea0ffdf8b8a45f587d690bdceb38fc42c898
Related: OS#4351
2020-01-15 16:08:31 +00:00
Vadim Yanitskiy e9e9301e87 library/L3_Templates.ttcn: fix length matching in tr_RP_ERROR_MT
Change-Id: Id5a4210a9f256f8bd7b0048fd65610de8c378bb9
2020-01-15 16:08:31 +00:00
Vadim Yanitskiy a358dd4398 MSC/SMS-over-GSUP: cosmetic: use a single log() call to print received PDU
Change-Id: I862766ac87715d5ad141405f343f0563fd75150f
2020-01-15 16:08:31 +00:00
Vadim Yanitskiy da77459579 MSC: fix coding style in f_tc_lu_and_mt_sms_paging_and_nothing()
Change-Id: Ide647f62150b2ca64e12044ae8dae5bb33e600c2
2020-01-15 16:08:31 +00:00