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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25828 ) Change subject: BSC_Tests: set band in f_TC_fh_params_set ...................................................................... BSC_Tests: set band in f_TC_fh_params_set The function f_TC_fh_params_set sets frequency hopping parameters. The ARFCN is also part of those parameters. However, this function does not set the respective band for the ARFCN that it configurs. This results in an invalid setting at the BSC that might cause unexpected behavior. Lets make sure we configure the band parameter correctly before setting the ARFCN Change-Id: I447e4145c68c62b11b818e28f0081c19e9107647 Related: SYS#5369 --- M bsc/BSC_Tests.ttcn 1 file changed, 39 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index ee4dac2..ad8f666 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -8439,7 +8439,7 @@ /* Hopping parameters per a transceiver */ private type record FHParamsTrx { - GsmArfcn arfcn, + GsmBandArfcn arfcn, FHParamsTs ts[8] }; @@ -8448,8 +8448,10 @@ runs on test_CT return FHParamsTrx { var FHParamsTrx fhp; - /* Generate a random ARFCN, including ARFCN 0 */ - fhp.arfcn := f_rnd_int(3); + /* Generate a random ARFCN in the range of 0 - 3. This ARFCN will + * fall in the GSM900 band. */ + fhp.arfcn.arfcn := f_rnd_int(3); + fhp.arfcn.pcs := false; for (var integer tn := 0; tn < 8; tn := tn + 1) { if (not match(tn, tr_tn)) { @@ -8488,7 +8490,7 @@ tr_maio_hsn := tr_HsnMaio(fhp.ts[tn].hsn, fhp.ts[tn].maio); tr_cd := tr_ChanDescH1(cd.chan_nr, tr_maio_hsn); } else { - tr_cd := tr_ChanDescH0(cd.chan_nr, fhp.arfcn); + tr_cd := tr_ChanDescH0(cd.chan_nr, fhp.arfcn.arfcn); } if (not match(cd, tr_cd)) { @@ -8533,7 +8535,7 @@ } /* Take ARFCN of the TRX itself into account */ - full_mask[fhp.arfcn] := '1'B; + full_mask[fhp.arfcn.arfcn] := '1'B; /* Compose a bit-mask for the given timeslot number */ for (var integer i := 0; i < lengthof(fhp.ts[tn].ma); i := i + 1) { @@ -8570,15 +8572,41 @@ return { len := ma_mask_len, ma := ma_mask }; } +/* Configure the appropriate band for a given arfcn, exc */ +private function f_TC_set_band_by_arfcn(integer bts_nr, GsmBandArfcn arfcn) runs on test_CT +{ + var charstring band; + var GsmBandArfcn arfcn_ := valueof(ts_GsmBandArfcn(arfcn.arfcn, arfcn.pcs, false)); + + select (arfcn_) { + case (tr_GsmBandArfcn((259..293), false, ?)) { band := "GSM450"; } + case (tr_GsmBandArfcn((306..340), false, ?)) { band := "GSM480"; } + case (tr_GsmBandArfcn((438..511), false, ?)) { band := "GSM750"; } + case (tr_GsmBandArfcn((128..251), false, ?)) { band := "GSM850"; } + case (tr_GsmBandArfcn((0..124), false, ?)) { band := "GSM900"; } + case (tr_GsmBandArfcn((955..1023), false, ?)) { band := "GSM900"; } + case (tr_GsmBandArfcn((512..885), false, ?)) { band := "DCS1800"; } + case (tr_GsmBandArfcn((512..810), true, ?)) { band := "PCS1900"; } + case else { return; } + } + + f_vty_enter_cfg_bts(BSCVTY, bts_nr); + f_vty_transceive(BSCVTY, "band " & band); + f_vty_transceive(BSCVTY, "end"); +} + /* Configure the hopping parameters in accordance with the given record */ private function f_TC_fh_params_set(in FHParamsTrx fhp, uint8_t bts_nr := 0, uint8_t trx_nr := 0) runs on test_CT { + + f_TC_set_band_by_arfcn(bts_nr, fhp.arfcn); + /* Enter the configuration node for the given BTS/TRX numbers */ f_vty_enter_cfg_trx(BSCVTY, bts_nr, trx_nr); - f_vty_transceive(BSCVTY, "arfcn " & int2str(fhp.arfcn)); + f_vty_transceive(BSCVTY, "arfcn " & int2str(fhp.arfcn.arfcn)); for (var integer tn := 0; tn < lengthof(fhp.ts); tn := tn + 1) { f_vty_transceive(BSCVTY, "timeslot " & int2str(tn)); @@ -8609,12 +8637,15 @@ private function f_TC_fh_params_unset(in FHParamsTrx fhp, uint8_t bts_nr := 0, uint8_t trx_nr := 0, - GsmArfcn arfcn := 871) + GsmBandArfcn arfcn := {pcs := false, arfcn := 871}) runs on test_CT { + + f_TC_set_band_by_arfcn(bts_nr, arfcn); + /* Enter the configuration node for the given BTS/TRX numbers */ f_vty_enter_cfg_trx(BSCVTY, bts_nr, trx_nr); - f_vty_transceive(BSCVTY, "arfcn " & int2str(arfcn)); + f_vty_transceive(BSCVTY, "arfcn " & int2str(arfcn.arfcn)); for (var integer tn := 0; tn < lengthof(fhp.ts); tn := tn + 1) { f_vty_transceive(BSCVTY, "timeslot " & int2str(tn)); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25828 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: I447e4145c68c62b11b818e28f0081c19e9107647 Gerrit-Change-Number: 25828 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211101/2e0618f5/attachment.htm>