Commit 402ccc55 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in Lib_NG_NAS_Functions.ttcn; Remove duplicate PIXIT

parent 8a1d8ceb
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

# https://www.binaryhexconverter.com/hex-to-binary-converter

NGAP_Pics.PICS_NGAP_AMF_IUT    := true
NGAP_Pics.PICS_NGAP_GNB_IUT    := false

LibNGAP_Pics.PICS_OFFLINE_MODE := false
LibNGAP_Pics.PICS_OFFLINE_MODE := false # true for offline mode with pcap files, false for online mode with SCTP server

# 5GRegAuthSec_deReg.pcap
LibNGAP_Pixits.PX_AMF_NAME         := "open5gs-amf0"
LibNGAP_Pixits.PX_RAN_UE_NGAP_ID   := 1
LibNGAP_Pixits.PX_AMF_UE_NGAP_ID   := 2
LibNGAP_Pixits.PX_PLMN_IDENTITY    := '99f907'O
LibNGAP_Pixits.PX_AMF_REGION_ID    := '00000010'B
LibNGAP_Pixits.PX_AMF_SET_ID       := '0000000001'B
LibNGAP_Pixits.PX_AMF_POINTER      := '000000'B
LibNGAP_Pixits.PX_RAN_NODE_NAME    := "gnb0012345"
LibNGAP_Pixits.PX_GNB_ID           := '00000000000000000000000000000001'B
LibNGAP_Pixits.PX_RAN_NODE_NAME    := "UERANSIM-gnb-999-70-1"
LibNGAP_Pixits.PX_TACode           := '000001'O
LibNGAP_Pixits.PX_SST              := '01'O
LibNGAP_Pixits.PX_SD               := '000009'O
LibNGAP_Pixits.PX_PAGING_DRX       := v128
LibNGAP_Pixits.PX_AMF_NAME         := "open5gs-amf0"
LibNGAP_Pixits.PX_AMF_REGION_ID    := '00000010'B
LibNGAP_Pixits.PX_AMF_SET_ID       := '0000000001'B
LibNGAP_Pixits.PX_AMF_POINTER      := '000000'B
LibNGAP_Pixits.PX_RAN_UE_NGAP_ID   := 1
LibNGAP_Pixits.PX_AMF_UE_NGAP_ID   := 2

LibNGAP_Pixits.PX_PDU_SESSION_ID   := 1

@@ -36,8 +38,6 @@ Lib_NG_NAS_Pixits.PX_OPERATOR_SECRET_KEY := 'E8ED289DEBA952E4283B54E
Lib_NG_NAS_Pixits.PX_FORCE_USING_OPERATOR_SECRET_KEY := true

Lib_NG_NAS_Pixits.PX_SUBSCRIPTION_KEY                := '01000110010110110101110011101000101100011001100110110100100111111010101001011111000010100010111011100010001110001010011010111100'B
# https://www.binaryhexconverter.com/hex-to-binary-converter
Lib_NG_NAS_Pixits.PX_PLMN                            := '99f907'O;
Lib_NG_NAS_Pixits.PX_BEARER_ID                       := '00001'B

Parameters.px_IMSI_Def                               := '393939373030303030303030303031'H # 999700000000001
@@ -65,7 +65,8 @@ LogEventTypes:= Yes
system.NGAP_AMF.params := "NGAP/SCTP(server=127.0.0.5,port=38412,debug=1)"

# Open5GS pcap files
#system.NGAP_AMF.params := "NGAP/SCTP_FILE/IP_OFFLINE/ETH(mac_src=8c554ac1eee0,mac_dst=8c554ac1eee1)/PCAP_FILE(file=../captures/open5gs.pcap)"
#system.NGAP_AMF.params := "NGAP/SCTP_FILE/IP_OFFLINE/PCAP_FILE(file=../captures/ttcn_5g_ngap.pcapng)" # Linux cooked capture v2, no Ethernet layer
#system.NGAP_AMF.params := "NGAP/SCTP_FILE/IP_OFFLINE/ETH(mac_src=8c554ac1eee0,mac_dst=8c554ac1eee1)/PCAP_FILE(file=../captures/open5gs.pcap)" # regular pcap with Ethernet layer

[DEFINE]
# In this section you can create macro definitions,
+211 −0
Original line number Diff line number Diff line
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

# https://www.binaryhexconverter.com/hex-to-binary-converter

