fixeria submitted this change.
PCU_Tests: fix TC_nacc_outbound_pkt_cell_chg_notif_dup
The TC_nacc_outbound_pkt_cell_chg_notif_dup is currently failing
because in [1] we changed the default hard-coded MCC/MNC values in
ts_BssgpCellIdDstAddr_default, however these it's still using
hardcoded MCC=023/MNC=43. I overlooked this in [2].
Let's split up the f_handle_nacc_rac_ci_query() into four functions:
* f_ctrl_rx_nacc_rac_ci_req() / f_ctrl_tx_nacc_rac_ci_rsp(),
* f_pcuif_rx_nacc_rac_ci_req() / f_pcuif_tx_nacc_rac_ci_rsp(),
and use them in TC_nacc_outbound_pkt_cell_chg_notif_dup. Also
employ them in TC_nacc_outbound_pkt_cell_chg_notif_twice.
Change-Id: I3e84f55eedd278fb239600d6a0465bd34fd8cd0b
Related: [1] 03f74d413258a125d6e64a4241a82d8384693895
Fixes: [2] 7295661af52ab397acd7376023817b64e1db5a66
Related: OS#5901
---
M pcu/PCU_Tests.ttcn
1 file changed, 61 insertions(+), 44 deletions(-)
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 439ffea..954216f 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -5189,38 +5189,67 @@
}
}
+private function f_ctrl_rx_nacc_rac_ci_req(out CtrlMessage ctrl_req,
+ PCUIF_info_ind info_ind,
+ GsmArfcn req_arfcn,
+ uint6_t req_bsic)
+runs on RAW_PCU_Test_CT {
+ var charstring ctrl_var := "neighbor_resolve_cgi_ps_from_lac_ci." &
+ int2str(info_ind.lac) & "." &
+ int2str(info_ind.cell_id) & "." &
+ int2str(req_arfcn) & "." &
+ int2str(req_bsic);
+ f_ipa_ctrl_wait_link_up();
+ IPA_CTRL.receive(tr_CtrlMsgGet(?, ctrl_var)) -> value ctrl_req;
+}
+
+private function f_ctrl_tx_nacc_rac_ci_rsp(in CtrlMessage ctrl_req)
+runs on RAW_PCU_Test_CT {
+ var BssgpCellId addr := valueof(ts_BssgpCellIdDstAddr_default);
+ IPA_CTRL.send(ts_CtrlMsgGetRepl(ctrl_req.cmd.id,
+ ctrl_req.cmd.variable,
+ hex2str(c_BssgpCellMcc) & "-" &
+ hex2str(c_BssgpCellMnc) & "-" &
+ int2str(addr.ra_id.lai.lac) & "-" &
+ int2str(addr.ra_id.rac) & "-" &
+ int2str(addr.cell_id)));
+}
+
+private function f_pcuif_rx_nacc_rac_ci_req(out PCUIF_Message addr_req,
+ PCUIF_info_ind info_ind,
+ GsmArfcn req_arfcn,
+ uint6_t req_bsic)
+runs on RAW_PCU_Test_CT {
+ BTS.receive(tr_PCUIF_NEIGH_ADDR_REQ(0, info_ind.lac, info_ind.cell_id,
+ req_arfcn, req_bsic)) -> value addr_req;
+}
+
+private function f_pcuif_tx_nacc_rac_ci_rsp(in PCUIF_Message addr_req)
+runs on RAW_PCU_Test_CT {
+ var BssgpCellId addr := valueof(ts_BssgpCellIdDstAddr_default);
+ BTS.send(ts_PCUIF_NEIGH_ADDR_CNF(0, addr_req.u.container.u.neigh_addr_req, 0,
+ str2int(hex2str(c_BssgpCellMcc)),
+ str2int(hex2str(c_BssgpCellMnc)),
+ lengthof(c_BssgpCellMnc) - 2,
+ addr.ra_id.lai.lac,
+ addr.ra_id.rac,
+ addr.cell_id));
+}
+
private function f_handle_nacc_rac_ci_query(PCUIF_info_ind info_ind, GsmArfcn req_arfcn, uint6_t req_bsic,
boolean answer := true, boolean use_old_ctrl_iface := false)
runs on RAW_PCU_Test_CT {
if (use_old_ctrl_iface == true) {
- f_ipa_ctrl_wait_link_up();
- var charstring ctrl_var := "neighbor_resolve_cgi_ps_from_lac_ci." &
- int2str(info_ind.lac) & "." &
- int2str(info_ind.cell_id) & "." &
- int2str(req_arfcn) & "." &
- int2str(req_bsic);
+ var CtrlMessage ctrl_req;
+ f_ctrl_rx_nacc_rac_ci_req(ctrl_req, info_ind, req_arfcn, req_bsic);
if (answer) {
- var BssgpCellId addr := valueof(ts_BssgpCellIdDstAddr_default);
- f_ctrl_exp_get(IPA_CTRL, ctrl_var, hex2str(c_BssgpCellMcc) & "-" &
- hex2str(c_BssgpCellMnc) & "-" &
- int2str(addr.ra_id.lai.lac) & "-" &
- int2str(addr.ra_id.rac) & "-" &
- int2str(addr.cell_id));
- } else {
- f_ctrl_exp_get(IPA_CTRL, ctrl_var, omit);
+ f_ctrl_tx_nacc_rac_ci_rsp(ctrl_req);
}
} else {
- var PCUIF_Message pcu_msg;
- BTS.receive(tr_PCUIF_NEIGH_ADDR_REQ(0, info_ind.lac, info_ind.cell_id, req_arfcn, req_bsic)) -> value pcu_msg;
+ var PCUIF_Message pcuif_req;
+ f_pcuif_rx_nacc_rac_ci_req(pcuif_req, info_ind, req_arfcn, req_bsic);
if (answer) {
- var BssgpCellId addr := valueof(ts_BssgpCellIdDstAddr_default);
- BTS.send(ts_PCUIF_NEIGH_ADDR_CNF(0, pcu_msg.u.container.u.neigh_addr_req, 0,
- str2int(hex2str(c_BssgpCellMcc)),
- str2int(hex2str(c_BssgpCellMnc)),
- lengthof(c_BssgpCellMnc) - 2,
- addr.ra_id.lai.lac,
- addr.ra_id.rac,
- addr.cell_id));
+ f_pcuif_tx_nacc_rac_ci_rsp(pcuif_req);
}
}
}
@@ -5747,15 +5776,9 @@
/* osmo-pcu should now ask for resolution: */
if (use_old_ctrl_iface) {
- f_ipa_ctrl_wait_link_up();
- ctrl_var := "neighbor_resolve_cgi_ps_from_lac_ci." &
- int2str(info_ind.lac) & "." &
- int2str(info_ind.cell_id) & "." &
- int2str(req_arfcn) & "." &
- int2str(req_bsic);
- IPA_CTRL.receive(tr_CtrlMsgGet(?, ctrl_var)) -> value rx_ctrl;
+ f_ctrl_rx_nacc_rac_ci_req(rx_ctrl, info_ind, req_arfcn, req_bsic);
} else {
- BTS.receive(tr_PCUIF_NEIGH_ADDR_REQ(0, info_ind.lac, info_ind.cell_id, req_arfcn, req_bsic)) -> value pcu_msg;
+ f_pcuif_rx_nacc_rac_ci_req(pcu_msg, info_ind, req_arfcn, req_bsic);
}
/* Before receiving CTRL response, MS retransmits Pkt cell Chg Notif */
@@ -5763,9 +5786,9 @@
f_sleep(0.2); /* let some time to avoid race conditons between CTRL and RLCMAC */
if (use_old_ctrl_iface) {
- IPA_CTRL.send(ts_CtrlMsgGetRepl(rx_ctrl.cmd.id, ctrl_var, "023-43-423-2-5"));
+ f_ctrl_tx_nacc_rac_ci_rsp(rx_ctrl);
} else {
- BTS.send(ts_PCUIF_NEIGH_ADDR_CNF(0, pcu_msg.u.container.u.neigh_addr_req, 0, 23, 43, 0, 423, 2, 5));
+ f_pcuif_tx_nacc_rac_ci_rsp(pcu_msg);
}
timer T := 2.0;
@@ -6133,24 +6156,18 @@
/* osmo-pcu should now ask for resolution: */
if (use_old_ctrl_iface) {
- f_ipa_ctrl_wait_link_up();
- ctrl_var := "neighbor_resolve_cgi_ps_from_lac_ci." &
- int2str(info_ind.lac) & "." &
- int2str(info_ind.cell_id) & "." &
- int2str(req_arfcn) & "." &
- int2str(req_bsic);
- IPA_CTRL.receive(tr_CtrlMsgGet(?, ctrl_var)) -> value rx_ctrl;
+ f_ctrl_rx_nacc_rac_ci_req(rx_ctrl, info_ind, req_arfcn, req_bsic);
} else {
- BTS.receive(tr_PCUIF_NEIGH_ADDR_REQ(0, info_ind.lac, info_ind.cell_id, req_arfcn, req_bsic)) -> value pcu_msg;
+ f_pcuif_rx_nacc_rac_ci_req(pcu_msg, info_ind, req_arfcn, req_bsic);
}
/* Before receiving CTRL response, MS retransmits Pkt cell Chg Notif with different tgt arfcn */
cell_chf_notif := ts_RlcMacUlCtrl_PKT_CELL_CHG_NOTIF(ms.ul_tbf.tfi, req_arfcn + 1, req_bsic + 1);
f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(cell_chf_notif), 0, nr := f_ms_tx_TsTrxBtsNum(ms));
f_sleep(0.2); /* let some time to avoid race conditons between CTRL and RLCMAC */
if (use_old_ctrl_iface) {
- IPA_CTRL.send(ts_CtrlMsgGetRepl(rx_ctrl.cmd.id, ctrl_var, "023-43-423-2-5"));
+ f_ctrl_tx_nacc_rac_ci_rsp(rx_ctrl);
} else {
- BTS.send(ts_PCUIF_NEIGH_ADDR_CNF(0, pcu_msg.u.container.u.neigh_addr_req, 0, 23, 43, 0, 423, 2, 5));
+ f_pcuif_tx_nacc_rac_ci_rsp(pcu_msg);
}
/* We should now receive a 2nd CTRL request with the new ARFCN+BSIC */
f_handle_nacc_rac_ci_query(info_ind, req_arfcn + 1, req_bsic + 1, true, use_old_ctrl_iface);
To view, visit change 31302. To unsubscribe, or for help writing mail filters, visit settings.