Project

General

Profile

Actions

Feature #5760

open

Develop TTCN-3 test suite for MME

Added by laforge over 1 year ago. Updated 5 months ago.

Status:
Stalled
Priority:
Normal
Assignee:
Target version:
-
Start date:
11/09/2022
Due date:
% Done:

40%

Spec Reference:
3GPP TS 36.413

Description

Implement functional test suites in the TTCN-3 domain specific language for the MME, and create jenkins/docker/... integration for executing it nightly against open5gs mme.


Checklist

  • 8.3.1 NAS Attach request + PDN connectivity request
  • 8.3.1 Tracking Area Update (mobility to another eNB)
  • 8.2.1 E-RAB setup (dedicated bearers for VoLTE)
  • 8.2.3 E-RAB release
  • 8.3.7 UE Context Suspend
  • 8.3.8 UE Context Resume
  • 8.5 Paging
  • 8.7.1 Reset
  • 8.7.3 S1 Setup
  • 8.13 + 8.14 Direct information transfer
  • 8.4 Handover
  • RAN Information Request (NACC)
Actions #1

Updated by laforge 8 months ago

  • Assignee set to dexter

Assigning to dexter as he is currently touching the MME test suite anyway. Once the existing minimalistic tests are running against open5gs master, I think we should immediately create a jenkins setup (maybe osmith can take that part? feel free to coordinate) so we catch if that should break for some reason.

I'll plan to put some kind of TODO list here about the kind of tests that IMHO would make sense.

Actions #2

Updated by osmith 8 months ago

laforge wrote in #note-1:

[...] I think we should immediately create a jenkins setup (maybe osmith can take that part? feel free to coordinate) so we catch if that should break for some reason.

Sure. Dexter, feel free to assign the issue to me once it's ready for that.

Actions #3

Updated by laforge 8 months ago

  • Spec Reference set to 3GPP TS 36.413

In terms of a test suite covering the basic S1AP procedures of a MME, I think we should aim for:

  • 8.3.1 InitialUE
    • NAS Attach request + PDN connectivity request
      • Successful
      • Unsuccessful: Not known in HSS
      • Unsuccessful: Auth error (wrong tuple from HSS)
    • Tracking Area Update (mobility to another eNB)
  • 8.2.1 E-RAB setup (dedicated bearers for VoLTE)
  • 8.2.3 E-RAB release
  • 8.3.7 UE Context Suspend
  • 8.3.8 UE Context Resume
  • 8.5 Paging
  • 8.7.1 Reset
  • 8.7.3 S1 Setup
  • 8.13 + 8.14 Direct information transfer
    • transfer between multiple attached simulated eNB
  • 8.4 Handover
    • successful / unsuccessful intra-system (4G) hand-over
    • verify switched GTP paths after hand-over
Actions #4

Updated by dexter 8 months ago

As a preparation I am currently working on getting the already existing MME tests to run in docker. Building and test execution already works, but the network connection between testsuite and MME does not work yet.

Actions #5

Updated by dexter 8 months ago

The MME tests now run in docker. The test results are the same as when I execute the tests locally. A patch is up for review in gerrit:
https://gerrit.osmocom.org/c/docker-playground/+/33571 MME_Tests: add docker tests for MME

Actions #6

Updated by dexter 8 months ago

  • Status changed from New to In Progress

Unfortunately the S1AP_Emulation seems to be not fully complete yet but I think it is not much that is missing. At least I now managed to get an S1SetupRequest/Response now through the emulation. I also added some code to resolve the vc_conn from the S1apExpectTable (create_cb) but I could not test that yet.

Actions #7

Updated by dexter 8 months ago

  • % Done changed from 0 to 10

I have now fixed parts of the S1AP_Emulation, so things look a lot better now. I have started adding the GTP_ConnHdlr, which we also use in several other testsuites. This seems to work. I can send an ECHO REQUEST now.

Actions #8

Updated by dexter 8 months ago

The patches for docker-playground now made it into master, so now we can configure a jenkins job that executes the MME tests.

Actions #9

Updated by osmith 7 months ago

  • Assignee changed from dexter to osmith
Actions #10

Updated by osmith 7 months ago

  • Assignee changed from osmith to dexter
  • % Done changed from 10 to 20
jenkins job:

MME_Tests.TC_s1ap_setup_wrong_plmn failure is expected since it is also failing locally, the other 3 tests run successfully.

Actions #11

Updated by dexter 7 months ago

  • % Done changed from 20 to 30

In order to test NACC from EUTRAN to GERAN we need to implement a test that tests the whole process from S1AP, over GTP and back to S1AP. This also includes a Direct information transfer (see list above). The GTP interface was missing in the testsuite, it is now added and working.

The testcase that tests the NACC is also nearly finished but it still lacks the verification of the final S1AP message. Also there is still a problem with the Global ENB ID. At the moment I am using a hardcoded one but I want to rplace it with a properly encoded version. The problem here is that the Global ENB ID is ASN.1 (presumably APER) encoded. I already tried to make an encoder but I am stuck at fftranscode, which presumbably lacks the encoder/decoder for the Global ENB ID. In any case, this is probably a minor problem.

Actions #12

