aboutsummaryrefslogtreecommitdiffstats
path: root/hlr
AgeCommit message (Collapse)AuthorFilesLines
2019-07-08hlr: update expected-results.xmlOliver Smith1-1/+7
Add check imei, create-subscriber-on-demand tests. Change-Id: I8ea4a90d5da8367f369522cfd9133e2c6061dd5c
2019-06-18hlr: add create-subscriber-on-demand testsOliver Smith1-0/+173
Test all possible code paths where a subscriber on demand can be created: * Check IMEI early * Location Update * Send Auth Info Related: OS#2542 Change-Id: Id544fa906ad442c2bbbccff437c18d04ddccde2e
2019-06-13hlr: add Check IMEI testsOliver Smith1-0/+110
Create tests for most code paths of rx_check_imei_req() in hlr.c (except for subscriber create on demand, this will be in an upcoming patch). Add missing message types to GSUP_Types.ttcn, and adjust the IMEI and IMEI_Result IEs for consistency with the existing IEs, and to make the tests compile. Related: OS#2541 Change-Id: I97c8462f0817149feadd0c4865e3df6c2af92a80
2019-06-13hlr: add f_vty_subscr_show_nomatch()Oliver Smith1-0/+13
Allow to check if a certain pattern does not match the "show subscriber" output. This will be used by upcoming tests for the check IMEI GSUP message type, to check if the IMEI was not stored, depending on the OsmoHLR configuration. Change-Id: I176d8fd2ee74e1eb7ac797f931cd6005d398740f
2019-06-09hlr: add osmo-hlr.cfgOliver Smith1-0/+23
Copy osmo-hlr.cfg from docker-playground.git, but replace all IPs with 127.0.0.1. Change-Id: I73f673523dab8765ca87851175fafdec9fc20e1b
2019-05-27cosmetic: Update copyright statement, license notice and SPDXHarald Welte2-1/+23
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-03-29HLR_Tests.ttcn: suspend some compilation warningsVadim Yanitskiy1-20/+34
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-01-23update expected resultsNeels Hofmeyr1-1/+1
Change-Id: Idacaf8343bed4a37878eacdf338c4d5eb46bf7a7
2018-11-29library/GSUP_Types.ttcn: fix missing session state IE in PROC_SS_ERRVadim Yanitskiy1-4/+4
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-28HLR_Tests.ttcn: introduce TC_mo_sss_rejectVadim Yanitskiy2-0/+51
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-12hlr: Fix DTE by requesting the correct typeDaniel Willmann1-1/+1
Previous commit d686a8a54873eb61fae7d55cb001378dae3fbd7d from Vadim introduced a copy and paste error. Change-Id: I5075b17a810762651e0c7d638cc4c35c58436cd9
2018-11-04hlr/HLR_EUSE.ttcn: remove redundant code from f_main_mo()Vadim Yanitskiy1-13/+9
There is no need to pass session state from f_main_mo() to a choosen EUSE handler (e.g. f_ss_echo), because a handler itself is capable to extract the session state IE. Change-Id: I1054baf3e7dafd05b797610b586e6202740f07b6
2018-10-24Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handlingDaniel Willmann1-1/+1
This function can now be called from anywhere to try and safely shutdown a testcase. It is not optimal as we can't call "all component.stop" from outside the mtc, but without any proper and orderly shutdown handling of all our emulation components I believe this is the best we can do. To use it: import from Misc_Helpers all; in your module and then call Misc_Helpers.f_shutdown(__BFILE__, __LINE__); You can also pass the function a verdict and a message and it will take care of calling setverdict, but beware of the following: While setverdict would accept any number of arguments as log message and convert them to a log string f_shutdown expects one charstring. It's possible to use the log2str function to use the log arguments in setverdict for f_shutdown, for example setverdict(fail, "Template didn't match: ", tmpl_foo); would become Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Template didn't match: ", tmpl_foo)); Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
2018-09-06update expected resultsNeels Hofmeyr1-1/+8
Change-Id: I32c29e62ca317937db771f8fb1540bb1fe9da2ab
2018-08-08HLR: Actual USSD test casesHarald Welte1-3/+338
Change-Id: I74a3419140179b1625e82d1298864e424fb81398
2018-08-08hlr: actually register simulated MSC as "MSC" identity to HLRHarald Welte1-0/+1
Change-Id: I3b6dc719318db8aef960f3249c16c20deb5793a7
2018-08-08HLR: Add HLR_EUSE.ttcn to implement minimal external USSD EntityHarald Welte1-0/+124
As OsmoHLR is getting support for external USSD Entities (EUSEs), we have to implement this function in the test logic in order to test it. Change-Id: Ibab210b06abfd5a21e81c7f7fbe574c4f67414a0
2018-08-07hlr: Link required libraries for USSD / SS messagesHarald Welte2-3/+19
Change-Id: I4501a4843b412dc06051c5e037764e581de1977a
2018-07-27detect VTY TELNET port connection failures (attempt #2)Stefan Sperling1-0/+1
Pass the CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT parameter to the TELNET port by default. This allows tests to make progress into an error handling path if they are started while the osmo-* program they want to connect on VTY is not running. Observed with osmo-ggsn tests, where if the one test runs into a VTY connection failure the subsequent test would get stuck forever in a map() call on the VTY TELNET port. Teach the function f_vty_wait_for_prompt() about connection reports by the TELNET module. We may now receive an integer which represents the socket file descriptor for the telnet connection. This case was not handled by the previous change made in commit cb111b21aba1d5881da1a1d3f19754cbd15b3779. As a result, BSC tests started failing with "VTY Timeout for prompt" because the alt-statement in f_vty_wait_for_prompt() would not progress past the integer sitting on the VTY port's receive queue. Change-Id: I56925f93af6c55e93f3f417099db135744da6a40 Related: OS#3149
2018-07-27Revert "detect VTY TELNET port connection failures in TTCN3 tests"Neels Hofmeyr1-1/+0
With this patch, I see all ttcn3-bsc-tests failing with "Verdict: fail reason: VTY Timeout for prompt" This reverts commit cb111b21aba1d5881da1a1d3f19754cbd15b3779. Change-Id: I215d7ab5eee75cf6d3afaac760af64356c943140
2018-07-27detect VTY TELNET port connection failures in TTCN3 testsStefan Sperling1-0/+1
Pass the CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT parameter to the TELNET port by default. This allows tests to make progress into an error handling path if they are started while the osmo-* program they want to connect on VTY is not running. Observed with osmo-ggsn tests, where if the one test runs into a VTY connection failure the subsequent test would get stuck forever in a map() call on the VTY TELNET port. Change-Id: I9acf7793d5d68aec6d087cff254a10d8b673dab1 Related: OS#3149
2018-07-24Stop tests after failuresDaniel Willmann1-6/+6
Call mtc.stop after setverdict(fail), add reasons to most failures and fail with verdict error for internal errors. Change-Id: I9b618235939fa41160b9be6677b121963d3ec857
2018-06-15hlr: Port HLR tests to use GSUP_EmulationHarald Welte2-127/+265
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-14Add README.md file for several suitesPau Espin Pedrol1-0/+16
Content grabbed from [1] and converted to markdown as it's more probable to have it displayed correctly on popular git repo hosting platforms. Syntax for embedded graphviz taken from [2]. [1] http://git.gnumonks.org/laforge-slides/plain/2018/osmodevcon2018-ttcn3_test_suites/osmodevcon2018-ttcn3_test_suites.adoc [2] https://github.com/stlehmann/markdown-graphviz Change-Id: I9aad03e605569e9613665a7585d60bf308bcb54f
2018-06-12Osmocom_VTY_Functions: move f_vty_transceive_match from HLR to this libraryAlexander Couzens1-8/+0
f_vty_transceive_match will be used by future SGSN tests. Change-Id: Ia69ab6d5639c2e10059f88c8cc97463820cb72e6
2018-06-11hlr: Update expected-resultsHarald Welte1-6/+1
as of Change-Id Change-Id: I4f51abdf44dfc62d7e8792341aad6dafe58923da, osmo-hlr passes HLR_Tests.TC_gsup_sai_err_invalid_imsi Change-Id: I72fb71806c72ce29e8c6c9b25723f02009463cec
2018-04-11mask timestamps and source file nrs in expected-results.xml filesNeels Hofmeyr1-13/+13
Prepare for upcoming updates with concise diffs. Change-Id: Ic9f006aa8db1b477598605e0525faeb229b03641
2018-04-11fix build: don't clean out expected-results.log: rename to *.xmlNeels Hofmeyr1-0/+0
'make clean' as generated by ttcn3_makefilegen removes all *.log files, which of course cleans out expected-results.log, which should not happen. Since this is a junit XML file, rename the suffix to .xml. Change-Id: Ic334f6b758eef865e3a497aa430691a3ae696d25
2018-04-09update expected HLR test results to prevent unexpected 'pass'Stefan Sperling1-9/+4
With https://gerrit.osmocom.org/#/c/7685/ the test TC_vty_msisdn_isd is now passing. Update expected log output accordingly. Change-Id: Ie8cfbef5a0adcb927917b0623f89309479a60001 Depends: Iffe1d7afb9fc7dbae542f70bbf5391ddc08a14b4 Related: OS#2785
2018-04-09improve failure diagnostics in TC_vty_msisdn_isd HLR testStefan Sperling1-0/+4
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-06add compare-results.sh, call from start-testsuite.shNeels Hofmeyr1-0/+23
Compare current test results to the expected results, and exit in error on discrepancies. Add compare-result.sh: (trivially) grep junit xml output to determine which tests passed and which didn't, and compare against an expected-result.log, another junit file from a previous run. Summarize and determine success. Include an "xfail" feature: tests that are expected to fail are marked as "xfail", unexpected failures as "FAIL". In various subdirs, copy the current jenkins jobs' junit xml outputs as expected-results.log, so that we will start getting useful output in both jenkins runs and manual local runs. In start-testsuite.sh, after running the tests, invoke the results comparison. Due to the single-line parsing nature, the script so far does not distinguish between error and failure. I doubt that we actually need to do that though. Related: OS#3136 Change-Id: I87d62a8be73d73a5eeff61a842e7c27a0066079d
2018-03-16ignore results of .ttcnpp filesNeels Hofmeyr1-0/+2
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-16fix gen_links.sh: don't include source dir as link targetNeels Hofmeyr1-8/+1
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-13remove *.default from [EXECUTE] in *.default filesHarald Welte2-1/+1
The problem is that the .cfg file cannot override the [EXECUTE] provided list of tests Change-Id: I7e1e0499b3b32014b25ae4b515263f57a4ea6daf
2018-03-02hlr: Distinguish "invalid IMSI" from "unknown IMSI" casesHarald Welte1-2/+16
Change-Id: I6ded77b3029aae6bc3fe022190819b6a86189f5a
2018-03-02f_rach_toffs: Print toffs256 value in verdict when failingHarald Welte1-1/+0
Change-Id: I82a8f7c8dd3ce3327aa43bfb9f03795531718320
2018-03-02hlr: Add testcases for PURGE_MS procedureHarald Welte1-0/+95
Change-Id: I9d54d5e4b6fe24d3ee710b57e0c69a30b89d3450
2018-03-02hlr: Fix test of UL+ISD state machineHarald Welte1-0/+1
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-01hlr: Add TC_vty_msisdn_isdHarald Welte1-0/+41
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-01hlr: Reduce code duplication by using templateHarald Welte1-3/+6
Change-Id: I7dcf0d27144e5dcf29babcb679ca9ef04b1f46a3
2018-03-01hlr: More test coverageHarald Welte1-13/+347
Change-Id: Ic93a2e7498343abcb709d7018c4d49811252342c
2018-03-01hlr: Add hlr sub-directory to master Makefile (for 'make compile' checks)Harald Welte1-1/+1
Change-Id: Idbd8241fc7d217885f65f84e11f9f1ea13adb82e
2018-03-01hlr: Make test run again using current OsmoHLR / TTCN-3 libraryHarald Welte2-3/+15
Change-Id: I4304d6f69a349845d74a9dbe5e366525d5d8956f
2018-03-01hlr: Integrate VTY and CTRL supportHarald Welte5-5/+64
Change-Id: I3fbc26a98d31df6d4753848bba655a517801d686
2018-03-01hlr: Rename module + file from GSUP_Test to HLR_TestsHarald Welte2-2/+2
Change-Id: I906c0046a4cf6ae95e5a0aca918f4375fedfea55
2018-02-20IPA_Emulation: Make dependencies to RSL/MGCP/SCCP/GSUP conditionalHarald Welte3-204/+5
Let's use the preprocessor to avoid IPA_Emulation pulling *all* dependencies into each and any of our projects. The code readability suffers a bit from the many #ifdefs, but compilation speed increases if we don't have to pull in all those (recursive) dependencies. After all, a BTS test case will never need SCCP, GSUP or MGCP. Change-Id: Ic0231adbd2171214de133d26b3fbf36130ee8aa0
2018-02-05Don't symlink non-existent fileMax1-1/+1
Change-Id: I10309f07fb207c027703f0b43a478c152a029b6d
2017-12-28GSUP Support and first test against OsmoHLRHarald Welte4-0/+292
Change-Id: Idd7a6aca1ab193da39294f49a3adc4c1cd7cecff