Commit bb22cd3e authored by Yann Garcia's avatar Yann Garcia
Browse files

Review Lib_NG_NAS_Security_Functions.ttcn & LibNGAP_Functions.ttcn

parent 5e8bd756
Loading
Loading
Loading
Loading
−164 B (3.97 KiB)

File changed.

No diff preview for this file type.

+8 −5
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
NGAP_Pics.PICS_NGAP_AMF_IUT    := true
NGAP_Pics.PICS_NGAP_GNB_IUT    := false

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

LibNGAP_Pixits.PX_NAS_MCC          := '999'H
LibNGAP_Pixits.PX_NAS_MNC          := '70'H
@@ -66,11 +66,12 @@ LogEventTypes:= Yes
# 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)"
#system.NGAP_AMF.params := "NGAP/SCTP(server=127.0.0.5,port=38412,debug=1)"

# Open5GS pcap files
# Do not forget to set LibNGAP_Pics.PICS_OFFLINE_MODE to true
#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/TC_NGAP_AMF_PDU_01.pcap)" # regular pcap with Ethernet layer
system.NGAP_AMF.params := "NGAP/SCTP_FILE/IP_OFFLINE/ETH(mac_src=8c554ac1eee0,mac_dst=8c554ac1eee1)/PCAP_FILE(file=../captures/TC_NGAP_AMF_PDU_01.pcap)" # regular pcap with Ethernet layer

[DEFINE]
# In this section you can create macro definitions,
@@ -98,7 +99,7 @@ system.NGAP_AMF.params := "NGAP/SCTP(server=127.0.0.5,port=38412,debug=1)"
#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
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.
@@ -153,12 +154,14 @@ system.NGAP_AMF.params := "NGAP/SCTP(server=127.0.0.5,port=38412,debug=1)"
#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
#NGAP_TestCases.TC_NGAP_AMF_NAS_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_01
# Verify that the AMF node successfully processes an NG_SETUP_REQUEST message containing the PLMN identity, TAC, supported slice IEs and Extended RAN Node Name, and responds with an NG_SETUP_RESPONSE message to acknowledge the setup.
#NGAP_TestCases.TC_NGAP_AMF_IMP_01_02
# Verify that the AMF with IAB support successfully processes an NG_SETUP_REQUEST message containing the PLMN identity, TAC and supported slice IEs, and responds with an NG_SETUP_RESPONSE message containing IAB Supported IE to acknowledge the setup."
#NGAP_TestCases.TC_NGAP_AMF_IMP_01_03
# 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.
Original line number Diff line number Diff line
Subproject commit b7ef8f8a661c237a8c79b1a58fa16e99cca17175
Subproject commit 0354bd8fa2f1f85d39c35a8dc5e38416ab9db5cf
+11 −0
Original line number Diff line number Diff line
@@ -239,6 +239,17 @@ module NGAP_Steps {
        /**
         * @desc
         */
        function f_NGAP_amf_UE_ErrorIndication(
                                               in template (value) Cause p_cause := m_cause_misc(unknown_PLMN_or_SNPN)
                                               ) runs on aMFNGAPComponent {
            log(">>> f_NGAP_amf_UE_ErrorIndication");
            if (PICS_OFFLINE_MODE) {
                f_await_error_indication(p_cause);
            } else {
                f_send_error_indication(p_cause);
            }
        } // End of function f_NGAP_amf_UE_ErrorIndication

        function f_NGAP_amf_UE_SecurityMode() runs on aMFNGAPComponent {
            log(">>> f_NGAP_amf_UE_SecurityMode");
            if (PICS_OFFLINE_MODE) {
+169 −107
Original line number Diff line number Diff line
@@ -5524,7 +5524,7 @@ module NGAP_TCFunctions {
                 log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                 // Postamble
                   f_NGAP_amf_UE_Authentication_Failure();
                 f_NGAP_amf_UE_ErrorIndication();
                 f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                 log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");

@@ -5592,6 +5592,68 @@ module NGAP_TCFunctions {

              } // End of function f_TC_NGAP_AMF_IMP_01_02

              /**
               * @desc Testcase function for TC_NGAP_AMF_IMF_01_03
               */
              function f_TC_NGAP_AMF_IMP_01_03() runs on aMFNGAPComponent {
                // Local variables

                // Preamble
                f_NGAP_amf_init();
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

                // Body
                // Send NGSetupRequest
                f_send_NGAP_PDU(
                                m_ngap_initMsg(
                                                m_n2_NGSetupRequest(
                                                                    m_globalRANNodeID_globalGNB_ID(
                                                                                                  m_ie_globalGnbId(
                                                                                                                    fl_NasNN_MCC2PlmnId(PX_NAS_MCC, PX_NAS_MNC),
                                                                                                                    PX_GNB_ID
                                                                    )),
                                                                    {
                                                                      m_supportedTAItem(
                                                                                        PX_TACode,
                                                                                        {
                                                                                            m_ie_broadcastPLMNItem(
                                                                                                                   fl_NasNN_MCC2PlmnId(PX_NAS_MCC, PX_NAS_MNC),
                                                                                                                   {
                                                                                                                       m_sliceSupportItem(
                                                                                                                                          m_s_NSSAI(
                                                                                                                                                    PX_SST,
                                                                                                                                                    PX_SD
                                                                                                                                          ))
                                                                                                                   })
                                                                                        })
                                                                    },
                                                                    PX_PAGING_DRX
                )));
                // Await NGSetupResponse
                f_recv_NGAP_PDU(
                                mw_ngap_succMsg(
                                                mw_n2_NGSetupResponse(
                                                                      mw_aMFName(PX_AMF_NAME),
                                                                      {
                                                                      *,
                                                                      mw_servedGUAMIItem(
                                                                                          mw_gUAMI(
                                                                                                  fl_NasNN_MCC2PlmnId(PX_NAS_MCC, PX_NAS_MNC)
                                                                                          )),
                                                                      *
                                                                      }
                                )));
                 f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                 log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                 // Postamble
                 f_NGAP_amf_UE_Authentication_Failure();
                 f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                 log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");

              } // End of function f_TC_NGAP_AMF_IMP_01_03

              /**
               * @desc Testcase function for TC_NGAP_AMF_IMP_02
               */
Loading