Updated by dexter 7 months ago

  • Checklist item 8.3.1 NAS Attach request + PDN connectivity request added
  • Checklist item 8.3.1 Tracking Area Update (mobility to another eNB) added
  • Checklist item 8.2.1 E-RAB setup (dedicated bearers for VoLTE) added
  • Checklist item 8.2.3 E-RAB release added
  • Checklist item 8.3.7 UE Context Suspend added
  • Checklist item 8.3.8 UE Context Resume added
  • Checklist item 8.5 Paging added
  • Checklist item 8.7.1 Reset added
  • Checklist item 8.7.3 S1 Setup added
  • Checklist item 8.13 + 8.14 Direct information transfer added
  • Checklist item 8.4 Handover added

(added checklist)

Actions #13

Updated by laforge 7 months ago

On Mon, Jul 17, 2023 at 09:02:00AM +0000, dexter wrote:

The problem here is that the Global ENB ID is ASN.1 (presumably APER) encoded. I already tried to make an encoder but I am stuck at fftranscode, which presumbably lacks the encoder/decoder for the Global ENB ID. In any case, this is probably a minor problem.

The entire S1AP is ASN.1 APER, and we use libfftranscode to transcode it. The Global ENB ID is supposedly one information element that's usually somewhere deep inside the information elements of a S1AP message, right? So it does have the encoder/decoder.

However, given the thousands of data types, we really only expose symbols/functions to transcode complete PDUs of the respective protocol, and not individual members/types, sorry.

Actions #14

Updated by dexter 7 months ago

It is understandable that we can not expose random information elements in libfftranscode. However, I think I can work around the problem. I could just encode a random PDU and find the offset where the Global-ENB-ID IE begins. Then I could chop off everything I do not need. If that does not work I still can use a hardcoded Global-ENB-ID, this would not look very nice, but it would work for sure.

I also had a lot of trouble with the accessibility of unit-data from indie the ConnHdlr but I managed to find a solution, the following patch is currently in review:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33898 S1AP_Emulation: improve accessibility of unit-data

There are also a couple of other fixes that were required:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33893 GTP-Templates: fix incorrect comment
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33894 GTP_Templates: Add RIM_RoutingAddress to RANInfoRelay templates
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33896 GTP_Templates: add template tr_GTPC_RAN_Information_Request
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33897 S1AP_Templates: Add templates for MMEDirectInformationTransfer
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33898 S1AP_Emulation: improve accessibility of unit-data

I now have a round-trip RAN information request running, it still requires a bit of cleanup and verification of the contents of the last S1AP message (RAN Information) from the MME.

Actions #15

Updated by dexter 7 months ago

  • Checklist item RAN Information Request (NACC) added
Actions #16

Updated by dexter 7 months ago

  • Checklist item RAN Information Request (NACC) set to Done
  • % Done changed from 30 to 40

The patch that adds the testcase to verify a full RAN INFORMATION REQUEST (NACC) is now in gerrit:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33937 MME_Tests: add testcase TC_RIM_RAN_INF

Actions #17

Updated by dexter 6 months ago

The testcase TC_RIM_RAN_INF is merged into master. We also reached a point now where all testcases show up green:
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-mme-test-ogs/test_results_analyzer/

Actions #18

Updated by dexter 6 months ago

  • Checklist item 8.3.1 NAS Attach request + PDN connectivity request set to Done
  • Checklist item 8.7.3 S1 Setup set to Done
Actions #19

Updated by dexter 6 months ago

  • Checklist item 8.7.1 Reset set to Done
Actions #20

Updated by dexter 6 months ago

  • Checklist item 8.13 + 8.14 Direct information transfer set to Done
  • Checklist item 8.3.1 NAS Attach request + PDN connectivity request set to Not done
Actions #21

Updated by dexter 6 months ago

The following changes were made to add a testcase for the Tracking Area Update:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34267 NAS_Templates: fix ts_NAS_GUTI
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34268 NAS_Templates: add templates for EPS_Mobile_ID_IMSI/IMEI/GUTI
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34269 NAS_Templates: add template for EPS update type
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34270 NAS_Templates: add template for NAS key set identifier
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34271 NAS_Templates: add template for Tracking Area Update Request
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34280 NAS_Templates: add template for Tracking Area Update Reject
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34281 MME_Tests: add new testcase TC_s1ap_tau_unknown_guti

We are now able to send a TAU to the MME, but the MME reject this TAU. The reason for this is that it does not know the TMSI in the OldGUTI field yet. Unfortunately there is no way to tell the MME an IMSI or alike that it knows. TAU is entirely relying on a valid TMSI. A valid TMSI is returned by the MME during the NAS Attach request. Unfortunately the testcase of the NAS Attach Request (TC_s1ap_attach) is not testing the procedure beyond the Create Session Request (towards the SGW-C). It is up to the testsuite to emulate the SGW-C. This means we will have to add an S11/GTPv2 interface to the testsuite. This has been done in the following patches:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34266 MME_Tests: Add S11/GTPv2 interface
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34286 GTPv2_Emulation: improve accessibility of unit-data (TEID0)
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34287 TC_s1ap_attach: setup S11 interface, catch Create Session Request [NEW]

The last patch [NEW] is still in gerrit. All it does is extending TC_s1ap_attach so that it catches the Create Session Reqest. This is mainly to verify that we are able to receive S11 messages from the MME.

Actions #22

Updated by dexter 5 months ago

  • Status changed from In Progress to Stalled
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)