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/.
osmith gerrit-no-reply at lists.osmocom.orgosmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25489 ) Change subject: pcu: add TC_stat_pdch_avail_occ_ms_not_known_* ...................................................................... pcu: add TC_stat_pdch_avail_occ_ms_not_known_* Add two new tests to verify occupied and available PDCH stats if MS is not known by the PCU. Related: SYS#4878 Change-Id: Id21d4056a21b73ff612956700d2056d838eb54f8 --- M pcu/PCU_Tests.ttcn 1 file changed, 95 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/25489/1 diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index d79e061..aa0795d 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -246,6 +246,14 @@ } } +private function f_pcuvty_set_alloc_algorithm_a() runs on RAW_PCU_Test_CT { + f_vty_config2(PCUVTY, {"pcu"}, "alloc-algorithm a"); +} + +private function f_pcuvty_set_alloc_algorithm_dynamic() runs on RAW_PCU_Test_CT { + f_vty_config2(PCUVTY, {"pcu"}, "alloc-algorithm dynamic"); +} + private function f_init_vty(charstring id, boolean egprs_only) runs on RAW_PCU_Test_CT { map(self:PCUVTY, system:PCUVTY); f_vty_set_prompts(PCUVTY); @@ -6047,6 +6055,91 @@ f_shutdown(__BFILE__, __LINE__, final := true); } +/* Test stats for available and occupied PDCHs, for MS which is not known by + * the PCU (e.g. because it was forgotten due to no interaction, and old DL + * data arrives from SGSN) */ +function f_tc_stat_pdch_avail_occ_ms_not_known(boolean egprs) runs on RAW_PCU_Test_CT { + var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default); + const BssgpBvci bvci := mp_gb_cfg.bvc[0].bvci; + + /* Initialize NS/BSSGP side */ + f_init_bssgp(); + + /* Only the 4 first TRX are enabled, each with 2 PDCHs. */ + f_PCUIF_PDCHMask_set(info_ind, '00000011'B, 0); + f_PCUIF_PDCHMask_set(info_ind, '00001100'B, 1); + f_PCUIF_PDCHMask_set(info_ind, '11000000'B, 2); + f_PCUIF_PDCHMask_set(info_ind, '00110000'B, 3); + f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (4 .. 7)); + + /* Allocate 1 GprsMS instance */ + f_init_gprs_ms(1); + + /* Initialize the PCU interface abstraction */ + f_init_raw(testcasename(), info_ind); + + /* Deterministic slot allocation */ + f_pcuvty_set_alloc_algorithm_a(); + + /* Reset stats */ + f_statsd_reset(); + + /* Establish BSSGP */ + f_bssgp_establish(); + + /* 8 PDCHs available, 0 occupied */ + var StatsDExpects expect := { + { name := "TTCN3.bts.0.pdch.available", mtype := "g", min := 8, max := 8 }, + { name := "TTCN3.bts.0.pdch.occupied", mtype := "g", min := 0, max := 0 }, + { name := "TTCN3.bts.0.pdch.occupied.gprs", mtype := "g", min := 0, max := 0 }, + { name := "TTCN3.bts.0.pdch.occupied.egprs", mtype := "g", min := 0, max := 0 } + }; + f_statsd_expect(expect); + + var GprsMS ms := g_ms[0]; /* We only use first MS in this test */ + f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli); + + /* SGSN sends some DL data, PCU will page on CCCH (PCH) */ + var octetstring data := f_rnd_octstring(1400); + if (egprs) { + BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data, bssgp_ms_racap_egprs_def)); + } else { + BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data)); + } + f_ms_exp_dl_tbf_ass_ccch(ms, PCU_IF_SAPI_PCH); + + /* Wait timer X2002 and DL block is available after CCCH IMM ASS */ + f_sleep(X2002); + + /* 1 PDCH occupied */ + if (egprs) { + expect := { + { name := "TTCN3.bts.0.pdch.available", mtype := "g", min := 8, max := 8 }, + { name := "TTCN3.bts.0.pdch.occupied", mtype := "g", min := 1, max := 1 }, + { name := "TTCN3.bts.0.pdch.occupied.gprs", mtype := "g", min := 0, max := 0 }, + { name := "TTCN3.bts.0.pdch.occupied.egprs", mtype := "g", min := 1, max := 1 } + }; + } else { + expect := { + { name := "TTCN3.bts.0.pdch.available", mtype := "g", min := 8, max := 8 }, + { name := "TTCN3.bts.0.pdch.occupied", mtype := "g", min := 1, max := 1 }, + { name := "TTCN3.bts.0.pdch.occupied.gprs", mtype := "g", min := 1, max := 1 }, + { name := "TTCN3.bts.0.pdch.occupied.egprs", mtype := "g", min := 0, max := 0 } + }; + } + f_statsd_expect(expect); + + /* Clean up */ + f_pcuvty_set_alloc_algorithm_dynamic(); + f_shutdown(__BFILE__, __LINE__, final := true); +} +testcase TC_stat_pdch_avail_occ_ms_not_known_gprs() runs on RAW_PCU_Test_CT { + f_tc_stat_pdch_avail_occ_ms_not_known(false); +} +testcase TC_stat_pdch_avail_occ_ms_not_known_egprs() runs on RAW_PCU_Test_CT { + f_tc_stat_pdch_avail_occ_ms_not_known(true); +} + control { execute( TC_pcuif_suspend() ); execute( TC_pcuif_suspend_active_tbf() ); @@ -6155,6 +6248,8 @@ execute (TC_pdch_energy_saving() ); 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() ); } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25489 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: Id21d4056a21b73ff612956700d2056d838eb54f8 Gerrit-Change-Number: 25489 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210916/03c40234/attachment.htm>