NGAP_Pics.PICS_NGAP_AMF_IUT    := true
NGAP_Pics.PICS_NGAP_GNB_IUT    := false

LibNGAP_Pics.PICS_OFFLINE_MODE := true # true for offline mode with pcap files, false for online mode with SCTP server

LibNGAP_Pixits.PX_PLMN_IDENTITY    := '00F110'O # '99f907'O
LibNGAP_Pixits.PX_RAN_NODE_NAME    := "UERANSIM-gnb-999-70-1"
LibNGAP_Pixits.PX_GNB_ID           := '0000000000000000000001'B
LibNGAP_Pixits.PX_RAN_NODE_NAME    := "UERANSIM-gnb-999-70-1"
LibNGAP_Pixits.PX_TACode           := '000001'O
LibNGAP_Pixits.PX_SST              := '01'O
LibNGAP_Pixits.PX_SD               := '000009'O
LibNGAP_Pixits.PX_PAGING_DRX       := v32 #v128
LibNGAP_Pixits.PX_AMF_NAME         := "Kontron5G-amf"
LibNGAP_Pixits.PX_AMF_REGION_ID    := '00000001'B
LibNGAP_Pixits.PX_AMF_SET_ID       := '0000000010'B
LibNGAP_Pixits.PX_AMF_POINTER      := '011111'B
LibNGAP_Pixits.PX_RAN_UE_NGAP_ID   := 1
LibNGAP_Pixits.PX_AMF_UE_NGAP_ID   := 4957

LibNGAP_Pixits.PX_PDU_SESSION_ID   := 1

Lib_NG_NAS_Pixits.PX_CHECK_SECURITY                  := false
Lib_NG_NAS_Pixits.PX_SUPI_FORMAT                     := '0000'B # IMSI format
Lib_NG_NAS_Pixits.PX_TYPE_OF_ID                      := '001'B # SUCI type
Lib_NG_NAS_Pixits.PX_SUPI_DIGITS                     := '00f110214300014444330302'O
Lib_NG_NAS_Pixits.PX_MSIN                            := '0000000010'O;

# OP
Lib_NG_NAS_Pixits.PX_OPERATOR_KEY                    := '00000000000000000000000000000000'O
# OPc
Lib_NG_NAS_Pixits.PX_OPERATOR_SECRET_KEY             := 'E8ED289DEBA952E4283B54E88E6183CA'O
Lib_NG_NAS_Pixits.PX_FORCE_USING_OPERATOR_SECRET_KEY := true

Lib_NG_NAS_Pixits.PX_SUBSCRIPTION_KEY                := '01000110010110110101110011101000101100011001100110110100100111111010101001011111000010100010111011100010001110001010011010111100'B
Lib_NG_NAS_Pixits.PX_BEARER_ID                       := '00001'B

Parameters.px_IMSI_Def                               := '393939373030303030303030303031'H # 999700000000001
Parameters.px_IMEISV_Def                             := '73806121856151f1'H
NAS_5GC_Parameters.px_NAS_5GC_XRES_Length            := 8 # In ETSI TS 135 206 V16.0.0 (2020-08) Table Table 5. f2 output, RES length is 8 octets (64 bits)

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).

LogFile := "../logs/AtsNGAP/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
#ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
LogSourceInfo := Stack
LogEntityName:= Yes
LogEventTypes:= Yes
#TimeStampFormat := DateTime

