pcu: Improve counter validation
Validate some new counters recently added in osmo-pcu.
Related: SYS#4878
Change-Id: I98e340053c91abdbf28c6e9641190bc78df35eff
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 2daf89b..2cc6fad 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -2383,6 +2383,22 @@
var template (present) CodingScheme exp_dl_cs_mcs := cs_gprs_any;
f_TC_mo_ping_pong_2phase_access(c_PCUIF_Flags_noMCS, ms_racap_gprs_def, exp_ul_cs_mcs, exp_dl_cs_mcs);
+
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.two_phase", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.contention_resolution_success", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.pkt.ul_assignment", mtype := "c", min := 1, max := 1 }
+ };
+ f_statsd_expect(expect);
+ }
}
testcase TC_mo_ping_pong_with_ul_racap_egprs_only() runs on RAW_PCU_Test_CT {
@@ -2390,6 +2406,21 @@
var template (present) CodingScheme exp_dl_cs_mcs := mcs_egprs_any;
f_TC_mo_ping_pong_2phase_access(c_PCUIF_Flags_default, ms_racap_egprs_def, exp_ul_cs_mcs, exp_dl_cs_mcs);
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.two_phase", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.contention_resolution_success", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.pkt.ul_assignment", mtype := "c", min := 1, max := 1 }
+ };
+ f_statsd_expect(expect);
+ }
}
testcase TC_force_two_phase_access() runs on RAW_PCU_Test_CT {
@@ -2400,6 +2431,22 @@
var template (present) CodingScheme exp_dl_cs_mcs := cs_gprs_any;
f_TC_mo_ping_pong_2phase_access(c_PCUIF_Flags_noMCS, ms_racap_gprs_def, exp_ul_cs_mcs, exp_dl_cs_mcs);
+
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.two_phase", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.contention_resolution_success", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.pkt.ul_assignment", mtype := "c", min := 1, max := 1 }
+ };
+ f_statsd_expect(expect);
+ }
}
/* Test scenario where SGSN wants to send some data against MS and it is
@@ -3054,6 +3101,7 @@
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
+ f_statsd_reset();
/* Establish BSSGP connection to the PCU */
f_bssgp_establish();
@@ -3094,6 +3142,22 @@
/* ACK the ACK */
f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), sched_fn);
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.one_phase", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.two_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.contention_resolution_success", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.pkt.ul_assignment", mtype := "c", min := 1, max := 1 }
+ };
+ f_statsd_expect(expect);
+ }
+
f_shutdown(__BFILE__, __LINE__, final := true);
}
@@ -3628,16 +3692,18 @@
var template GsmRrMessage imm_ass;
var template IaRestOctets rest;
var template EgprsUlAss ul_ass;
+ const integer num_req := 6;
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
+ f_statsd_reset();
var EGPRSPktChRequest req := {
/* NOTE: other fields are set in the loop */
signalling := { tag := '110011'B }
};
- for (var integer i := 0; i < 6; i := i + 1) {
+ for (var integer i := 0; i < num_req; i := i + 1) {
var BIT5 ext_ra := int2bit(f_rnd_int(32), 5);
req.signalling.random_bits := ext_ra;
@@ -3649,6 +3715,21 @@
f_TC_egprs_pkt_chan_req(req, imm_ass);
}
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.two_phase", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.contention_resolution_success", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 }
+ };
+ f_statsd_expect(expect);
+ }
+
f_shutdown(__BFILE__, __LINE__, final := true);
}
@@ -3656,16 +3737,18 @@
var template GsmRrMessage imm_ass;
var template IaRestOctets rest;
var template EgprsUlAss ul_ass;
+ const integer num_req := 6;
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
+ f_statsd_reset();
var EGPRSPktChRequest req := {
/* NOTE: other fields are set in the loop */
one_phase := { tag := '0'B }
};
- for (var integer i := 0; i < 6; i := i + 1) {
+ for (var integer i := 0; i < num_req; i := i + 1) {
var BIT5 ext_ra := int2bit(f_rnd_int(32), 5);
var BIT5 mslot_class := int2bit(f_rnd_int(32), 5);
var BIT2 priority := substr(ext_ra, 0, 2);
@@ -3683,6 +3766,21 @@
f_TC_egprs_pkt_chan_req(req, imm_ass);
}
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.one_phase", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.two_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.contention_resolution_success", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 }
+ };
+ f_statsd_expect(expect);
+ }
+
f_shutdown(__BFILE__, __LINE__, final := true);
}
@@ -3690,16 +3788,18 @@
var template GsmRrMessage imm_ass;
var template IaRestOctets rest;
var template EgprsUlAss ul_ass;
+ const integer num_req := 6;
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
+ f_statsd_reset();
var EGPRSPktChRequest req := {
/* NOTE: other fields are set in the loop */
two_phase := { tag := '110000'B }
};
- for (var integer i := 0; i < 6; i := i + 1) {
+ for (var integer i := 0; i < num_req; i := i + 1) {
var BIT5 ext_ra := int2bit(f_rnd_int(32), 5);
var BIT2 priority := substr(ext_ra, 0, 2);
var BIT3 rand := substr(ext_ra, 2, 3);
@@ -3715,6 +3815,21 @@
f_TC_egprs_pkt_chan_req(req, imm_ass);
}
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.two_phase", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.contention_resolution_success", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 }
+ };
+ f_statsd_expect(expect);
+ }
+
f_shutdown(__BFILE__, __LINE__, final := true);
}
@@ -3767,11 +3882,13 @@
testcase TC_egprs_pkt_chan_req_reject_content() runs on RAW_PCU_Test_CT {
var template IARRestOctets rest;
var BIT5 ext_ra;
+ const integer num_req := 6;
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
+ f_statsd_reset();
- for (var integer i := 0; i < 6; i := i + 1) {
+ for (var integer i := 0; i < num_req; i := i + 1) {
ext_ra := int2bit(f_rnd_int(32), 5); /* 5 LSB's of RA11 */
rest := tr_IARRestOctets({ *, tr_ExtRAOpt(ext_ra), * });
@@ -3779,6 +3896,20 @@
f_TC_egprs_pkt_chan_req_reject('111111'B & ext_ra, 1337 + i, rest);
}
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.unexpected", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_rej", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 }
+ };
+ f_statsd_expect(expect);
+ }
+
f_shutdown(__BFILE__, __LINE__, final := true);
}
@@ -3788,16 +3919,18 @@
var template IARRestOctets rest;
var BIT5 ext_ra;
var BIT11 ra11;
+ const integer num_req := 6;
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
+ f_statsd_reset();
var EGPRSPktChRequest req := {
/* NOTE: other fields are set in the loop */
emergency := { tag := '110111'B }
};
- for (var integer i := 0; i < 6; i := i + 1) {
+ for (var integer i := 0; i < num_req; i := i + 1) {
ext_ra := int2bit(f_rnd_int(32), 5); /* 5 LSB's of RA11 */
rest := tr_IARRestOctets({ *, tr_ExtRAOpt(ext_ra), * });
@@ -3808,6 +3941,20 @@
f_TC_egprs_pkt_chan_req_reject(ra11, 1337 + i, rest);
}
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.unexpected", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_rej", mtype := "c", min := num_req, max := num_req },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 }
+ };
+ f_statsd_expect(expect);
+ }
+
f_shutdown(__BFILE__, __LINE__, final := true);
}
@@ -3826,6 +3973,7 @@
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename(), info_ind);
+ f_statsd_reset();
var EGPRSPktChRequest req := {
one_phase := {
@@ -3849,6 +3997,23 @@
/* At this point, the IUT should run out of free USFs */
f_TC_egprs_pkt_chan_req_reject(ra11, 1870, rest, wi := info_ind.t3142);
+ if (mp_osmo_pcu_newer_than_0_9_0) {
+ var StatsDExpects expect := {
+ { name := "TTCN3.bts.0.rach.requests", mtype := "c", min := 8, max := 8 },
+ { name := "TTCN3.bts.0.rach.requests.11bit", mtype := "c", min := 8, max := 8 },
+ { name := "TTCN3.bts.0.rach.requests.one_phase", mtype := "c", min := 8, max := 8 },
+ { name := "TTCN3.bts.0.rach.requests.two_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.rach.requests.unexpected", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_UL", mtype := "c", min := 7, max := 7 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.one_phase", mtype := "c", min := 7, max := 7 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.two_phase", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_ul.contention_resolution_success", mtype := "c", min := 0, max := 0 },
+ { name := "TTCN3.bts.0.immediate.assignment_rej", mtype := "c", min := 1, max := 1 },
+ { name := "TTCN3.bts.0.immediate.assignment_DL", mtype := "c", min := 0, max := 0 }
+ };
+ f_statsd_expect(expect);
+ }
+
f_shutdown(__BFILE__, __LINE__, final := true);
}