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 uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22369 )
Change subject: PCU_Tests: add testcase TC_rim_ran_info_req_single_rep and _no_si
......................................................................
PCU_Tests: add testcase TC_rim_ran_info_req_single_rep and _no_si
Perform a full RAN information request (single report) against the PCU
and check the results. Also test what happens when the request is issued
at a time where osmo-bts has no system information available.
Depends: osmo-pcu Id72118120c14984d2fb1b918b41fac4868150d41
Depends: osmo-bts I1726c9e29cc59c499dfabbdaf63c0f1a09984764
Related: SYS#5103
Change-Id: I9054ab0e969c0fbfdc671c92d44cc61360959adc
---
M library/Osmocom_Gb_Types.ttcn
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests.ttcn
M pcu/PCU_Tests_SNS.cfg
M pcu/PCU_Tests_SNSv6.cfg
5 files changed, 288 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/69/22369/1
diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index 9065097..5d753b2 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -2493,7 +2493,14 @@
},
rIMApplicationIdentity := app_id
}
-
+ template RIM_Application_Identity tr_RIM_Application_Identity(template OCT1 app_id := ?) := {
+ iEI := '4B'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 1
+ },
+ rIMApplicationIdentity := app_id
+ }
/* 3GPP TS 48.018 11.3.62 */
template (value) RIM_Sequence_Number ts_RIM_Sequence_Number(integer seq) := {
@@ -2504,6 +2511,20 @@
},
rIMSequenceNumber := int2oct(seq, 4)
}
+ function tr_RIM_Sequence_Number(template integer seq := ?) return template RIM_Sequence_Number {
+ var template RIM_Sequence_Number ret;
+ ret.iEI := '4C'O;
+ ret.ext := '1'B;
+ ret.lengthIndicator := { length1 := 4 };
+ if (istemplatekind(seq, "*")) {
+ ret.rIMSequenceNumber := *;
+ } else if (istemplatekind(seq, "?")) {
+ ret.rIMSequenceNumber := ?;
+ } else {
+ ret.rIMSequenceNumber := int2oct(valueof(seq), 4);
+ }
+ return ret;
+ }
/* 3GPP TS 48.018 11.3.62a.1 */
template (value) RAN_Information_Request_RIM_Container
@@ -2567,10 +2588,34 @@
applContainer_or_ApplErrContainer := app_cont_or_app_err,
sON_Transfer_Application_Identity := son_app_id
}
+ template RAN_Information_RIM_Container
+ tr_RAN_Information_RIM_Container(template RIM_Application_Identity app_id := ?,
+ template RIM_Sequence_Number seq := ?,
+ template RIM_PDU_Indications ind := ?,
+ template RIM_Protocol_Version_Number ver := omit,
+ template ApplContainer_or_ApplErrContainer app_cont_or_app_err := omit,
+ template SON_Transfer_Application_Identity_TLV son_app_id := omit) := {
+
+ iEI := '58'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := ?
+ },
+ rIM_Application_Identity := app_id,
+ rIM_Sequence_Number := seq,
+ rIM_PDU_Indications := ind,
+ rIM_Protocol_Version_Number := ver,
+ applContainer_or_ApplErrContainer := app_cont_or_app_err,
+ sON_Transfer_Application_Identity := son_app_id
+ }
template (value) ApplContainer_or_ApplErrContainer
tsu_ApplContainer_or_ApplErrContainer_NACC(template (value) ApplContainer_or_ApplErrContainer_NACC cont) := {
nacc := cont
}
+ template ApplContainer_or_ApplErrContainer
+ tru_ApplContainer_or_ApplErrContainer_NACC(template ApplContainer_or_ApplErrContainer_NACC cont := ?) := {
+ nacc := cont
+ }
template (value) ApplContainer_or_ApplErrContainer
tsu_ApplContainer_or_ApplErrContainer_SI3(template (value) ApplContainer_or_ApplErrContainer_SI3 cont) := {
si3 := cont
@@ -2583,6 +2628,10 @@
tsu_ApplContainer_NACC(template (value) BssgpCellId cid, boolean psi_type, integer si_psi_num, octetstring si_psi) := {
application_Container := ts_RAN_Information_Application_Container_NACC(cid, psi_type, si_psi_num, si_psi)
}
+ template ApplContainer_or_ApplErrContainer_NACC
+ tru_ApplContainer_NACC(template BssgpCellId cid := ?, template boolean psi_type := ?, template integer si_psi_num := ?, template octetstring si_psi := ?) := {
+ application_Container := tr_RAN_Information_Application_Container_NACC(cid, psi_type, si_psi_num, si_psi)
+ }
template (value) ApplContainer_or_ApplErrContainer_NACC
tsu_ApplErrContainer_NACC(template (value) BssgpCellId cid,
integer cause,
@@ -2744,6 +2793,31 @@
number_of_SI_PSI := int2bit(si_psi_num, 7),
sI_PSI := si_psi
}
+ function tr_RAN_Information_Application_Container_NACC(template BssgpCellId cid := ?, template boolean psi_type := ?,
+ template integer si_psi_num := ?, template octetstring si_psi := ?)
+ return template RAN_Information_Application_Container_NACC {
+ var template RAN_Information_Application_Container_NACC ret;
+ ret.iEI := '4E'O;
+ ret.ext := '1'B;
+ ret.lengthIndicator := { length1 := ? };
+ ret.reporting_Cell_Identifier := t_Cell_Identifier_V(cid);
+ if (istemplatekind(psi_type, "*")) {
+ ret.typeBit := *;
+ } else if (istemplatekind(psi_type, "?")) {
+ ret.typeBit := ?;
+ } else {
+ ret.typeBit := bool2bit(valueof(psi_type));
+ }
+ if (istemplatekind(si_psi_num, "*")) {
+ ret.number_of_SI_PSI := *;
+ } else if (istemplatekind(si_psi_num, "?")) {
+ ret.number_of_SI_PSI := ?;
+ } else {
+ ret.number_of_SI_PSI := int2bit(valueof(si_psi_num), 7);
+ }
+ ret.sI_PSI := si_psi;
+ return ret;
+ }
/* 3GPP TS 48.018 11.3.63.2.2 */
template (value) RAN_Information_Application_Container_SI3
@@ -2981,6 +3055,28 @@
pDU_Type_Extension := type_ext,
reserved := '0000'B
}
+ function tr_RIM_PDU_Indications(template boolean ack := ?, template BIT3 type_ext := ?) return template RIM_PDU_Indications {
+ var template RIM_PDU_Indications ret;
+ ret.iEI := '4F'O;
+ ret.ext := '1'B;
+ ret.lengthIndicator := { length1 := 1 };
+ if (istemplatekind(ack, "*")) {
+ ret.ack := *;
+ } else if (istemplatekind(ack, "?")) {
+ ret.ack := ?;
+ } else {
+ ret.ack := bool2bit(valueof(ack));
+ }
+ if (istemplatekind(type_ext, "*")) {
+ ret.pDU_Type_Extension := *;
+ } else if (istemplatekind(type_ext, "?")) {
+ ret.pDU_Type_Extension := ?;
+ } else {
+ ret.pDU_Type_Extension := valueof(type_ext);
+ }
+ ret.reserved := '0000'B;
+ return ret;
+ }
/* 3GPP TS 48.018 11.3.67 */
template (value) RIM_Protocol_Version_Number ts_RIM_Protocol_Version_Number(integer ver) := {
@@ -2991,6 +3087,20 @@
},
rIMProtocolVersionNumber := int2oct(ver, 1)
}
+ function tr_RIM_Protocol_Version_Number(template integer ver := ?) return template RIM_Protocol_Version_Number {
+ var template RIM_Protocol_Version_Number ret;
+ ret.iEI := '55'O;
+ ret.ext := '1'B;
+ ret.lengthIndicator := { length1 := 1 };
+ if (istemplatekind(ver, "*")) {
+ ret.rIMProtocolVersionNumber := *;
+ } else if (istemplatekind(ver, "?")) {
+ ret.rIMProtocolVersionNumber := ?;
+ } else {
+ ret.rIMProtocolVersionNumber := int2oct(valueof(ver), 1);
+ }
+ return ret;
+ }
/* 3GPP TS 48.018 11.3.70 */
const HEX1 RIM_ADDR_GERAN_CELL_ID := '0'H;
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index d6e0867..6c1ec32 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -215,12 +215,19 @@
record length(2) of uint16_t nsvci,
record length(2) of uint16_t local_port,
record length(2) of uint16_t remote_port,
- PCUIF_RemoteAddr remote_addr
+ PCUIF_RemoteAddr remote_addr,
+
+ record length(23) of uint8_t si1,
+ uint8_t si1_is_set,
+ record length(23) of uint8_t si3,
+ uint8_t si3_is_set,
+ record length(23) of uint8_t si13,
+ uint8_t si13_is_set
} with {
- /* NOTE: TITAN is not smart enough to handle 'version < 10' and 'version > 9',
+ /* NOTE: TITAN is not smart enough to handle 'version < 11' and 'version > 10',
* so we cannot support more than two versions at the same time here. Sigh. */
- variant (trx) "CROSSTAG(v09, version = 9; v10, version = 10)"
- variant (remote_addr) "CROSSTAG(v09, version = 9; v10, version = 10)"
+ variant (trx) "CROSSTAG(v09, version = 10; v10, version = 11)"
+ variant (remote_addr) "CROSSTAG(v09, version = 10; v10, version = 11)"
};
type union PCUIF_RemoteAddr {
@@ -908,7 +915,13 @@
nsvci := ?,
local_port := ?,
remote_port := ?,
- remote_addr := ?
+ remote_addr := ?,
+ si1 := ?,
+ si1_is_set := ?,
+ si3 := ?,
+ si3_is_set := ?,
+ si13 := ?,
+ si13_is_set := ?
}
}
}
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 13b33b2..325197c 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -102,7 +102,13 @@
local_port := { mp_nsconfig.nsvc[0].provider.ip.remote_udp_port, 0 },
remote_port := { mp_nsconfig.nsvc[0].provider.ip.local_udp_port, 0 },
remote_addr := f_PCUIF_ver_INFO_RemoteAddr(
- f_PCUIF_AF2addr_type(mp_nsconfig.nsvc[0].provider.ip.address_family), mp_nsconfig.nsvc[0].provider.ip.local_ip)
+ f_PCUIF_AF2addr_type(mp_nsconfig.nsvc[0].provider.ip.address_family), mp_nsconfig.nsvc[0].provider.ip.local_ip),
+ si1 := { 85, 6, 25, 143, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 0, 43 },
+ si1_is_set := 1,
+ si3 := { 73, 6, 27, 117, 48, 0, 241, 16, 35, 110, 201, 3, 60, 39, 71, 64, 121, 0, 0, 60, 11, 43, 43 },
+ si3_is_set := 1,
+ si13 := { 1, 6, 0, 144, 0, 24, 90, 111, 201, 224, 132, 16, 171, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43 },
+ si13_is_set := 1
}
type record lqual_range {
@@ -3566,6 +3572,153 @@
f_shutdown(__BFILE__, __LINE__, final := true);
}
+/* Send a RIM RAN info request to the PCU and verify the response, we expect
+ * getting the system information back which we have transfered to the PCU via
+ * PCUIF on startup. */
+testcase TC_rim_ran_info_req_single_rep() runs on RAW_PCU_Test_CT {
+ const BssgpBvci bvci := mp_gb_cfg.bvc[0].bvci;
+ var PCUIF_info_ind info_ind;
+ timer T := 2.0;
+
+ /* Initialize NS/BSSGP side */
+ f_init_bssgp();
+
+ /* Initialize the PCU interface abstraction */
+ f_init_raw(testcasename());
+
+ /* Establish BSSGP connection to the PCU */
+ f_bssgp_establish();
+
+ var template RIM_Routing_Address dst_addr;
+ var template RIM_Routing_Address src_addr;
+ var template RAN_Information_Request_RIM_Container req_cont;
+ var template PDU_BSSGP bssgp_rim_pdu;
+ var template PDU_BSSGP bssgp_rim_pdu_expect;
+ var template RAN_Information_RIM_Container rim_cont_expect;
+
+ var BssgpCellId src_cid := {ra_id := { lai := { mcc_mnc := '262F42'H, lac := 12345}, rac := 0 }, cell_id := 20962 };
+ src_addr := t_RIM_Routing_Address_cid(src_cid);
+ dst_addr := t_RIM_Routing_Address_cid(mp_gb_cfg.bvc[0].cell_id);
+
+ var octetstring si1_expect := '198fb100000000000000000000000000007900002b'O;
+ var octetstring si3_expect := '1b753000f110236ec9033c2747407900003c0b2b2b'O;
+ var octetstring si13_expect := '009000185a6fc9e08410ab2b2b2b2b2b2b2b2b2b2b'O;
+ var octetstring si_expect := si1_expect & si3_expect & si13_expect;
+
+ req_cont := ts_RAN_Information_Request_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ ts_RIM_Sequence_Number(1),
+ ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
+ ts_RIM_Protocol_Version_Number(1),
+ tsu_RAN_Information_Request_Application_Container_NACC(mp_gb_cfg.bvc[0].cell_id),
+ omit);
+ bssgp_rim_pdu := ts_RAN_INFORMATION_REQUEST(ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr),
+ ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+ req_cont);
+
+ rim_cont_expect := tr_RAN_Information_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+ tr_RIM_Sequence_Number(1),
+ tr_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
+ tr_RIM_Protocol_Version_Number(1),
+ tru_ApplContainer_or_ApplErrContainer_NACC(tru_ApplContainer_NACC(mp_gb_cfg.bvc[0].cell_id, false, 3, si_expect)),
+ omit);
+
+ bssgp_rim_pdu_expect := tr_PDU_BSSGP_RAN_INFORMATION(tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+ tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr),
+ rim_cont_expect);
+ RIM.send(bssgp_rim_pdu);
+ T.start;
+ alt {
+ [] RIM.receive(bssgp_rim_pdu_expect) { }
+ [] RIM.receive {
+ setverdict(fail, "Unexpected BSSGP RIM PDU received");
+ }
+ [] T.timeout {
+ setverdict(fail, "No BSSGP RIM PDU received");
+ mtc.stop;
+ }
+ }
+
+ /* FIXME: work around a race condition between PCUIF and BSSGP */
+ f_sleep(0.2); /* i.e. give the IUT some time to process everything */
+
+ f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
+/* Same as above, but in this case we simulate the rare case in which the PCU
+ * has no system information available. We expect getting a response back but
+ * with no system information inside. */
+testcase TC_rim_ran_info_req_single_rep_no_si() runs on RAW_PCU_Test_CT {
+ var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
+ var PCUIF_Message pcu_msg;
+ timer T := 2.0;
+
+ /* Initialize NS/BSSGP side */
+ f_init_bssgp();
+
+ /* Initialize the PCU interface abstraction */
+ f_init_raw(testcasename());
+
+ /* Establish BSSGP connection to the PCU */
+ f_bssgp_establish();
+
+ /* Invalidate the system information inside the PCU */
+ info_ind.si1_is_set := 0;
+ info_ind.si3_is_set := 0;
+ info_ind.si13_is_set := 0;
+ BTS.send(ts_PCUIF_INFO_IND(0, info_ind));
+ f_pcuif_rx_data_req(pcu_msg);
+
+ var template RIM_Routing_Address dst_addr;
+ var template RIM_Routing_Address src_addr;
+ var template RAN_Information_Request_RIM_Container req_cont;
+ var template PDU_BSSGP bssgp_rim_pdu;
+ var template PDU_BSSGP bssgp_rim_pdu_expect;
+ var template RAN_Information_RIM_Container rim_cont_expect;
+
+ var BssgpCellId src_cid := {ra_id := { lai := { mcc_mnc := '262F42'H, lac := 12345}, rac := 0 }, cell_id := 20962 };
+ src_addr := t_RIM_Routing_Address_cid(src_cid);
+ dst_addr := t_RIM_Routing_Address_cid(mp_gb_cfg.bvc[0].cell_id);
+
+ req_cont := ts_RAN_Information_Request_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ ts_RIM_Sequence_Number(1),
+ ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
+ ts_RIM_Protocol_Version_Number(1),
+ tsu_RAN_Information_Request_Application_Container_NACC(mp_gb_cfg.bvc[0].cell_id),
+ omit);
+ bssgp_rim_pdu := ts_RAN_INFORMATION_REQUEST(ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr),
+ ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+ req_cont);
+
+
+ rim_cont_expect := tr_RAN_Information_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+ tr_RIM_Sequence_Number(1),
+ tr_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
+ tr_RIM_Protocol_Version_Number(1),
+ tru_ApplContainer_or_ApplErrContainer_NACC(tru_ApplContainer_NACC(mp_gb_cfg.bvc[0].cell_id, false, 0, ''O)),
+ omit);
+
+ bssgp_rim_pdu_expect := tr_PDU_BSSGP_RAN_INFORMATION(tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+ tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr),
+ rim_cont_expect);
+ RIM.send(bssgp_rim_pdu);
+ T.start;
+ alt {
+ [] RIM.receive(bssgp_rim_pdu_expect) { }
+ [] RIM.receive {
+ setverdict(fail, "Unexpected BSSGP RIM PDU received");
+ }
+ [] T.timeout {
+ setverdict(fail, "No BSSGP RIM PDU received");
+ mtc.stop;
+ }
+ }
+
+ /* FIXME: work around a race condition between PCUIF and BSSGP */
+ f_sleep(0.2); /* i.e. give the IUT some time to process everything */
+
+ f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
control {
execute( TC_pcuif_suspend() );
execute( TC_pcuif_suspend_active_tbf() );
@@ -3639,6 +3792,9 @@
execute( TC_multiplex_dl_gprs_egprs() );
execute( TC_pcuif_info_ind_subsequent() );
+
+ execute( TC_rim_ran_info_req_single_rep() );
+ execute( TC_rim_ran_info_req_single_rep_no_si() );
}
}
diff --git a/pcu/PCU_Tests_SNS.cfg b/pcu/PCU_Tests_SNS.cfg
index ab589c5..334a6eb 100644
--- a/pcu/PCU_Tests_SNS.cfg
+++ b/pcu/PCU_Tests_SNS.cfg
@@ -48,7 +48,7 @@
}
}
}
-PCUIF_Types.mp_pcuif_version := 10
+PCUIF_Types.mp_pcuif_version := 11
[TESTPORT_PARAMETERS]
diff --git a/pcu/PCU_Tests_SNSv6.cfg b/pcu/PCU_Tests_SNSv6.cfg
index cae9a75..707db4f 100644
--- a/pcu/PCU_Tests_SNSv6.cfg
+++ b/pcu/PCU_Tests_SNSv6.cfg
@@ -24,7 +24,7 @@
}
}
}
-PCUIF_Types.mp_pcuif_version := 10
+PCUIF_Types.mp_pcuif_version := 11
[TESTPORT_PARAMETERS]
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22369
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: I9054ab0e969c0fbfdc671c92d44cc61360959adc
Gerrit-Change-Number: 22369
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210122/c9c677c3/attachment.htm>