summaryrefslogtreecommitdiffstats
path: root/sgsn
AgeCommit message (Collapse)AuthorFilesLines
3 dayssgsn: Integrate RANAPHarald Welte3-5/+106
Integrate RANAP support to SGSN_Tests.ttcn. Related: OS#2857 Change-Id: Ib62fc4c6007f6f4c47db7ca096a8d629bc72bb22
3 daysBSSGP_Emulation: Abandon "BssgpDecoded" intermediate structureHarald Welte1-91/+81
It originally seemed like a great idea to define a custom record which aggregates the decoded BSSGP, LLC, L3 and/or SNDCP and passes it to the individual ConnHdlr. However, particularly with testcase interoperability for IuPS in mind, this seems bogus. Also, we never really took advantage of this. Let's now decode as far as we can decode any PDU, and then send the decoded version of that PDU via the ports between the BSSGP_Emulation and the ConnHdlr component. Change-Id: I8c1082880902dd9a04935945f0293895f4d0c53a
2019-06-18sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfgOliver Smith2-0/+90
Base on the docker-playground.git's config, but with 127.0.0.*. All tests passing in jenkins are passing locally with this config. Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
2019-06-13lib/IPA_Emulation: Build IPA_CTRL conditionally based on definePau Espin Pedrol1-1/+1
Change-Id: I4d1eca6b0008a395b7f7449e6ea3f9b6d41133c7
2019-06-11SGSN_Tests: f_detach_mo(): fail when receiving any unhandled layer 3 message ↵Alexander Couzens1-4/+8
for normal detach Merge the case with the fail when doing a power-off detach. Change-Id: I957994376583959758417dccf419a55c43a0c61b
2019-06-04sgsn: Add tests to check GTP retransmit queuePau Espin Pedrol2-0/+121
Change-Id: I3c4a3573482bb1fa1549c732a0f78c2d00eadd86
2019-05-27cosmetic: Update copyright statement, license notice and SPDXHarald Welte1-0/+11
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-11SGSN_Tests: add test case TC_attach_pdp_act_gmm_detachAlexander Couzens1-0/+26
MS -> SGSN: Attach Request MS <-> SGSN: [..] MS -> SGSN: Attach Complete MS -> SGSN: PDP Activate Request MS <- SGSN: PDP Activate Accept MS -> SGSN: GMM Detach Request MS <- SGSN: GMM Detach Accept Related-to: OS#1881 Change-Id: Ibafbbb8ed99357d1e2e13d576b2624939388e85b
2019-05-11SGSN_Tests: fail when receiving any layer 3 package for a power off stationAlexander Couzens1-0/+4
Change-Id: I27d798c1866ed7ae9b03b9c0ffdd7400431551f9
2019-05-11SGSN_Tests: correct verdict failure message in f_detach_mo()Alexander Couzens1-1/+1
Change-Id: I5c03ef7dd7486025d35d4482a7fe150dd36de907
2019-05-11SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_attach_rau_a_bAlexander Couzens1-1/+1
The gb_index was forgotten to given to the new function f_send_l3(). All testcases which only used the default BSSGB connection #0 continued to work, but the TC_attach_rau_a_b is the only testcase which uses #0 and #1 at the same time. Fixes: a05b80792266 ("sgsn: Add TC_llc_null to test if SGSN survives a LLC NULL packet") Change-Id: Ie3dd8c613d3b3440447a282dc4545078cb927274
2019-05-10SGSN_Tests: Introduce NUM_GB to avoid '3' as magic valueHarald Welte1-3/+4
Change-Id: I28b7dd26c5c129ec41c6349de9ddc9ef0ffee8ac
2019-05-10SGSN_Tests: Make more helper functions gb_index awareHarald Welte1-23/+32
The gb_index indicates through which Gb link (simulated RAN/PCU) a given message shall be sent. Change-Id: I3825634f581897f6951d9673984f138e977cc7ac
2019-05-10SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0Harald Welte1-19/+31
Let's make sure the related functions can be used on other gb_idx, i.e. via another Gb interface (and hence simulated RAN/PCU) than the first one. Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1
2019-05-02sgsn: Add initial XID handshake related testsHarald Welte1-1/+61
Change-Id: I5d4b3cba2fe05dffe10c843f16cfec343bc67b5f
2019-04-25sgsn: Add test cases to verify SABM handling on LLGMM + LL5Harald Welte1-0/+36
As OsmoSGSN doesn't implement ABM, the correct resposne to any SABM is DM. RelateD: OS#3953 Change-Id: Ib0d371a3356d6cb481b794945476ab40f5e0f02a
2019-04-25sgsn: Add TC_llc_null to test if SGSN survives a LLC NULL packetHarald Welte1-2/+25
This test case reproduces a bug in OsmoSGSN where it would crash as a result to sending LLC NULL frames. Change-Id: I38326f2ebaaff009d4357edad9511ce2ce7736fd Related: OS#3952
2019-04-12Ensure BcdMccMnc is encoded as 24.008 10.5.5.15Alexander Couzens1-4/+6
PCU is using BcdMccMnc as it's encoded as 24.008. But SGSN code is using it as it would be byte by byte sorted. Fixes: OS#3878 Change-Id: Ie8f67f16f18e4c5090bc5a4c46a866a7e7e00206
2019-03-27NS_Emulation: Add minimal support for SGSN-side SNS handlingHarald Welte1-3/+9
Change-Id: I1edf739d6fd39478f662a28a7d9334ca51c270a3
2019-01-23update expected resultsNeels Hofmeyr1-7/+2
Change-Id: Idacaf8343bed4a37878eacdf338c4d5eb46bf7a7
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-10-03sgsn: update expected-resultsAlexander Couzens1-32/+13
Change-Id: Ie08fb0b5a94728640f65f56430a217b51aea3dde
2018-09-14sgsn: implement TC_attach_usim_resyncAlexander Couzens1-0/+131
Test the UMTS AKA resync procedure with USIMs. MS -> SGSN: Attach Request MS <- SGSN: Identity Request IMSI MS -> SGSN: Identity Response IMSI MS <- SGSN: Identity Request IMEI MS -> SGSN: Identity Response IMEI HLR<- SGSN: SAI Request HLR-> SGSN: SAI Response MS <- SGSN: Auth Request MS -> SGSN: Auth Failure (with AUTS) HLR<- SGSN: SAI Request (with AUTS & RAND) HLR-> SGSN: SAI Response (new key material) MS <- SGSN: Auth Request (new key material) MS -> SGSN: Auth Response MS <- SGSN: Attach Accept MS -> SGSN: Attach Complete Change-Id: I52a8dc45bb67d4ca9f3efade278d3308bb0da73d
2018-09-06update expected resultsNeels Hofmeyr1-9/+27
Change-Id: I32c29e62ca317937db771f8fb1540bb1fe9da2ab
2018-09-04sgsn: add TC_attach_gmm_attach_req_while_gmm_attachAlexander Couzens1-0/+73
Testing the corner case of receiving an Attach Request while not (yet) sent an Attach Accept. MS -> SGSN: Attach Request IMSI MS <- SGSN: Identity Request IMSI (optional) MS -> SGSN: Identity Response IMSI (optional) MS <- SGSN: Identity Request IMEI MS -> SGSN: Attach Request (2nd) MS <- SGSN: Identity Response IMEI MS <- SGSN: Attach Accept MS -> SGSN: Attach Complete Change-Id: I0bac50dc5a72ba8f9010b05bcb98aa7ff0b81cf6
2018-09-04sgsn: rework TC_attach_closed_add_vty to be executed in a single BSSGP_ConnHldrAlexander Couzens1-6/+13
When stopping and starting BSSGP_ConnHdlr multiple times, there are Port connecting problems. Using a single iteration of BSSGP_ConnHldr.start() works around this problem. Change-Id: I8e5ae832f3908a172b9beb6d936074b806e0c799
2018-09-04sgsn: fix TC_attach_check_complete_resendAlexander Couzens1-1/+4
TC_attach_check_complete_resend tests if the SGSN sends out the SGSN Attach Accept multiple times. If the MS disappear, there is no need for a ATTACH REJECT. Change-Id: I3fa5c100b8389e184acf1e71e2792e5474c22dec
2018-09-04sgsn: increase the timeout of some TCAlexander Couzens1-7/+7
Because of multiple BSSGP connections, the tests need more time to complete. Change-Id: I12baf4b2425d0d862755d03d16127b18968e28f2
2018-09-04sgsn: use vty cmd `reset sgsn state`.Alexander Couzens1-1/+2
Cleans most of the sgsn state. Depends on the SGSN commit I92096f3f6ea49e75676e30e9921d00210bac5382. Change-Id: Idff3de6f1b8f5cb503edc5c6256ce2bf7ec7aaa2
2018-09-04sgsn: introduce TC_attach_rau_a_bAlexander Couzens1-0/+34
MS <-> SGSN: Successful Attach MS -> SGSN: Routing Area _a_ Update Request MS <- SGSN: Routing Area _a_ Update Accept MS -> SGSN: Routing Area _b_ Update Request MS <- SGSN: Routing Area _b_ Update Accept MS -> SGSN: Detach (PowerOff) Change-Id: Ie636778628c216e315bd6f5bc11e0e5bd9c218a5
2018-09-04sgsn: add optional bssgp index for f_upd_ptmsi_and_tlli ↵Alexander Couzens1-10/+10
f_bssgp_client_llgmm_assign f_process_rau_accept f_process_rau_accept can send the RAU Complete over the correct BSSGP Change-Id: Ib9a65f0d09d3689911843a1b40e2a4114710e5b5
2018-08-28sgsn: don't re-use the same NS for all 3 BSSGPAlexander Couzens2-14/+27
Create for every BSSGP a new NS instance. Change-Id: I3448fe837eaa8efab65dccc32bacaaacd73a2f09
2018-08-14BSSGP_Emulation: move LLC layer out of BSSGPAlexander Couzens1-33/+44
The LLC layer needs to be accessed by the SGSN tests in order to do multi-BSSGP tests. Otherwise the sgsn will see LLC frame with wrong sequence numbers and drop them. Change-Id: Ie9e9d7da0a78a96f4f431c9085b9e273a39535f1
2018-08-14sgsn: add f_cellid_to_RAI()Alexander Couzens1-0/+16
Returns a RoutingAreaIdentificationV from GbInstance. This will be useful when using multiple BSSGP and the g_pars.ra field is not the needed ra. Change-Id: Ide96213ab2f210590b86deaf370486c8a0a78058
2018-08-14sgsn: introduce TC_attach_rau_a_a()Alexander Couzens1-0/+31
MS <-> SGSN: Successful Attach MS -> SGSN: Routing Area Update Request MS <- SGSN: Routing Area Update Accept MS -> SGSN: Routing Area Update Request MS <- SGSN: Routing Area Update Accept MS -> SGSN: Detach (PowerOff) Change-Id: Id76b4792c07816bcbe5e965f23c2b526df0923c3
2018-08-14sgsn: introduce f_routing_area_update()Alexander Couzens1-14/+21
Will be used by future RAU tests Change-Id: I4064e013f73319f24bb893a9047c8b9eb7d6aac2
2018-08-14sgsn: create 3 instances of BSSGP at the same timeAlexander Couzens1-56/+65
Allows to use different BSSGP connection within a single test. Change-Id: I01d7f264a0a52e248d6e754485c807266c0b14bf
2018-08-14BSSGP_Emulation.ttcn: extend BSSGP_Client_CT to hold 3 instances of BSSGPAlexander Couzens1-91/+91
Change-Id: Ibd7abba826a08b582361e9c255e9c44185e14067
2018-08-13NS_Emulation: support multiple instances at the same timeAlexander Couzens2-7/+16
The NS_Emulation has configuration values hardcoded or bound to module parameters which prevents multiple instances. Replace the module parameter based configuration with configuration given when starting the NS_Emaulation. Change-Id: I9128f9ad5c372779c38799269393137ba52576cd
2018-08-09sgsn: fill g_gb configs for the remaining Gb interfacesAlexander Couzens1-0/+26
When testing with multiple Routing Areas, multiple Gb interface are required. Change-Id: I7f56618110f04d99b1b43e69d89167e384b61a34
2018-08-07sgsn: f_pdp_ctx_deact_mt: rework test behaviour to workaround shutdown problemsAlexander Couzens1-1/+10
When introducing multiple BSSGP instances, this tests has problem when shutting down the test. Change-Id: I0cd1adf072f8ba40343e51e41f23a1de6a2bd62c
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-8/+24
Call mtc.stop after setverdict(fail), add reasons to most failures and fail with verdict error for internal errors. Change-Id: I9b618235939fa41160b9be6677b121963d3ec857
2018-07-21sgsn: Add test to verify GPRS ctx deact caused by GTP ErrorIndPau Espin Pedrol2-7/+33
Change-Id: I40e877f4126e62a731b071ae1d6d855fed210433
2018-07-21sgsn: Remove uneeded f_gtpu_send in f_gtpu_xceive_moPau Espin Pedrol1-1/+1
It's not needed for the functionality/scenario of f_gtpu_xceive_mo. It probably was left in when creating it from f_gtpu_xceive_mo. Change-Id: Ide226f8501c4598e2bfaa5f1ea62c3ff20807ce4
2018-07-21sgsn: Add Test to verify Recovery procedure during CreatePdpRespPau Espin Pedrol2-8/+56
Change-Id: Ic81b854967492194367b7ce8a667c29c777791bf
2018-07-21sgsn: Add Test to verify timer t3395Pau Espin Pedrol2-1/+39
Change-Id: I9ec0863603692045b0d8da376e65080150066173
2018-07-16sgsn: Fix TC_attach_pdp_act_user_deact_mtPau Espin Pedrol2-8/+3
Expect to receive a TearDown Indicator. Change-Id: I37dafb5e93ac06b3bd9cab2c06aa3735a8429f2f