Change in osmo-ttcn3-hacks[master]: pcu: Introduce test TC_ratectr_all_available_allocated

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Nov 15 11:56:35 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26249 )


Change subject: pcu: Introduce test TC_ratectr_all_available_allocated
......................................................................

pcu: Introduce test TC_ratectr_all_available_allocated

Related: SYS#4878
Change-Id: Ide1254954b5cf02a19e190b19d06c7aaeedb6ede
---
M pcu/PCU_Tests.ttcn
1 file changed, 49 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/49/26249/1

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 5bc2959..a191cc5 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -6504,6 +6504,54 @@
 	f_tc_stat_pdch_avail_occ_ms_not_known(true);
 }
 
+/* Make sure that bts.0.pdch.all_allocated is set when we allocate all resources */
+testcase TC_ratectr_all_available_allocated() runs on RAW_PCU_Test_CT {
+	var PCUIF_info_ind info_ind;
+	var template IARRestOctets rest;
+	var BIT11 ra11;
+
+	info_ind := valueof(ts_PCUIF_INFO_default);
+	info_ind.t3142 := 3;
+
+	/* Only the first TRX is enabled. */
+	f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
+	f_PCUIF_PDCHMask_set(info_ind, '00000001'B, 0);
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename(), info_ind);
+	f_statsd_reset();
+
+	var EGPRSPktChRequest req := {
+		one_phase := {
+			tag := '0'B,
+			multislot_class := '10101'B,
+			priority := '01'B,
+			random_bits := '101'B
+		}
+	};
+
+	/* We send 7 requests, the IUT gives us all available USFs (0..6) */
+	for (var integer i := 0; i < 7; i := i + 1) {
+		req.one_phase.random_bits := int2bit(f_rnd_int(8), 3);
+		f_TC_egprs_pkt_chan_req(req, tr_IMM_TBF_ASS);
+	}
+
+	ra11 := enc_EGPRSPktChRequest2bits(req);
+	rest := tr_IARRestOctets({ *, tr_ExtRAOpt(substr(ra11, 6, 5)), * });
+
+	/* 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);
+
+	/* bts.0.pdch.all_allocated is updated once per second, wait some time to make sure it was updated. */
+	f_sleep(2.0);
+	var StatsDExpects expect := {
+		{ name := "TTCN3.bts.0.pdch.all_allocated", mtype := "c", min := 1, max := 1 }
+	};
+	f_statsd_expect(expect);
+
+	f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
 control {
 	execute( TC_pcuif_suspend() );
 	execute( TC_pcuif_suspend_active_tbf() );
@@ -6618,6 +6666,7 @@
 	execute( TC_stat_pdch_avail_occ() );
 	execute( TC_stat_pdch_avail_occ_ms_not_known_gprs() );
 	execute( TC_stat_pdch_avail_occ_ms_not_known_egprs() );
+	execute( TC_ratectr_all_available_allocated() );
 }
 
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26249
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ide1254954b5cf02a19e190b19d06c7aaeedb6ede
Gerrit-Change-Number: 26249
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211115/4cd122fb/attachment.htm>


More information about the gerrit-log mailing list