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

Implement and validate TC_5GNAS_AMF_CNF_COM_01, Review TP_5GNAS_AMF_CNF_COM_01

parent c2b4dd9e
Loading
Loading
Loading
Loading
+6.9 KiB

File added.

No diff preview for this file type.

+1 −0
Changes for etc/Ats_NG_NAS/Ats_NG_NAS_AMF_open5gs.cfg_: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ NG_NAS_Pics.PICS_NAS_A4_1_2_4 := true # open5gs re-authenticates on #71 ngKSI
NG_NAS_Pics.PICS_NAS_A4_2_1     := true  # security mode control (TC_5GNAS_AMF_SEC_COM_01)
NG_NAS_Pics.PICS_NAS_A4_2       := true  # security mode control procedure (TC_5GNAS_AMF_SEC_ACC_01)
NG_NAS_Pics.PICS_NAS_A4_3       := true  # identification procedure (TC_5GNAS_AMF_IDN_REQ_01)
NG_NAS_Pics.PICS_NAS_A4_4_1     := true  # open5gs sends a NITZ-only CONFIGURATION UPDATE COMMAND on REGISTRATION COMPLETE (TC_5GNAS_AMF_CNF_COM_01)

LibNGAP_Pics.PICS_OFFLINE_MODE := false # true to use offline mode with pcap files, false to use online mode with real network functions
LibNGAP_Pics.PICS_USE_OPEN5GS  := false # true to start open5gs, false to not start them
+12 −13
Changes for test_purposes/TP_AMF_NGNAS.tdltx: 12 added lines, 13 removed lines.
Original line number Diff line number Diff line
@@ -544,10 +544,11 @@ Package TP_AMF_NGNAS {
    	    Test Purpose TP_5GNAS_AMF_CNF_COM_01 {

            Objective: "Verify that the IUT does not retransmit a CONFIGURATION_UPDATE_COMMAND containing only NITZ-related information elements when the Configuration update indication IE is absent or indicates that acknowledgement is not requested."
            // Example trigger observed in implementation: CONFIGURATION_UPDATE_COMMAND sent after PDU_SESSION_ESTABLISHMENT_REQUEST;
            // note that the base specification does not explicitly define when the CONFIGURATION_UPDATE_COMMAND shall be sent.
            // The base specification does not define when the IUT sends a CONFIGURATION_UPDATE_COMMAND carrying NITZ;
            // implementations send it e.g. upon receipt of the REGISTRATION_COMPLETE (open5gs) or after a
            // PDU_SESSION_ESTABLISHMENT_REQUEST. The test system shall be ready to receive it from the end of the registration.

            Reference: "ETSI TS 124 501 [1], Clauses 5.4.4.2 and 8.2.19"
            Reference: "ETSI TS 124 501 [1], Clauses 5.4.4.2, 8.2.19 and 10.2 (T3555)"

            Configuration: CF_AMF_N2N1

@@ -555,7 +556,7 @@ Package TP_AMF_NGNAS {

            Initial conditions
            with {
                the UE entity isRegisteredToAMF
                the UE entity isRegisteredToAMF //!up to and including the REGISTRATION_COMPLETE; the UE does not answer the CONFIGURATION_UPDATE_COMMAND
            }

            Expected behaviour
@@ -566,19 +567,17 @@ Package TP_AMF_NGNAS {
                                extended_protocol_discriminator set to 5GS_MOBILITY_MANAGEMENT_MESSAGES,
                                security_header_type set to INTEGRITY_PROTECTED_AND_CIPHERED,
                                message_type set to CONFIGURATION_UPDATE_COMMAND,
                                Full_name_for_network,
                                Short_name_for_network,
                                Local_time_zone,
                                Universal_time_and_local_time_zone,
                                Daylight_saving_time,
                                not Configuration_update_indication OR
                                Configuration_update_indication containing {
                                    Acknowledgement_requested set to 0
                                }}}
                                    Acknowledgement_requested set to "0"} or omitted, //!no acknowledgement requested: T3555 is not started (ETSI TS 124 501 clause 5.4.4.2)
                                Full_name_for_network set to RV_FULL_NAME or omitted,
                                Short_name_for_network set to RV_SHORT_NAME or omitted,
                                Local_time_zone set to RV_LOCAL_TIME_ZONE or omitted,
                                Universal_time_and_local_time_zone set to RV_UNIVERSAL_TIME or omitted,
                                Network_daylight_saving_time set to RV_DAYLIGHT_SAVING_TIME or omitted}} //!at least one of these NITZ IEs is present, and no other IE (5G-GUTI, TAI list, allowed NSSAI, ...) is present
                        to the GNB entity
                    }
                    then {
                     	// PX_CUC_TWAIT value for timer awaiting no response after CUC message
                        // PX_CUC_TWAIT: observation time, longer than T3555 (6 s)
                        (!) PX_CUC_TWAIT after @start_CUC_event : the IUT entity does not send a DOWNLINK_NAS_TRANSPORT containing {
                            NAS_PDU containing {
                                extended_protocol_discriminator set to 5GS_MOBILITY_MANAGEMENT_MESSAGES,
+88 −0
Changes for ttcn/Ats_NG_NAS/NG_NAS_TCFunctions.ttcn: 88 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -693,7 +693,95 @@ module NG_NAS_TCFunctions {
                    log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                } // End of function f_TC_5GNAS_AMF_IDN_REQ_01

                /**
                 * @desc Testcase function for TC_5GNAS_AMF_CNF_COM_01
                 * @see  TP_5GNAS_AMF_CNF_COM_01: the IUT sends a CONFIGURATION UPDATE COMMAND with only NITZ information and no
                 *       acknowledgement requested (integrity protected and ciphered, mw_NG_CONFIGURATION_UPDATE_COMMAND_nitzOnly,
                 *       at least one NITZ IE); left unanswered, it is not retransmitted during PX_CUC_TWAIT (no T3555,
                 *       TS 24.501 clause 5.4.4.2). The IUT sends it on registration completion (e.g. open5gs), so the REGISTRATION
                 *       COMPLETE, which makes the UE registered, is sent at the start of the test body: the CONFIGURATION UPDATE
                 *       COMMAND that follows would otherwise arrive during the synchronisation and be discarded by a_defaultNGAP.
                 */
                function f_TC_5GNAS_AMF_CNF_COM_01() runs on aMF_NGNAS_NGAPComponent {
                    // Local variables
                    var NG_NAS_DL_Message_Type v_message;
                    var NGAP_PDU v_PDU;
                    var NAS_PDU v_cucPdu;
                    var integer v_sht;
                    timer t_observation := PX_CUC_TWAIT;

                    // Preamble: NG SETUP, registration up to the INITIAL CONTEXT SETUP (REGISTRATION ACCEPT)
                    f_NGNAS_amf_init();
                    f_NG_NAS_amf_UE_Register();
                    f_NG_NAS_amf_UE_Authentication();
                    f_NG_NAS_amf_UE_SecurityMode();
                    f_NG_NAS_amf_UE_InitialContextSetup();
                    f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                    log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

                    // Test Body
                    // The UE is registered (REGISTRATION COMPLETE)
                    f_NG_NAS_amf_RegistrationComplete();
                    // When: CONFIGURATION UPDATE COMMAND with only NITZ information, no acknowledgement requested
                    f_recv_NGAP_PDU(
                                    mw_ngap_initMsg(
                                                    mw_n2_DownlinkNASTransport(
                                                                               vc_AMF_UE_ID,
                                                                               vc_RAN_UE_ID,
                                                                               ? // ConfigurationUpdateCommand
                    )));
                    t_observation.start;
                    f_NASPDU_Get(vc_recvNGAP_PDU);
                    v_cucPdu := vc_recvNAS_PDU;
                    v_sht := bit2int(substr(oct2bit(vc_recvNAS_PDU[1]), 4, 4)); // TS 24.501 clause 9.3: octet 2, bits 4 to 1
                    if (v_sht != 2) {
                        setverdict(inconc, "*** " & __SCOPE__ & ": INCONC: security header type " & int2str(v_sht) & ", 2 (integrity protected and ciphered) expected ***");
                    } else if (not f_Check_5GAKA_NAS_DL_Message(vc_recvNAS_PDU, mw_NG_CONFIGURATION_UPDATE_COMMAND, vc_ng_nas_security_params_type, vc_previous_nas_count_dl, v_message, vc_inner_message)) {
                        setverdict(inconc, "*** " & __SCOPE__ & ": INCONC: no CONFIGURATION UPDATE COMMAND (the IUT does not send one on registration completion) ***");
                    } else if (not match(v_message, mw_NG_CONFIGURATION_UPDATE_COMMAND_nitzOnly) or
                               not (ispresent(v_message.configuration_Update_Command.fullNetworkName) or
                                    ispresent(v_message.configuration_Update_Command.shortNetworkName) or
                                    ispresent(v_message.configuration_Update_Command.localTimeZone) or
                                    ispresent(v_message.configuration_Update_Command.localTimeZoneAndTime) or
                                    ispresent(v_message.configuration_Update_Command.daylightSavingTime))) {
                        setverdict(inconc, "*** " & __SCOPE__ & ": INCONC: the CONFIGURATION UPDATE COMMAND is not NITZ only without acknowledgement requested ***");
                    } else {
                        log("*** " & __SCOPE__ & ": INFO: NITZ-only CONFIGURATION UPDATE COMMAND, no acknowledgement requested ***");
                        // Then: no retransmission during PX_CUC_TWAIT
                        alt {
                            [] N2_gNBaMF_P.receive(
                                                   mw_ngap_initMsg(
                                                                   mw_n2_DownlinkNASTransport(
                                                                                              vc_AMF_UE_ID,
                                                                                              vc_RAN_UE_ID,
                                                                                              ?
                                                   ))) -> value v_PDU {
                                f_NGAPPDU_Get(v_PDU);
                                f_NASPDU_Get(vc_recvNGAP_PDU);
                                if (vc_recvNAS_PDU == v_cucPdu) {
                                    t_observation.stop;
                                    setverdict(fail, "*** " & __SCOPE__ & ": FAIL: the NITZ-only CONFIGURATION UPDATE COMMAND is retransmitted after " & float2str(PX_CUC_TWAIT - t_observation.read) & " s ***");
                                } else if (f_Check_5GAKA_NAS_DL_Message(vc_recvNAS_PDU, mw_NG_CONFIGURATION_UPDATE_COMMAND, vc_ng_nas_security_params_type, vc_previous_nas_count_dl, v_message, vc_inner_message)) {
                                    t_observation.stop;
                                    setverdict(fail, "*** " & __SCOPE__ & ": FAIL: CONFIGURATION UPDATE COMMAND sent again without acknowledgement requested ***");
                                } else {
                                    log("*** " & __SCOPE__ & ": INFO: other DOWNLINK NAS TRANSPORT, ignored ***");
                                    repeat;
                                }
                            }
                            [] t_observation.timeout {
                                log("*** " & __SCOPE__ & ": PASS: no retransmission of the CONFIGURATION UPDATE COMMAND during ", PX_CUC_TWAIT, " s ***");
                                setverdict(pass);
                            }
                        }
                    }
                    f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                    log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");

                    // Postamble: release of the UE context (no PDU session: the IUT answers nas normal-release)
                    f_postamble_NGAP_AMF(m_cause_nas(normal_release));
                    f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict());
                    log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                } // End of function f_TC_5GNAS_AMF_CNF_COM_01

            } // End of group /*5_4_2_*/Security_mode_control_procedure
+2 −0
Changes for ttcn/Ats_NG_NAS/NG_NAS_TestControl.ttcn: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@ module NG_NAS_TestControl {

            execute(TC_5GNAS_AMF_IDN_REQ_01());

            execute(TC_5GNAS_AMF_CNF_COM_01());

            execute(TC_5GNAS_AMF_DLN_ACC_01());

            execute(TC_5GNAS_AMF_REG_ACC_01());
Loading