Commit 994df9f6 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in postamble

parent 45e45033
Loading
Loading
Loading
Loading
+2 −2
Changes for etc/AtsNGAP/AtsNGAP_AMF_free5gc.cfg_: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -172,13 +172,13 @@ system.utHttpPort.params := "HTTP/TCP(server=127.0.0.1,port=12200,use_ssl=0,debu
#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 successfully receives and processes the PDU_SESSION_RESOURCE_SETUP_RESPONSE message and completes the PDU Session Resource Setup procedure for a single PDU_Session_Resource.
#NGAP_TestCases.TC_NGAP_AMF_PDU_01_2
# 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 successfully receives and processes the PDU_SESSION_RESOURCE_RELEASE_RESPONSE message and completes the PDU Session Resource Release procedure for a single PDU_Session_Resource.
#NGAP_TestCases.TC_NGAP_AMF_PDU_02_2
NGAP_TestCases.TC_NGAP_AMF_PDU_02_2
# 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.
+22 −4
Changes for etc/Ats_NG_NAS/Ats_NG_NAS_AMF_free5gc.cfg_: 22 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -27,6 +27,17 @@ LibNGAP_Pixits.PX_GNB_ID := '00000000000000000000000000000001'B
LibNGAP_Pixits.PX_TACode           := '000001'O
LibNGAP_Pixits.PX_SST              := '01'O
LibNGAP_Pixits.PX_SD               := '010203'O
LibNGAP_Pixits.PX_SD_PRESENT       := true # free5GC amfcfg.yaml plmnSupportList: slice SST 1 with SD 010203
# The new slice of TC_NGAP_AMF_IMP_05: the second slice of the free5GC AMF (amfcfg.yaml plmnSupportList: SST 1, SD 112233)
LibNGAP_Pixits.PX_SST_NEW          := '01'O
LibNGAP_Pixits.PX_SD_NEW           := '112233'O
LibNGAP_Pixits.PX_SD_NEW_PRESENT   := true
# N3 user plane: the test system (gNB) at 10.100.2.1:2152 (PX_TRANSPORT_LAYER_ADDRESS, DL tunnel), the UPF at 10.100.2.10:2152
LibNGAP_Pics.PICS_USE_GTPU          := true
LibNGAP_Pixits.PX_DN_PING_HOST      := "10.100.4.40" # dn container on n6 (free5gc-lab), reached through the UPF
# DL tunnel address announced to the UPF: must always match the src_ip of system.N3_gNB_1 below (here 10.100.2.1)
LibNGAP_Pixits.PX_TRANSPORT_LAYER_ADDRESS := '00001010011001000000001000000001'B # 10.100.2.1
LibNGAP_Pixits.PX_FIVE_QI          := 9     # 5QI of the default QoS flow (free5gc-lab config/subscriber.json, DNN internet)
LibNGAP_Pixits.PX_PAGING_DRX       := v128
LibNGAP_Pixits.PX_AMF_NAME         := "AMF"
LibNGAP_Pixits.PX_AMF_REGION_ID    := '11001010'B   # amfId cafe00: region CA
@@ -34,17 +45,24 @@ LibNGAP_Pixits.PX_AMF_SET_ID := '1111111000'B # set 3F8
LibNGAP_Pixits.PX_AMF_POINTER      := '000000'B     # pointer 0
LibNGAP_Pixits.PX_RAN_UE_NGAP_ID   := 1
LibNGAP_Pixits.PX_AMF_UE_NGAP_ID   := 2

LibNGAP_Pixits.PX_TIME_ZONE        := '80'O # 0x40 for GMT+1, 0x80 for GMT+2

LibNGAP_Pixits.PX_PDU_SESSION_ID   := 1

# The additional QoS flow of TC_NGAP_AMF_PDU_03: AUDIO gives 5QI 1 with the PCC rule of 5QI 1 of the subscriber (MongoDB)
LibUpperTesterHttp_Pics.PICS_USE_UT_HTTP        := true
LibUpperTesterHttp_Pixits.PX_UT_HTTP_HOST       := "127.0.0.1:12200" # server:port of system.utHttpPort below
LibUpperTesterHttp_Pixits.PX_UT_HTTP_MEDIA_TYPE := AUDIO

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 # MSIN 0000000001, BCD nibble-swapped
Lib_NG_NAS_Pixits.PX_NETWORK_NAME             := "free5GC"
Lib_NG_NAS_Pixits.PX_SUCI_PROTECTION_SCHEME   := 0
Lib_NG_NAS_Pixits.PX_HOME_NETWORK_PKI         := 0
#Lib_NG_NAS_Pixits.PX_HOME_NETWORK_PUBLIC_KEY := 'e421686f6fb2d70e3fa28d940494095686c3179fef53514667a6ed106b8a7d3d'O; // Profile A / open5gs
#Lib_NG_NAS_Pixits.PX_HOME_NETWORK_PUBLIC_KEY := '03adefcd1317d1ce8562ec25b91b4800120e1236d6e2661ea4235a84e3c85da244'O; // Profile B / open5gs

