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] 03f74d4132
Fixes: [2] 7295661af5
Related: OS#5901
This commit is contained in:
Vadim Yanitskiy 2023-02-13 01:39:57 +07:00 committed by fixeria
parent d8aa5e8a6e
commit 8a15b45ea1
1 changed files with 61 additions and 44 deletions

View File

@ -5189,38 +5189,67 @@ runs on RAW_PCU_Test_CT {
} }
} }
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, 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) boolean answer := true, boolean use_old_ctrl_iface := false)
runs on RAW_PCU_Test_CT { runs on RAW_PCU_Test_CT {
if (use_old_ctrl_iface == true) { if (use_old_ctrl_iface == true) {
f_ipa_ctrl_wait_link_up(); var CtrlMessage ctrl_req;
var charstring ctrl_var := "neighbor_resolve_cgi_ps_from_lac_ci." & f_ctrl_rx_nacc_rac_ci_req(ctrl_req, info_ind, req_arfcn, req_bsic);
int2str(info_ind.lac) & "." &
int2str(info_ind.cell_id) & "." &
int2str(req_arfcn) & "." &
int2str(req_bsic);
if (answer) { if (answer) {
var BssgpCellId addr := valueof(ts_BssgpCellIdDstAddr_default); f_ctrl_tx_nacc_rac_ci_rsp(ctrl_req);
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);
} }
} else { } else {
var PCUIF_Message pcu_msg; var PCUIF_Message pcuif_req;
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(pcuif_req, info_ind, req_arfcn, req_bsic);
if (answer) { if (answer) {
var BssgpCellId addr := valueof(ts_BssgpCellIdDstAddr_default); f_pcuif_tx_nacc_rac_ci_rsp(pcuif_req);
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));
} }
} }
} }
@ -5747,15 +5776,9 @@ testcase TC_nacc_outbound_pkt_cell_chg_notif_dup() runs on RAW_PCU_Test_CT {
/* osmo-pcu should now ask for resolution: */ /* osmo-pcu should now ask for resolution: */
if (use_old_ctrl_iface) { if (use_old_ctrl_iface) {
f_ipa_ctrl_wait_link_up(); f_ctrl_rx_nacc_rac_ci_req(rx_ctrl, info_ind, req_arfcn, req_bsic);
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;
} else { } 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 */ /* Before receiving CTRL response, MS retransmits Pkt cell Chg Notif */
@ -5763,9 +5786,9 @@ testcase TC_nacc_outbound_pkt_cell_chg_notif_dup() runs on RAW_PCU_Test_CT {
f_sleep(0.2); /* let some time to avoid race conditons between CTRL and RLCMAC */ f_sleep(0.2); /* let some time to avoid race conditons between CTRL and RLCMAC */
if (use_old_ctrl_iface) { 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 { } 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; timer T := 2.0;
@ -6133,24 +6156,18 @@ testcase TC_nacc_outbound_pkt_cell_chg_notif_twice() runs on RAW_PCU_Test_CT {
/* osmo-pcu should now ask for resolution: */ /* osmo-pcu should now ask for resolution: */
if (use_old_ctrl_iface) { if (use_old_ctrl_iface) {
f_ipa_ctrl_wait_link_up(); f_ctrl_rx_nacc_rac_ci_req(rx_ctrl, info_ind, req_arfcn, req_bsic);
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;
} else { } 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 */ /* 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); 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_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 */ f_sleep(0.2); /* let some time to avoid race conditons between CTRL and RLCMAC */
if (use_old_ctrl_iface) { 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 { } 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 */ /* 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); f_handle_nacc_rac_ci_query(info_ind, req_arfcn + 1, req_bsic + 1, true, use_old_ctrl_iface);