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

Validate TC_NGAP_GNB_IMP_01

parent bb3f1152
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2,6 +2,10 @@

ifeq (,$(ATS))
 $(error ATS shall be defined)
else
 y       := $(subst ., ,$(ATS))
 override ATS     := $(word 1, $(y))
 override SUB_ATS := $(word 2, $(y))
endif

ifeq (,$(TOPDIR))
@@ -25,7 +29,7 @@ $$(foreach M, $$(modules), $$(eval $$(call IncludeModule, $$(if $$(filter /%, $
endef

all_includes := $(TTCN3_DIR)/include $(TTCN3_DIR)/src /usr/include/jsoncpp /usr/include/libxml2
defines  += TITAN_RUNTIME_2 _NO_SOFTLINKS_ $(ATS)  AS_USE_SSL _GNU_SOURCE
defines  += TITAN_RUNTIME_2 _NO_SOFTLINKS_ $(ATS) $(SUB_ATS) AS_USE_SSL _GNU_SOURCE
libs     += $(TTCN3_DIR)/lib/libttcn3-rt2-parallel.a -lstdc++fs

ifeq (Windows_NT,$(OS))
@@ -77,9 +81,11 @@ gen_headers := $(gen_ttcn_headers) $(gen_ttcn3_headers) $(gen_asn_headers) $(gen
gen_objects := $(patsubst %.cc, %.o, $(gen_sources))
cc_objects  := $(patsubst  %.cc, $(outdir)/%.o, $(cc_sources))

outbin = $(bindir)/$(ATS)$(SUB_ATS)$(EXE)

.PHONY: all FORCE echo

all: $(bindir) $(outdir) $(bindir)/$(ATS)$(EXE)
all: $(bindir) $(outdir) $(outbin)

echo_sources:
	@echo -e "$(addsuffix \n,$(all_sources))"
+10 −3
Original line number Diff line number Diff line
@@ -3,10 +3,17 @@

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

LibCommon_Time.PX_TDONE                 := 30.0;
LibCommon_Time.PX_TAC                   := 30.0;
LibCommon_Time.PX_TNOAC                 := 10.0;
LibCommon_Time.PX_TWAIT                 := 30.0;
LibCommon_Sync.PX_TSYNC_TIME_LIMIT      := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;

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_Pics.PICS_OFFLINE_MODE := false # 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,12 +73,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,
+192 −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.

LibCommon_Time.PX_TDONE                 := 30.0;
LibCommon_Time.PX_TAC                   := 30.0;
LibCommon_Time.PX_TNOAC                 := 10.0;
LibCommon_Time.PX_TWAIT                 := 30.0;
LibCommon_Sync.PX_TSYNC_TIME_LIMIT      := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;

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

LibNGAP_Pics.PICS_OFFLINE_MODE := false # 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
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_TIME_ZONE        := '80'O # 0x40 for GMT+1, 0x80 for GMT+2

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;
Lib_NG_NAS_Pixits.PX_NETWORK_NAME                    := "Open5GS"

# 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.

# Act as AMF, listen for incoming connections from gNB
system.NGAP_gNB_1.params := "NGAP/SCTP(local_server=127.0.0.5,server_mode=1,local_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

[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 GNB successfully processes a PDU_SESSION_RESOURCE_SETUP_REQUEST and answers with PDU_SESSION_RESOURCE_SETUP_RESPONSE for successfully established PDU session.
#NGAP_TestCases.TC_NGAP_GNB_PDU_01
# Verify that the NG-RAN node reports the establishment of the corresponding PDU session as failed if a PDU SESSION RESOURCE SETUP REQUEST contains several PDU Session ID IEs set to the same value.
#NGAP_TestCases.TC_NGAP_GNB_PDU_02
# Verify that the NG-RAN node reports the establishment of the new PDU session as failed if a PDU SESSION RESOURCE SETUP REQUEST contains a PDU Session ID IE set to value that identifies an active PDU Session. NOTE: Run TP_NGAP_GNB_PDU_01 before this TP.
#NGAP_TestCases.TC_NGAP_GNB_PDU_03
# Verify that the NG-RAN node reports the establishment of the corresponding PDU session as failed if a PDU SESSION RESOURCE SETUP REQUEST contains a QoS Flow Setup Request List IE in the PDU Session Resource Setup Request Transfer IE including at least one Non-GBR QoS flow but the PDU Session Aggregate Maximum Bit Rate IE is not present.
#NGAP_TestCases.TC_NGAP_GNB_PDU_04
# Verify that the NG-RAN node successfully processes a  PDU SESSION RESOURCE RELEASE COMMAND contains mandatory IEs and answers with PDU SESSION RESOURCE RELEASE RESPONSE to release PDU session.
#NGAP_TestCases.TC_NGAP_GNB_PDU_05
# Verify that the NG-RAN node successfully processes a  PDU SESSION RESOURCE RELEASE COMMAND containing multiple PDU Session ID IEs set to the same value and ignore the duplication.
#NGAP_TestCases.TC_NGAP_GNB_PDU_05
# Verify that the NG-RAN node successfully processes a  PDU SESSION RESOURCE MODIFY REQUEST contains mandatory IEs and answers with PDU SESSION RESOURCE MODIFY RESPONSE for successfully modified PDU session.
#NGAP_TestCases.TC_NGAP_GNB_PDU_07
# Verify that the IUT can send a  PDU_SESSION_RESOURCE_NOTIFY that already established QoS flow or PDU session for given UE are release.
#NGAP_TestCases.TC_NGAP_GNB_PDU_08
# Verify that the IUT can send a PDU_SESSION_RESOURCE_MODIFY_INDICATION to request modification of established PDU session.
#NGAP_TestCases.TC_NGAP_GNB_PDU_09

# Verify that the IUT can send a HANDOVER REQUIRED message containing mandatory IEs.
#NGAP_TestCases.TC_NGAP_GNB_MMP_01
# Verify that the GNB node successfully processes a HANDOVER REQUEST message that contains mandatory IEs and answers with HANDOVER REQUEST ACKNOWLEDGE to acknowledge the handover.
#NGAP_TestCases.TC_NGAP_GNB_MMP_02
# Verify that the GNB node successfully processes a HANDOVER REQUEST message that contains mandatory IEs and answers with HANDOVER REQUEST FAILURE because the UE is not longer available.
#NGAP_TestCases.TC_NGAP_GNB_MMP_03
# Verify that the GNB node successfully processes a HANDOVER REQUEST message that contains optional IEs and answers with HANDOVER REQUEST ACKNOWLEDGE to acknowledge the handover.
#NGAP_TestCases.TC_NGAP_GNB_MMP_04
# Verify that the GNB node successfully processes a HANDOVER REQUEST message that contains optional IEs within the Handover Request Transfer IEs and answers with correct HANDOVER REQUEST ACKNOWLEDGE.
#NGAP_TestCases.TC_NGAP_GNB_MMP_05
# Verify that the GNB node successfully processes a HANDOVER REQUEST message for an intra-system handover and answers with HANDOVER REQUEST ACKNOWLEDGE to acknowledge the handover.
#NGAP_TestCases.TC_NGAP_GNB_MMP_06
# Verify that the AMF node successfully sends a HANDOVER NOTIFICATION message that contains mandatory IEs to the AMF.
#NGAP_TestCases.TC_NGAP_GNB_MMP_07
# Verify that the AMF node successfully sends a PATH SWITCH REQUEST message that contains mandatory IEs to the AMF.
#NGAP_TestCases.TC_NGAP_GNB_MMP_08
# Verify that the GNB node successfully sends a HANDOVER CANCEL message that contains mandatory IEs to the AMF.
#NGAP_TestCases.TC_NGAP_GNB_MMP_09
# Verify that the NG-RAN node successfully send a UPLINK RAN STATUS TRANSFER message to the AMF.
#NGAP_TestCases.TC_NGAP_GNB_MMP_10
# Verify that the NG-RAN node successfully sends a UPLINK RAN EARLY STATUS TRANSFER message to the AMF.
#NGAP_TestCases.TC_NGAP_GNB_MMP_11

# Verify that the IUT can send an INITIAL UE MESSAGE to indicate the initiation of a NAS Transport procedure.
#NGAP_TestCases.TC_NGAP_GNB_NAS_01
# Verify that the IUT can send an UPLINK NAS TRANSPORT message to the AMF.
#NGAP_TestCases.TC_NGAP_GNB_NAS_02
# Verify that the IUT can send a NAS NON DELIVERY INDICATION message to t.he AMF
#NGAP_TestCases.TC_NGAP_GNB_NAS_03

# Verify that the GNB sends an NG_SETUP_REQUEST message to the AMF after TNL establishment.
#NGAP_TestCases.TC_NGAP_GNB_IMP_01
# Verify that the GNB successfully processes a full NG_RESET message and answers with NG_RESET_ACKNOWLEDGE to acknowledge the resetVerify that the GNB 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_GNB_IMP_05
# Verify that the GNB successfully processes a partial NG_RESET message and answers with NG_RESET_ACKNOWLEDGE to acknowledge the partial reset.
#NGAP_TestCases.TC_NGAP_GNB_IMP_05_02

# Verify that the NG-RAN node successfully processes a WRITE-REPLACE WARNING REQUEST containing mandatory IEs and answers with WRITE-REPLACE WARNING RESPONSE to start broadcasting of warning messages.
#NGAP_TestCases.TC_NGAP_GNB_WTP_01
# Verify that the NG-RAN node successfully processes a WRITE-REPLACE WARNING REQUEST containing Message Identifier IE and/or Serial Number IE different from those in the warning message being broadcast and if Concurent Warning Message Indicator is not present then IUT node answers with WRITE-REPLACE WARNING RESPONSE  and replaces the warning message being broadcast with newly received one for that area.
#NGAP_TestCases.TC_NGAP_GNB_WTP_02
# Verify that the NG-RAN node successfully processes a PWS CANCEL REQUEST containing mandatory IEs and answers with PWS CANCEL RESPONSE to cancel an already ongoing broadcast warning messages in all of the cells in the NG-RAN.
#NGAP_TestCases.TC_NGAP_GNB_WTP_03
# Verify that the IUT can send a PWS RESTART INDICATION to inform AMF that PWS information for some or all cells may be reloaded from the CBC if needed.
#NGAP_TestCases.TC_NGAP_GNB_WTP_04
# Verify that the IUT can send a PWS FAILURE INDICATION to inform AMF that ongoing PWS operation for one or more cells has failed.
#NGAP_TestCases.TC_NGAP_GNB_WTP_05

# Verify that the IUT can send a TRACE_FAILURE_INDICATION to inform AMF that Trace Start procedure has failed due to an interaction with handover procedure.
#NGAP_TestCases.TC_NGAP_GNB_TRP_01
# Verify that the IUT can send a TRACE_FAILURE_INDICATION to inform AMF that a Deactivate Trace procedure has failed due to an interaction with handover procedure.
#NGAP_TestCases.TC_NGAP_GNB_TRP_02
# Verify that the IUT can send a CELL_TRAFFIC_TRACE to send the allocated Trace Recording Session Reference and Trace Reference to AMF.
#NGAP_TestCases.TC_NGAP_GNB_TRP_03

[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
+14 −0
Original line number Diff line number Diff line
@@ -530,6 +530,20 @@ module NGAP_Steps {
            log("<<< f_NGAP_gnb_UE_Register");
        } // End of function f_NGAP_gnb_UE_Register

        /**
         * @desc
         */
        function f_NGAP_gnb_UE_ErrorIndication(
                                               in template (value) Cause p_cause := m_cause_misc(unknown_PLMN_or_SNPN)
                                               ) runs on gNBNGAPComponent {
            log(">>> f_NGAP_gnb_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

        /**
         * @desc
         */
+53 −284

File changed.

Preview size limit exceeded, changes collapsed.

Loading