Commit Graph

20 Commits

Author SHA1 Message Date
Harald Welte 34b5a95d09 cosmetic: Update copyright statement, license notice and SPDX
Some of our files didn't have a copyright notice at all, let's add
it.  Also, update the notices in other files and ensure a SPDX
identifier is present in all but the most trivial files.

Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd
2019-05-27 10:00:06 +00:00
Vadim Yanitskiy 06e53c5999 HLR_Tests.ttcn: suspend some compilation warnings
In the most use cases of f_SS_expect() we are not interested in
GSUP_PDU returned by this function. Calling it without storing
the returned value causes TTCN-3 compiler to complain:

  warning: The value returned by function
           `@HLR_Tests.f_SS_expect' is not used

Let's make use of previously unused variable 'res', and save
the returned GSUP_PDU to make the TTCN-3 compiler happy.

Change-Id: Ifda42aa18af8076013b436364513296b2b008731
2019-03-29 16:44:11 +00:00
Vadim Yanitskiy 21c423353c library/GSUP_Types.ttcn: fix missing session state IE in PROC_SS_ERR
Both session state and session ID IEs are always being encoded
together by libosmocore's GSUP implementation. So, if a message
contains a session ID IE, session state IE shall also be there.

For some reason, the session state IE was missing in both
ts_GSUP_PROC_SS_ERR and tr_GSUP_PROC_SS_ERR templates. This
could led to incorrect matching in our test cases.

This change fixes both templates by adding the missing IE. Since
tr_GSUP_PROC_SS_ERR templete is used in HLR_Tests.ttcn, all the
affected matching statements were also corrected.

This correction doesn't affect successful test case executions,
because we don't test possible problematic situations yet. But
if something went wrong on the HLR side (i.e. SUT), the matching
statements wouldn't match the PROC_SS_ERR message correctly
and continue to wait until the guard timer is expired.

Change-Id: I44070396ce7119eab4608d9f9fb090bb223dfaa2
2018-11-29 21:42:17 +07:00
Vadim Yanitskiy effab7cfd1 HLR_Tests.ttcn: introduce TC_mo_sss_reject
As at the moment, OsmoHLR doesn't support "structured" SS, such
requests are being rejected. This test case aims to verify that.

Change-Id: I147b919d0242b3b44e39a4587bf1b4660fa58bd2
Related: OS#3651
2018-11-28 06:02:36 +07:00
Harald Welte 4ea1f8a114 HLR: Actual USSD test cases
Change-Id: I74a3419140179b1625e82d1298864e424fb81398
2018-08-08 11:06:34 +02:00
Harald Welte 4a3242ebb2 hlr: actually register simulated MSC as "MSC" identity to HLR
Change-Id: I3b6dc719318db8aef960f3249c16c20deb5793a7
2018-08-08 11:06:34 +02:00
Daniel Willmann afce86630c Stop tests after failures
Call mtc.stop after setverdict(fail), add reasons to most failures and
fail with verdict error for internal errors.

Change-Id: I9b618235939fa41160b9be6677b121963d3ec857
2018-07-24 14:19:42 +02:00
Harald Welte ed380d135d hlr: Port HLR tests to use GSUP_Emulation
Going via GSUP_Emulation (rather than using GSUP_CodecPort directly)
adds many benefits, such as:
* ability to have multiple transactions in parallel
* no silent discard/ignore of unexpected GSUP messages, like those
  for IMSIs we don't expect.

Change-Id: Id2ddd6b81c374ad6350b62fcc5442436757d66cd
2018-06-15 17:59:40 +02:00
Alexander Couzens 98aa59e064 Osmocom_VTY_Functions: move f_vty_transceive_match from HLR to this library
f_vty_transceive_match will be used by future SGSN tests.

Change-Id: Ia69ab6d5639c2e10059f88c8cc97463820cb72e6
2018-06-12 13:51:14 +02:00
Stefan Sperling 7c09687456 improve failure diagnostics in TC_vty_msisdn_isd HLR test
Check for reception of an Insert Subscriber Data with outdated MSISDN.
This happened to me while working on a fix for issue OS#2785, and it
seems to be an easy mistake implementations can make. Catch this
situation in the test and log an explicit message about the problem.

Related: OS#2785
Change-Id: Ib0809617cca621cc22f29b078828057fd49f27e5
2018-04-09 11:33:21 +02:00
Harald Welte 3f66276bd4 hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases
Change-Id: I6ded77b3029aae6bc3fe022190819b6a86189f5a
2018-03-02 10:48:20 +01:00
Harald Welte b3e3094884 f_rach_toffs: Print toffs256 value in verdict when failing
Change-Id: I82a8f7c8dd3ce3327aa43bfb9f03795531718320
2018-03-02 10:35:05 +01:00
Harald Welte 958f8b4fa4 hlr: Add testcases for PURGE_MS procedure
Change-Id: I9d54d5e4b6fe24d3ee710b57e0c69a30b89d3450
2018-03-02 08:56:59 +00:00
Harald Welte 8f0c933c2b hlr: Fix test of UL+ISD state machine
Don't exit too early: After sending ISD.resp we still need to wait
for the UL.res from the HLR before continuing processing.

Change-Id: Iab42a397cbca83b86fc8a6b26ae2d66abb81c187
2018-03-02 08:56:59 +00:00
Harald Welte 09b3c50e85 hlr: Add TC_vty_msisdn_isd
This tests whether the HLR is sending an InsertSubscriberData to the VLR
of an active/registered subscriber after the MSISDN is updated in the
HLR.

Change-Id: I597a3c2d49aa6fa65007304105363a3e99fa4ae9
Related: OS#2785
2018-03-01 22:42:22 +01:00
Harald Welte 7029606aa3 hlr: Reduce code duplication by using template
Change-Id: I7dcf0d27144e5dcf29babcb679ca9ef04b1f46a3
2018-03-01 22:42:03 +01:00
Harald Welte c2c52554ee hlr: More test coverage
Change-Id: Ic93a2e7498343abcb709d7018c4d49811252342c
2018-03-01 21:20:39 +01:00
Harald Welte 79420ccab2 hlr: Make test run again using current OsmoHLR / TTCN-3 library
Change-Id: I4304d6f69a349845d74a9dbe5e366525d5d8956f
2018-03-01 16:49:29 +01:00
Harald Welte 39b82d344a hlr: Integrate VTY and CTRL support
Change-Id: I3fbc26a98d31df6d4753848bba655a517801d686
2018-03-01 10:21:56 +01:00
Harald Welte 78cae923fa hlr: Rename module + file from GSUP_Test to HLR_Tests
Change-Id: I906c0046a4cf6ae95e5a0aca918f4375fedfea55
2018-03-01 10:12:56 +01:00