[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.

# Open5GS AMF IP and port as listener
#system.NGAP_AMF.params := "NGAP/SCTP(server=127.0.0.5,port=38412,debug=1)"

# Open5GS pcap files
system.NGAP_AMF.params := "NGAP/SCTP_FILE/IP_OFFLINE/PCAP_FILE(file=../captures/ttcn_5g_ngap.pcapng)" # Linux cooked capture v2, no Ethernet layer
#system.NGAP_AMF.params := "NGAP/SCTP_FILE/IP_OFFLINE/ETH(mac_src=8c554ac1eee0,mac_dst=8c554ac1eee1)/PCAP_FILE(file=../captures/open5gs.pcap)" # regular pcap with Ethernet layer

[DEFINE]
# In this section you can create macro definitions,
# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE].

[INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.

[ORDERED_INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.

[EXTERNAL_COMMANDS]
# This section can define external commands (shell scripts) to be executed by the ETS
# whenever a control part or test case is started or terminated.

#BeginTestCase := ""
#EndTestCase := ""
#BeginControlPart := ""
#EndControlPart := ""

[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
#AtsImsIot_TestControl.control

# Verify that the IUT can send a  PDU SESSION RESOURCE SETUP REQUEST with at least one PDU session resource list to established PDU session.
NGAP_TestCases.TC_NGAP_AMF_PDU_01
# Verify that the IUT can send a  PDU_SESSION_RESOURCE_RELEASE_COMMAND to release PDU session.
#NGAP_TestCases.TC_NGAP_AMF_PDU_02
# Verify that the IUT can send a  PDU_SESSION_RESOURCE_MODIFY_REQUEST to modify PDU session.
#NGAP_TestCases.TC_NGAP_AMF_PDU_03
# Verify that the AMF node successfully processes a  PDU_SESSION_RESOURCE_MODIFY_INDICATION contains mandatory IEs and answers with PDU_SESSION_RESOURCE_MODIFY_CONFIRM for successfully modified PDU session.
#NGAP_TestCases.TC_NGAP_AMF_PDU_04
# Verify that the AMF node processes a  PDU_SESSION_RESOURCE_MODIFY_INDICATION contains mandatory IEs and answers with PDU_SESSION_RESOURCE_MODIFY_CONFIRM for not successfully modified PDU session.
#NGAP_TestCases.TC_NGAP_AMF_PDU_05

# Verify the IUT correctly sets the UE Context after Authentication and Security procedure has been executed
#NGAP_TestCases.TC_NGAP_AMF_CMP_01
# Verify that the IUT can send a UE CONTEXT RELEASE COMMAND that contains both the AMF_UE_NGAP_ID IE and the RAN_UE_NGAP_ID IE or only AMF_UE_NGAP_ID
#NGAP_TestCases.TC_NGAP_AMF_CMP_02
# Verify that the IUT sends a UE CONTEXT RELEASE COMMAND after UE_CONTEXT_RELEASE_REQUEST to release the UE-associated logic NG-connection due to NG-RAN node generated reasons
#NGAP_TestCases.TC_NGAP_AMF_CMP_03
# Verify that the IUT can send a UE CONTEXT MODIFICATION REQUEST containing mandatory IEs
###########################################NGAP_TestCases.TC_NGAP_AMF_CMP_04
# Verify that the IUT can send a CONNECTION ESTABLISHMENT INDICATION that contains mandatory IEs
#NGAP_TestCases.TC_NGAP_AMF_CMP_05
# Verify that the IUT can send an AMF CP RELOCATION INDICATION that contains mandatory IEs
#NGAP_TestCases.TC_NGAP_AMF_CMP_06
# Verify that the IUT can successfully request UE information from the AMF
#NGAP_TestCases.TC_NGAP_AMF_CMP_07
# Verify that the AMF node successfully processes a UE CONTEXT SUSPEND REQUEST containing mandatory IEs and answers with UE CONTEXT SUSPEND REQUEST RESPONSE with successfully suspend UE context
#NGAP_TestCases.TC_NGAP_AMF_CMP_08
# Verify that the AMF node successfully processes a UE CONTEXT SUSPEND REQUEST containing mandatory IEs and answers with UE CONTEXT SUSPEND FAILURE with failed suspension
#NGAP_TestCases.TC_NGAP_AMF_CMP_09
# Verify that the AMF node successfully processes a UE CONTEXT RESUME REQUEST containing mandatory IEs and answers with UE CONTEXT RESUME RESPONSE with successfully resume UE context
#NGAP_TestCases.TC_NGAP_AMF_CMP_10
# Verify that the AMF node successfully processes a UE CONTEXT RESUME REQUEST containing mandatory IEs and answers with UE CONTEXT RESUME FAILURE with failing to resume UE context
#NGAP_TestCases.TC_NGAP_AMF_CMP_11



# Verify that the AMF node successfully processes a HANDOVER REQUIRED message contains mandatory IEs and answers with HANDOVER COMMAND with successfully handover.
#NGAP_TestCases.TC_NGAP_AMF_MMP_01
# Verify that the AMF node successfully processes a HANDOVER REQUIRED message contains mandatory IEs and answers with HANDOVER PREPARATION FAILURE because the UE is not longer available.
#NGAP_TestCases.TC_NGAP_AMF_MMP_02
# Verify that the AMF node successfully sends a HANDOVER REQUEST message that contains mandatory IEs to the GNB.
#NGAP_TestCases.TC_NGAP_AMF_MMP_03
# Verify that the AMF node successfully processes a PATH SWITCH REQUEST message that contains mandatory IEs and answers with PATH SWITCH REQUEST ACKNOWLEDGE to acknowledge the path switch.
#NGAP_TestCases.TC_NGAP_AMF_MMP_04
# Verify that the AMF node successfully processes a PATH SWITCH REQUEST message that contains mandatory IEs and two PDU Sessions with same ID and answers with PATH SWITCH REQUEST FAILURE.
#NGAP_TestCases.TC_NGAP_AMF_MMP_05
# Verify that the AMF node successfully processes a HANDOVER CANCEL message that contains mandatory IEs and answers with HANDOVER CANCEL ACKNOWLEDGE to confirm that the ongoing handover was cancelled.
#NGAP_TestCases.TC_NGAP_AMF_MMP_06
# Verify that the AMF node successfully sends a DOWNLINK RAN STATUS TRANSFER message that contains mandatory IEs.
#NGAP_TestCases.TC_NGAP_AMF_MMP_07
# Verify that the NG-RAN node successfully sends a Handover Success message to the AMF.
#NGAP_TestCases.TC_NGAP_AMF_MMP_08
# Verify that the AMF node successfully sends a DOWNLINK RAN EARLY STATUS TRANSFER message that contains mandatory IEs.
#NGAP_TestCases.TC_NGAP_AMF_MMP_09

# Verify that the IUT can send an DOWNLINK NAS TRANSPORT message to carry NAS information over the NG interface.
#NGAP_TestCases.TC_NGAP_AMF_NAS_01
# Verify that the IUT can send an REROUTE NAS REQUEST message to reroute the INITIAL UE MESSAGE message to another AMF.
#NGAP_TestCases.TC_NGAP_AMF_NAS_02

# Verify that the AMF node successfully processes a NG SETUP REQEST message that contains mandatory IEs and answers with NG SETUP RESPONSE to acknowledge the setup.
#NGAP_TestCases.TC_NGAP_AMF_IMP_01
# Verify that the AMF node successfully processes a NG SETUP REQEST message that contains mandatory IEs and answers with NG SETUP RESPONSE to acknowledge the setup.
#NGAP_TestCases.TC_NGAP_AMF_IMP_02
# Verify that the AMF node successfully processes a NG SETUP REQEST message with optional field UE Retention Information and answers with NG SETUP RESPONSE to acknowledge the setup.
#NGAP_TestCases.TC_NGAP_AMF_IMP_03
# Verify that the AMF node successfully processes a NG SETUP REQEST message with different optional fields and answers with NG SETUP RESPONSE to acknowledge the setup.
#NGAP_TestCases.TC_NGAP_AMF_IMP_04
# Verify that the AMF node successfully processes a RAN CONFIGURATION UPDATE message with RAN CONFIGURATION UPDATE ACKNOWLEDGE to acknowledge the update.
#NGAP_TestCases.TC_NGAP_AMF_IMP_05
# Verify that the AMF node successfully declines a RAN CONFIGURATION UPDATE message with RAN CONFIGURATION UPDATE FAILURE when the AMF is not able to handle the request.
#NGAP_TestCases.TC_NGAP_AMF_IMP_06
# Verify that the IUT can send a AMF CONFIGURATION UPDATE message to the AMF.
#NGAP_TestCases.TC_NGAP_AMF_IMP_07
# Verify that the AMF node successfully processes a NG RESET message that contains mandatory IEs and answers with NG RESET ACKNOWLEDGE to acknowledge the reset.
#NGAP_TestCases.TC_NGAP_AMF_IMP_08
# Verify that the AMF can send a ERROR INDICATION to the GNB when a error occurs.
#NGAP_TestCases.TC_NGAP_AMF_IMP_09
# Verify that the AMF can send a AMF STATUS INDICATION to the GNB when a error occurs.
#NGAP_TestCases.TC_NGAP_AMF_IMP_10
# Verify that the AMF can send a OVERLOAD START to the GNB.
#NGAP_TestCases.TC_NGAP_AMF_IMP_11
# Verify that the AMF can send a OVERLOAD STOP to the GNB.
#NGAP_TestCases.TC_NGAP_AMF_IMP_12

# Verify that the IUT can send a WRITE REPLACE WARNING REQUEST to start broadcasting of warning messages.
#NGAP_TestCases.TC_NGAP_AMF_WTP_01
#Verify that the IUT can send a PWS CANCEL REQUEST to cancel broadcasting of warning messages.
#NGAP_TestCases.TC_NGAP_AMF_WTP_02

# Verify that the IUT can send a TRACE_START to initiate a trace session for a UE.
#NGAP_TestCases.TC_NGAP_AMF_TRP_01
# Verify that the IUT can send a DEACTIVATE_TRACE to deactivate a trace session for a UE.
#NGAP_TestCases.TC_NGAP_AMF_TRP_02

# Verify that the IUT can send a UE TNLA BINDING RELEASE REQUEST to initiate a UE TNLA Binding Release procedure.
#NGAP_TestCases.TC_NGAP_AMF_UBP_01
# Verify that the IUT can send a UE RADIO CAPABILITY ID MAPPING RESPONSE message that contains mandatory IEs to provide the UE radio capabilities id mapping.
#NGAP_TestCases.TC_NGAP_AMF_URP_02

# Verify that the IUT can send a DOWNLINK RIM INFORMATION TRANSFER.
#NGAP_TestCases.TC_NGAP_AMF_RIP_01

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.

[COMPONENTS]
# This section consists of rules restricting the location of created PTCs.

[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
KillTimer := 10.0
LocalAddress := 127.0.0.1
TCPPort := 12000
NumHCs := 1
Original line number Diff line number Diff line
Subproject commit 3f542e05e054a605c110d0b0b62908057c7203b2
Subproject commit c668fdde6b04942cb7ce43b5fd379105174c1828
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ module NGAP_Steps {
        function f_NGAP_amf_UE_Register() runs on aMFNGAPComponent {
            log(">>> f_NGAP_amf_UE_Register");
            if (PICS_OFFLINE_MODE) {
                f_send_NGSetupRequest_await_NGSetupResponse();
                f_await_NGSetupRequest_await_NGSetupResponse();
            } else {
                f_send_NGSetupRequest_await_NGSetupResponse();
            }
+32 −2
Original line number Diff line number Diff line
@@ -5447,7 +5447,7 @@ module LibNGAP_Templates {
                        template (present) InitiatingMessage mw_n2_initialUeMessage_base_nas:= {
                            procedureCode := id_InitialUEMessage,
                            criticality   := ?,
                            criticality   := reject,
                            value_        := {
                                              InitialUEMessage := {
                                                                   protocolIEs := {*,
@@ -5470,7 +5470,7 @@ module LibNGAP_Templates {
                                                                                    template (present) UEContextRequest p_uEContextRequest := ?
                                                                                    ) := {
                            procedureCode := id_InitialUEMessage,
                            criticality   := ignore,
                            criticality   := reject,
                            value_        := {
                                              InitialUEMessage := {
                                                                   protocolIEs := {
@@ -6064,6 +6064,36 @@ module LibNGAP_Templates {
                                            }
                        } // End of template mw_n2_NGSetupRequest
                        template (present) InitiatingMessage mw_n2_NGSetupRequest_noRANNodeName(
                                                                                                template (present) GlobalRANNodeID p_globalRANNodeID := ?,
                                                                                                template (present) SupportedTAList p_supportedTAs := ?,
                                                                                                template (present) PagingDRX p_pagingDRX := ?
                                                                                                ) := {
                            procedureCode := id_NGSetup,
                            criticality   := reject,
                            value_        := {
                                              NGSetupRequest := {
                                                                 protocolIEs := {
                                                                                 {
                                                                                     id := id_GlobalRANNodeID,
                                                                                     criticality := reject,
                                                                                     value_ := { GlobalRANNodeID := p_globalRANNodeID }
                                                                                 },
                                                                                 {
                                                                                     id := id_SupportedTAList,
                                                                                     criticality := reject,
                                                                                     value_ := { SupportedTAList := p_supportedTAs }
                                                                                 },
                                                                                 {
                                                                                     id := id_DefaultPagingDRX,
                                                                                     criticality := ignore,
                                                                                     value_ := { PagingDRX := p_pagingDRX }
                                                                                 }
                                                                                }
                                                                 }
                                            }
                        } // End of template mw_n2_NGSetupRequest
                    } // End of group Receive
                } // End of group NG_SETUP_REQUEST
Loading