BSC_Tests/hopping: fix: consider ARFCN of the transceiver itself

The Mobile Allocation IE generated by the IUT includes not only
the list of hopping ARFCNs, but also ARFCN of the transceiver
itself.  This is the correct behaviour, and that's why we see
sporadic test case failures like this one:

  Mobile Allocation IE does not match (tn := 1):
    { len := 3, ma := '001010101011111100000000'B }
  vs expected
    { len := 2, ma := '0010101010111111'B }

The last '0'B bits may look like redundant padding, but actually
only 7 of them are.  The MSB '0'B bit in the last (third) octet
corresponds to pre-configured ARFCN 871.

Since f_TC_fh_params_gen() generates all ARFCNs in GSM-900:

  - in f_TC_fh_params_gen(), pick an ARFCN value from GSM-900;
  - in f_TC_fh_params_set(), change ARFCN of a given transceiver;
  - in f_TC_fh_params_gen_tr_ma(), consider that ARFCN;
  - in f_TC_fh_params_unset(), bring it back to 871.

Change-Id: Id11be94087c18d8159af4b7988826023832f9944
Related: SYS#4868, OS#4545
This commit is contained in:
Vadim Yanitskiy 2020-09-13 14:33:03 +07:00 committed by fixeria
parent 1b99661d25
commit e7c8c6e00e
1 changed files with 13 additions and 2 deletions

View File

@ -6864,6 +6864,9 @@ private function f_TC_fh_params_gen(template integer tr_tn := (1, 3, 5))
runs on test_CT return FHParamsTrx {
var FHParamsTrx fhp;
/* TODO: generate a random ARFCN, including ARFCN 0 */
fhp.arfcn := 1;
for (var integer tn := 0; tn < 8; tn := tn + 1) {
if (not match(tn, tr_tn)) {
fhp.ts[tn].enabled := false;
@ -6901,7 +6904,7 @@ private function f_TC_fh_params_match_chan_desc(in FHParamsTrx fhp, in ChannelDe
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);
tr_cd := tr_ChanDescH0(cd.chan_nr, fhp.arfcn);
}
if (not match(cd, tr_cd)) {
@ -6945,6 +6948,9 @@ return template MobileAllocationLV {
}
}
/* Take ARFCN of the TRX itself into account */
full_mask[fhp.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) {
slot_mask[fhp.ts[tn].ma[i]] := '1'B;
@ -6978,6 +6984,8 @@ runs on test_CT {
/* 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));
for (var integer tn := 0; tn < lengthof(fhp.ts); tn := tn + 1) {
f_vty_transceive(BSCVTY, "timeslot " & int2str(tn));
@ -7006,11 +7014,14 @@ runs on test_CT {
/* Disable frequency hopping on all timeslots */
private function f_TC_fh_params_unset(in FHParamsTrx fhp,
uint8_t bts_nr := 0,
uint8_t trx_nr := 0)
uint8_t trx_nr := 0,
GsmArfcn arfcn := 871)
runs on test_CT {
/* 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));
for (var integer tn := 0; tn < lengthof(fhp.ts); tn := tn + 1) {
f_vty_transceive(BSCVTY, "timeslot " & int2str(tn));