pcu: Check stats for pcu channel allocation, bytes transferred

Change-Id: I90964b32fa11ed2582afc5fb56bd302b06606f86
Related: SYS#4877
changes/26/20226/4
Daniel Willmann 2 years ago committed by daniel
parent 9a7c512bbd
commit 535aea686e
  1. 10
      pcu/PCU_Tests.default
  2. 43
      pcu/PCU_Tests.ttcn
  3. 1
      pcu/gen_links.sh
  4. 10
      pcu/osmo-pcu.cfg
  5. 2
      pcu/regen_makefile.sh

@ -23,6 +23,7 @@ SGSN_Components.mp_gb_cfg := {
}
Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoPCU";
PCUIF_Types.mp_pcuif_version := 10;
StatsD_Checker.mp_enable_stats := true;
[TESTPORT_PARAMETERS]
*.PCU.socket_type := "SEQPACKET"
@ -35,6 +36,15 @@ PCUIF_Types.mp_pcuif_version := 10;
*.PCUVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
*.PCUVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
*.PCUVTY.PROMPT1 := "OsmoPCU> "
*.STATSVTY.CTRL_MODE := "client"
*.STATSVTY.CTRL_HOSTNAME := "127.0.0.1"
*.STATSVTY.CTRL_PORTNUM := "4240"
*.STATSVTY.CTRL_LOGIN_SKIPPED := "yes"
*.STATSVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
*.STATSVTY.CTRL_READMODE := "buffered"
*.STATSVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
*.STATSVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
*.STATSVTY.PROMPT1 := "OsmoPCU> "
[MAIN_CONTROLLER]

@ -51,10 +51,18 @@ import from Native_Functions all;
import from SGSN_Components all;
import from GPRS_Components all;
import from StatsD_Types all;
import from StatsD_CodecPort all;
import from StatsD_CodecPort_CtrlFunct all;
import from StatsD_Checker all;
modulepar {
charstring mp_pcu_sock_path := PCU_SOCK_DEFAULT;
float X2002 := 0.2; /* Timer -2002, IMM ASSIGN confirm delay */
charstring mp_pcu_statsd_ip := "127.0.0.1";
integer mp_pcu_statsd_port := 8125;
}
@ -102,10 +110,13 @@ type record lqual_range {
uint8_t high
}
type component RAW_PCU_Test_CT extends bssgp_CT, MS_BTS_IFACE_CT {
type component RAW_PCU_Test_CT extends bssgp_CT, MS_BTS_IFACE_CT, StatsD_ConnHdlr {
/* PCU interface abstraction component */
var RAW_PCUIF_CT vc_PCUIF;
/* StatsD */
var StatsD_Checker_CT vc_STATSD;
/* Connection to the PCUIF component */
port RAW_PCU_MSG_PT PCUIF;
/* VTY connection to the PCU */
@ -215,6 +226,11 @@ runs on RAW_PCU_Test_CT {
f_init_vty(id);
f_init_statsd(id, vc_STATSD, mp_pcu_statsd_ip, mp_pcu_statsd_port);
/* This is normally done in the ConnHdlr component, but here
* the Test_CT doubles as ConnHdlr */
connect(self:STATSD_PROC, vc_STATSD:STATSD_PROC);
vc_PCUIF.start(f_PCUIF_CT_handler(mp_pcu_sock_path));
vc_BTS.start(f_BTS_CT_handler(0, valueof(info_ind)));
@ -1437,6 +1453,8 @@ testcase TC_dl_flow_more_blocks() runs on RAW_PCU_Test_CT {
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
f_statsd_reset();
/* Establish BSSGP connection to the PCU */
f_bssgp_establish();
f_bssgp_client_llgmm_assign('FFFFFFFF'O, ms.tlli);
@ -1486,6 +1504,17 @@ testcase TC_dl_flow_more_blocks() runs on RAW_PCU_Test_CT {
/* Make sure that the next block (after the Ack) is dummy */
f_rx_rlcmac_dl_block_exp_dummy(dl_block);
var StatsDExpects expect := {
{ name := "TTCN3.bts.0.rach.requests", mtype := "c", min := 0, max := 0},
{ name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 1, max := 1},
{ name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := 0, max := 0},
{ name := "TTCN3.bts.0.tbf.dl.alloc", mtype := "c", min := 1, max := 1},
{ name := "TTCN3.bts.0.tbf.ul.alloc", mtype := "c", min := 0, max := 0},
{ name := "TTCN3.bts.0.rlc.dl_payload_bytes", mtype := "c", min := 112, max := 112},
{ name := "TTCN3.bts.0.rlc.ul_payload_bytes", mtype := "c", min := 0, max := 0}
};
f_statsd_expect(expect);
f_shutdown(__BFILE__, __LINE__, final := true);
}
@ -1849,6 +1878,8 @@ testcase TC_bssgp_dl_unitdata_with_valid_imsi() runs on RAW_PCU_Test_CT {
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
f_statsd_reset();
/* Establish BSSGP connection to the PCU */
f_bssgp_establish();
f_bssgp_client_llgmm_assign('FFFFFFFF'O, ms.tlli);
@ -1878,6 +1909,16 @@ testcase TC_bssgp_dl_unitdata_with_valid_imsi() runs on RAW_PCU_Test_CT {
f_ms_tx_ul_block(ms, ts_RLCMAC_DL_ACK_NACK(ms.dl_tbf.tfi, ms.dl_tbf.acknack_desc),
f_dl_block_ack_fn(dl_block, dl_fn));
var StatsDExpects expect := {
{ name := "TTCN3.bts.0.rach.requests", mtype := "c", min := 1, max := 1},
{ name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 1, max := 1},
{ name := "TTCN3.bts.0.tbf.dl.alloc", mtype := "c", min := 1, max := 1},
{ name := "TTCN3.bts.0.tbf.ul.alloc", mtype := "c", min := 1, max := 1},
{ name := "TTCN3.bts.0.rlc.dl_payload_bytes", mtype := "c", min := 28, max := 28},
{ name := "TTCN3.bts.0.rlc.ul_payload_bytes", mtype := "c", min := 16, max := 16}
};
f_statsd_expect(expect);
f_shutdown(__BFILE__, __LINE__, final := true);
}

@ -50,6 +50,7 @@ gen_links $DIR $FILES
DIR=../library
FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc "
FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcn "
FILES+="NS_Provider_IPL4.ttcn NS_Emulation.ttcn NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc "
FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn "
FILES+="LLC_Templates.ttcn L3_Templates.ttcn L3_Common.ttcn "

@ -9,6 +9,16 @@ log stderr
logging print file basename last
logging print extended-timestamp 1
logging level set-all debug
!
stats interval 0
stats reporter statsd
prefix TTCN3
level subscriber
remote-ip 127.0.0.1
remote-port 8125
flush-period 1
mtu 1024
enable
line vty
no login

@ -1,6 +1,6 @@
#!/bin/sh
FILES="*.ttcn *.ttcnpp BSSGP_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc UD_PT.cc RLCMAC_EncDec.cc LLC_EncDec.cc TELNETasp_PT.cc Native_FunctionDefs.cc"
FILES="*.ttcn *.ttcnpp BSSGP_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc UD_PT.cc RLCMAC_EncDec.cc LLC_EncDec.cc TELNETasp_PT.cc Native_FunctionDefs.cc StatsD_CodecPort_CtrlFunctdef.cc"
export CPPFLAGS_TTCN3="-DBSSGP_EM_L3"

Loading…
Cancel
Save