path: root/ggsn_tests
AgeCommit message (Collapse)AuthorFilesLines
2020-03-03ggsn: Terminate immediately on pipong altstep failurePau Espin Pedrol1-2/+7
Change-Id: I1ae66afc562c6bf968b0b3bfa9a254fac0bd7404
2020-01-05ggsn: Drop unneeded m_ggsn_supports_echo_intervalPau Espin Pedrol1-13/+2
Latest osmo-ggsn release is 1.5.0, so this param is not needed at all. Change-Id: Ie1c3cde2a01e8ea49aadcb1f7384995cb68039cb
2019-11-15Update of several TTCN3 test suitesPau Espin Pedrol1-0/+1
Some stuff was wrong and some was missing after new features being implemented in tests over time. Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0
2019-09-03ggsn: Delete previously activated pdp ctx in *_interact()Pau Espin Pedrol1-0/+3
This change fixes some GGSN_Tests failing lately since osmo-ggsn correctly sends DeleteCtxReq for dangling pdp ctx upon increased Recovery counter received, and tests are not expecting that (because they don't expectect dangling pdp ctx from previous tests). Change-Id: I232298e2bfd8bfc99d82cbf5803d11db7eb1786a
2019-08-23ggsn: Introduce test TC_pdp_act2_recoveryPau Espin Pedrol2-42/+111
Some code is moved out of f_pdp_ctx_act() into f_handle_create_req() in order to re-use it in the test. Related: OS#4165 Change-Id: I48c1bc9287ce8b820e5ea672dffbc5a8503f16d7
2019-08-23ggsn: Introduce test TC_pdp_act_restart_ctr_echoPau Espin Pedrol2-5/+86
VTY functionalities to enable and disable echo requests in osmo-ggsn are added too as part of the test. Depends: osmo-ggsn.git Id2c84165dc59dff495106758146a701ca488834f Related: OS#4165 Change-Id: Ia37e48e7ff9ad063f9eabf447f8a6a0a3fc380d9
2019-08-21ggsn: Introduce test TC_pdp46_act_deact_apn4Pau Espin Pedrol2-2/+26
Related osmo-ggsn.git libgtp fix: I6c6215a4ce478afabc78ffaf5ffb0cf829e41226 Related: OS#4154 Change-Id: Ia1893e0c181307ac1ceb07ee5f496507f7a603c8
2019-08-21ggsn: Update test xfail->pass in expected-results.xmlPau Espin Pedrol1-6/+1
Commit below fixed the test but forgot to update this file. Fixes: 8e7a396656f8d32c44254de0c65f26c6a2c833f2 Change-Id: Ia5006c9258de9b442b32ae92ae75ef08670de7cf
2019-08-21ggsn: Add missing v4v6 tests in expected-results.xmlPau Espin Pedrol1-0/+7
Change-Id: I80598fad57b8e7172ac073ebe2b3445e5ab132f0
2019-07-03ggsn: Add TC_pdp4_act_deact_ipcp_pap_broken()Harald Welte3-2/+38
This test case reproduces a real-world PCO capture including a broken PAP AuthenticationReq. It triggers some weird behavior in OsmoGGSN 1.3.0 where it would send duplicate IPCP repsonses and no PAP response. Change-Id: Ie89d984ed9e26fbbb2e4914bdb8623446d462a4c Related: OS#3914
2019-05-28ggsn: Add test to verify retransmit queue_respPau Espin Pedrol2-3/+35
Related: OS#3997 Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f
2019-05-27cosmetic: Update copyright statement, license notice and SPDXHarald Welte1-0/+12
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-10ggsn: Verify that there are no duplicate PCO protocolIDsHarald Welte1-0/+37
Introduce a function to verify there's no duplicate ProtocolIDs in the PCO returned from the GGSN. Change-Id: I9d439dab1696196cd125f4d7113b426f1711a405 Related: OS#3914
2019-03-14ggsn: add tests to validate IPv4v6 pdp ctxOliver Smith1-0/+175
Add related templates based on 3GPP TS 29.060 Figure 37A and create tests based on existing IPv4 and v6 ones. Related: OS#2900 Change-Id: I3bab7df5caddc5c8b973c81544f954d5473ac234
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-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-19fix TC_pdp4_act_deact_with_separate_dnsStefan Sperling1-3/+2
Do not delete the PDP context too early, and look for the second DNS server in the correct place (2nd match on IPCP protocol, not 1st). Update a comment which talks about a bug which has been fixed. Change-Id: I109491cc9ccb060792e29bf6b2999ef48723edbf Related: OS#3319 Related: OS#3381
2018-07-06ggsn: Apply GPDU seqnum option to all APNsPau Espin Pedrol2-2/+20
Change-Id: I6efe926c8bb7a0056d26e15eefa282266e7bc6ca
2018-07-05GGSN_Tests: test what happens when PCO contains only one DNS entryPhilipp Maier2-1/+90
When the protocol configuration options (PCO) contain an IPCP container then lists only one one DNS server (normally there are two included, a primary and a secondary). Than the parser in osmo-ggsn runs into an endles loop. This testcase tries to provoke this behavior by sending PDP CONTEXT ACTIVATE messages with PCO that contain only a single DNS entry per IPCP container. The hanging of osmo-ggsn is already fixed (see Depends). However when Primary and Secondary DNS are in separate IPCP containers, then only the first IPCP container is parsed (see also OS#3381) Change-Id: I71761e1f9db7ceac3c3df43d2e539f8c8d53c4fc Depends: osmo-msc Icffde89f9bc5d8fcadf6e2dd6c0b4de03440edd5 Closes: OS#3288 Related: OS#3381
2018-06-14Add file for several suitesPau Espin Pedrol1-0/+17
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] [2] Change-Id: I9aad03e605569e9613665a7585d60bf308bcb54f
2018-04-26ggsn: Disable GTP-U tx sequence number by defaultHarald Welte1-1/+1
GTP-U transmit sequence numbers are entirely optional and probably don't serve any real purpose in real-world deployments. While OsmoGGSN in userspace implements support for it, the kernel GTP-U implementation doesn't. This means a number of tests fail against kernel GTP-U only for that reason. Let's switch all tests to disable GTP-U sequence numbers, and only enable it in one specific test. This way, we can execute the tests also against kernel GTP-U. Related: OS#3215 Change-Id: I666f5276749ef6a1a4dc170a3b9a747f626f6b2c
2018-04-26ggsn: Fix typo: 'gptu' -> 'gtpu'Harald Welte1-7/+7
Change-Id: I1da2e0da6b94dc43c742ec551d3b5de100ce405f
2018-04-11mask timestamps and source file nrs in expected-results.xml filesNeels Hofmeyr1-12/+12
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-06test GGSN support for optional GTP-U sequence numbersStefan Sperling4-6/+86
Add VTY functionality to GGSN tests, and use the VTY to enable/disable GTP-U Tx sequence numbers in the running osmo-ggsn. The GTPU packet template now makes sequence numbers optional. A template created with its sequence number set to 'omit' will result in a packet without a sequence number, i.e. the 'sequence number present' bit in the packet header is cleared, and the sequence number field is omitted from the encoded GTPU T-PDU packet. Re-use the existing TC_pdp4_clients_interact() test for testing the behaviour of osmo-ggsn. This test is now run twice, once with and once without GTP-U Tx sequence numbers. Verify that packets relayed by osmo-ggsn match its "g-pdu tx-sequence-numbers" configuration setting. Change-Id: I1dc299407c61b1c865035add44067b8ab89001b3 Related: OS#2519
2018-04-06add, call from start-testsuite.shNeels Hofmeyr1-0/+14
Compare current test results to the expected results, and exit in error on discrepancies. Add (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, 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-04-04document the purpose of IP addresses used by GGSN testsStefan Sperling1-0/+19
The purpose of the various IP addresses used by our GGSN tests is not immediately clear. Add documentation based on the current status quo. Change-Id: I079efcff3dab09d71330625f5b661cd81e42bf38
2018-04-01improve documentation of templates used in GGSN_TestsStefan Sperling1-7/+8
Various improvements to the comments documenting packet templates used in GGSN_Tests: fix IPv4 vs. IPv6 confusion, clearly indicate whether templates are used for sending or for receiving/matching packets, and add a missing comment. Found while studying code to prepare for issue OS#2519. Change-Id: I3bfc21a5ba74e0505457e4874f93501ad7c68b7b Related: OS#2519
2018-03-16ignore results of .ttcnpp filesNeels Hofmeyr1-0/+2
Add another macro ignore_pp_results to and call from all files, to add results of *.ttcnpp files, i.e. generated *.ttcn files, to .gitignore. Change-Id: Ic7fb176226771212d7700dafaf27ac71f12a4a61
2018-03-16fix 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 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-02-18ggsn: Move GTP templates to separate GTP_Templates + Add GTP_EmulationHarald Welte2-510/+2
Change-Id: I384e59738a9e0fc0186b69f0806f217a2a8d8a4b
2018-02-18move GTP_CodecPort from ggsn to library (for sgsn reuse)Harald Welte4-201/+3
Change-Id: If1b25f3c4705fcf4763886b54c5ef1f7ae08628f
2018-02-14ggsn: Switch over to new shared/common configuration file layoutHarald Welte2-29/+24
Change-Id: I491819c8bad8efa45cee161ea6f47c3f97941a17
2018-02-05Don't symlink non-existent fileMax1-1/+1
Change-Id: I10309f07fb207c027703f0b43a478c152a029b6d
2018-01-31ggsn_tests: Add test to validate if different pdp ctx can talk each otherPau Espin Pedrol2-0/+84
It seems due to the current network configuration, pdp v4 ctx can talk each other while pdp v6 ctx cannot. Change-Id: I67c04b056cc5c092d357abbb084b7665f59eaf3a
2018-01-31ggsn_tests: Add test case to validate packets forwarded vs droppedPau Espin Pedrol4-8/+262
New dependency is required: titan.ProtocolModules.ICMP It tests that ICMP echo packets can be sent successfully (reply is received or otherwise dest unreachable if routing is not set up correctly during the test). It also tests some cases in which osmo-ggsn is required to drop the packets (eg. unknown src ip unrelated to pdp ctx). It also checks that IPv6 packets are dropped in IPv4 pdp ctx and viceversa It also checks that IPv6 packets are dropped in IPv4 pdp ctx and vice versa. Change-Id: Ib9c6043a6cd3b6622782ec7e7fcd2815101755ba
2018-01-29ggsn_tests: Validate DNS PCO valuesPau Espin Pedrol2-2/+34
Change-Id: I54124cb5269c0992e6c72af1a1ecaa8e3202bf05
2018-01-29ggsn_tests: Configure expected GGSN DNS values and improve error messagePau Espin Pedrol2-4/+15
Change-Id: Ie64ca0b4cda22fd358c8c304d5b3909fd9685948
2018-01-26ggsn: Move random number helpers to Osmocom_Types.ttcnHarald Welte1-34/+0
Change-Id: I141289cbf1807e81d72f07ac1183fa48b2dc54af
2018-01-17Add "SourceInfoFormat := Single;" to all test configsHarald Welte1-0/+1
This will make sure that all log files will contain information about the .ttcn source file name and line number that has caused the log, which is extremely useful during debugging. Change-Id: Id6785757f20279ba84b34747f878baf67d065b20
2017-12-13generalize shared code from into shared helper scriptHarald Welte1-9/+1
Change-Id: I86a738420851a7d9e3bdb2671f6862c3d505a4ba Fix TITAN 6.1.0 supportHarald Welte1-1/+1
When introducing the rewriting for 6.3.0 we broke the 6.1.0 support. Now the result should build on Debian with both 6.1.0 and 6.3.0 Change-Id: I263a6abd2d9eb15ce5778ef8dbfcdac2a228b77d
2017-12-12Makefile: clone dependencies into 'deps' folderHarald Welte1-1/+1
We used to rely on out-of-tree git clones to be prepared by the user. This commit changes the system to make sure we clone all git repos we depend upon into the 'deps' folder, and then setup the symlinks to that folder. As a result, we should be able to support self-contained builds using the makefiles in this repo. Add Regex's for TITAN 6.3.0Harald Welte1-0/+4
The TITAN 6.3.0 makefile generator needs some new regular expressions for patching the generated makefile to work on Debian
2017-12-04ggsn: verify IPv4 addr + byte order in IPCP PCO DNS addressesHarald Welte1-1/+1
2017-12-04ggsn: Encode IPCP in IPCP Request, rather than using hard-coded hex stringHarald Welte1-2/+11
We now have a proper definition of IPCP in IPCP_Types and can thus encode/decode on the fly and avoid hand-crafted octetstrings.
2017-12-04ggsn: Verify presence of DNS addresses in IPCP of PCOHarald Welte2-1/+55
If we request DNS in IPCP in PCO, we also expect a corresponding result.