# OP
Lib_NG_NAS_Pixits.PX_OPERATOR_KEY := '00000000000000000000000000000000'O
@@ -79,8 +97,8 @@ LogEventTypes:= Yes
[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(ppid=60,server=10.100.1.10,port=38412,local_server=10.100.1.1,local_port=38413,debug=1)"
# free5GC AMF IP and port as listener (free5gc container on n2, free5gc-lab compose.ats.yaml)
system.NGAP_AMF.params := "NGAP/SCTP(ppid=60,server=10.100.1.10,port=38412,debug=1,local_server=10.100.1.1,local_port=38413,debug=1)"

# Open5GS pcap files
# Do not forget to set LibNGAP_Pics.PICS_OFFLINE_MODE to true
+24 −1
Changes for ttcn/AtsNGAP/NGAP_Steps.ttcn: 24 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -798,9 +798,14 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
         *          Sets the verdict to fail on the first mismatch, to pass otherwise (only logs with p_setVerdict false, e.g.
         *          in a preamble).
         * @param  p_setVerdict false to leave the verdict unchanged.
         * @param  p_pti The procedure transaction identity of the PDU SESSION RELEASE COMMAND, for the PDU SESSION RELEASE
         *         COMPLETE (unbound if no PDU SESSION RELEASE COMMAND could be read).
         * @return true if the command conforms.
         */
        function f_NGAP_amf_check_pdu_session_resource_release_command(in boolean p_setVerdict := true) runs on aMFNGAPComponent return boolean {
        function f_NGAP_amf_check_pdu_session_resource_release_command(
                                                                       in boolean p_setVerdict := true,
                                                                       out ProcedureTransactionIdentifier p_pti
                                                                       ) runs on aMFNGAPComponent return boolean {
            var NAS_PDU v_nasPdu;
            var PDUSessionResourceToReleaseItemRelCmd v_item;
            var NG_NAS_DL_Message_Type v_message;
@@ -846,6 +851,7 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
                return false;
            }
            log("f_NGAP_amf_check_pdu_session_resource_release_command: PDU SESSION RELEASE COMMAND: ", v_release);
            p_pti := v_release.procedureTransactionIdentifier;
            // PDU Session Resource Release Command Transfer: the cause
            var bitstring v_bs := oct2bit(v_item.pDUSessionResourceReleaseCommandTransfer);
            if (fx_dec_PDUSessionResourceReleaseCommandTransfer(v_bs, v_transfer) != 0) {
@@ -881,6 +887,23 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
            }
        } // End of function f_NGAP_amf_UE_PDU_SessionResourceReleaseResponse

        /**
         * @brief  Answer the PDU SESSION RELEASE COMMAND with the PDU SESSION RELEASE COMPLETE (test system = UE); read from the
         *         capture in offline mode (PICS_OFFLINE_MODE).
         * @param  p_pduSessionId The PDU session released.
         * @param  p_pti The procedure transaction identity of the PDU SESSION RELEASE COMMAND.
         */
        function f_NGAP_amf_UE_PDU_SessionReleaseComplete(
                                                          in PDUSessionID p_pduSessionId,
                                                          in ProcedureTransactionIdentifier p_pti
                                                          ) runs on aMFNGAPComponent {
            if (PICS_OFFLINE_MODE) {
                f_recv_NGAP_PDU(mw_ngap_initMsg_anyProcedure(id_UplinkNASTransport));
            } else {
                f_send_pdu_session_release_complete(p_pduSessionId, p_pti);
            }
        } // End of function f_NGAP_amf_UE_PDU_SessionReleaseComplete

        /**
         * @brief  Check the PDU SESSION RESOURCE MODIFY REQUEST just received (vc_recvNGAP_PDU), as TP_NGAP_AMF_PDU_03 expects.
         * @details - NGAP (mw_n2_PDUSessionResourceModifyRequest_conformant): for the UE (vc_AMF_UE_ID, vc_RAN_UE_ID), with a
+16 −3
Changes for ttcn/AtsNGAP/NGAP_TCFunctions.ttcn: 16 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -4440,6 +4440,7 @@ module NGAP_TCFunctions {
                  var default v_dlNas;
                  timer t_command := PX_NGAP_TWAIT;
                  var boolean v_commanded := false;
                  var ProcedureTransactionIdentifier v_pti;

                  // Preamble
                  f_NGAP_amf_init();
@@ -4470,10 +4471,12 @@ module NGAP_TCFunctions {
                      [] N2_gNBaMF_P.receive(mw_ngap_initMsg_anyProcedure(id_PDUSessionResourceRelease)) -> value vc_recvNGAP_PDU {
                          t_command.stop;
                          v_commanded := true;
                          if (f_NGAP_amf_check_pdu_session_resource_release_command()) {
                          if (f_NGAP_amf_check_pdu_session_resource_release_command(-, v_pti)) {
                              log("*** " & __SCOPE__ & ": PASS: PDU SESSION RESOURCE RELEASE COMMAND as expected. ***");
                              setverdict(pass, "PDU SESSION RESOURCE RELEASE COMMAND as expected");
                          } else {
                              log("*** " & __SCOPE__ & ": FAIL: PDU SESSION RESOURCE RELEASE COMMAND not as expected. ***");
                              setverdict(fail, "PDU SESSION RESOURCE RELEASE COMMAND not as expected");
                          }
                      }
                      [] t_command.timeout {
@@ -4485,9 +4488,14 @@ module NGAP_TCFunctions {
                  log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                  // Postamble
                  // The gNB completes the release of the PDU session (TS 38.413 clause 8.2.2.2), then the UE context is released
                  // The gNB completes the release of the PDU session (TS 38.413 clause 8.2.2.2), the UE answers the PDU SESSION
                  // RELEASE COMMAND (TS 24.501 clause 6.4.3.3: otherwise the SMF keeps the PDU session until T3592 runs out),
                  // then the UE context is released
                  if (v_commanded) {
                      f_NGAP_amf_UE_PDU_SessionResourceReleaseResponse(PX_PDU_SESSION_ID); // f_send_pdu_session_resource_release_response
                      if (isbound(v_pti)) {
                          f_NGAP_amf_UE_PDU_SessionReleaseComplete(PX_PDU_SESSION_ID, v_pti); // f_send_pdu_session_release_complete
                      }
                  }
                  deactivate(v_dlNas);
                  f_postamble_NGAP_AMF();
@@ -4507,6 +4515,7 @@ module NGAP_TCFunctions {
                  // Local variables
                  var default v_dlNas;
                  var boolean v_commanded := false;
                  var ProcedureTransactionIdentifier v_pti;
                  timer t_command := PX_NGAP_TWAIT;
                  timer t_observation := PX_TNOAC;

@@ -4532,7 +4541,7 @@ module NGAP_TCFunctions {
                  alt {
                      [] N2_gNBaMF_P.receive(mw_ngap_initMsg_anyProcedure(id_PDUSessionResourceRelease)) -> value vc_recvNGAP_PDU {
                          t_command.stop;
                          v_commanded := f_NGAP_amf_check_pdu_session_resource_release_command(false);
                          v_commanded := f_NGAP_amf_check_pdu_session_resource_release_command(false, v_pti);
                      }
                      [] t_command.timeout {
                      }
@@ -4574,6 +4583,10 @@ module NGAP_TCFunctions {
                  log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                  // Postamble
                  // The UE answers the PDU SESSION RELEASE COMMAND (TS 24.501 clause 6.4.3.3), then the UE context is released
                  if (isbound(v_pti)) {
                      f_NGAP_amf_UE_PDU_SessionReleaseComplete(PX_PDU_SESSION_ID, v_pti); // f_send_pdu_session_release_complete
                  }
                  f_postamble_NGAP_AMF();
                  f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                  log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
+1 −1
Changes for ttcn/LibNGAP/lib/LibNGAP_Templates.ttcn: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -26006,7 +26006,7 @@ module LibNGAP_Templates {
                                                    template (present) UESecurityCapabilities p_uESecurityCapabilities := ?,
                                                    template (present) SecurityKey p_nextHopNH := ?,
                                                    template TraceActivation p_traceActivation := omit,
                                                    template MobilityRestrictionList p_mobilityRestrictionList := omit,
                                                    template MobilityRestrictionList p_mobilityRestrictionList := *, // Mobility Restriction List is allowed by TS 38.413 §9.2.2.1, where the IE is optional (e.g. free5g/ngapIE.mobilityRestrictionList.enable: true)
                                                    template UERadioCapability p_uERadioCapability := omit,
                                                    template IndexToRFSP p_indexToRFSP := omit,
                                                    template MaskedIMEISV p_maskedIMEISV := ?,
Loading