From e97e3af20340ac12d954b63542da27cb1250220d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 9 Oct 2020 14:56:54 +0200 Subject: PCU_Tests_{NS,SNS}: Fix our expectations regarding CellID in BVC-RESET The BVC-RESET / BVC-RESEt-ACK follow a set of rules: * Signaling BVCI=0 never has a CellId in BVC-RESET nor BVC-RESET-ACK * Any BVC-RESET or BVC-RESET ack in BSS->SGSN direction must have CellID * Any BVC-RESET or BVC-RESET ack in SGSN->BSS direction must NOT have CellID Let's adjust our test expectations accordingly. This will break tests against "latest", but the amount of work-arounds needed in this code outweighs the benefit. Change-Id: Ic8a83f5214c372faa15178dd9b54364e7d2a60cb --- library/RAW_NS.ttcn | 14 ++++++++------ pcu/PCU_Tests_NS.ttcn | 6 +++--- pcu/PCU_Tests_SNS.ttcn | 24 ++++++++++++------------ 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/library/RAW_NS.ttcn b/library/RAW_NS.ttcn index 23530462..314bf317 100644 --- a/library/RAW_NS.ttcn +++ b/library/RAW_NS.ttcn @@ -139,16 +139,17 @@ altstep as_rx_alive_tx_ack(boolean oneshot := false, integer idx := 0) runs on R } /* Transmit BSSGP RESET for given BVCI and expect ACK */ -function f_tx_bvc_reset_rx_ack(BssgpBvci bvci, BssgpCellId cell_id, integer idx := 0, boolean exp_ack := true) +function f_tx_bvc_reset_rx_ack(BssgpBvci bvci, template (omit) BssgpCellId tx_cell_id, template BssgpCellId rx_cell_id, + integer idx := 0, boolean exp_ack := true) runs on RAW_NS_CT { var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET(BSSGP_CAUSE_NET_SV_CAP_MOD_GT_ZERO_KBPS, bvci, - cell_id)); + tx_cell_id)); timer T := 5.0; NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx)))); T.start; alt { [exp_ack] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_UNITDATA(t_SduCtrlB, 0, - decmatch tr_BVC_RESET_ACK(bvci, ?)))) { + decmatch tr_BVC_RESET_ACK(bvci, rx_cell_id)))) { setverdict(pass); } [exp_ack] T.timeout { @@ -162,13 +163,14 @@ runs on RAW_NS_CT { } /* Receive a BSSGP RESET for given BVCI and ACK it */ -altstep as_rx_bvc_reset_tx_ack(BssgpBvci bvci, template (omit) BssgpCellId cell_id, boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT { +altstep as_rx_bvc_reset_tx_ack(BssgpBvci bvci, template BssgpCellId rx_cell_id, template (omit) BssgpCellId tx_cell_id, + boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT { var NS_RecvFrom ns_rf; [] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_UNITDATA(t_SduCtrlB, 0, - decmatch tr_BVC_RESET(?, bvci, cell_id)))) + decmatch tr_BVC_RESET(?, bvci, rx_cell_id)))) -> value ns_rf { var PDU_BSSGP bssgp_rx := dec_PDU_BSSGP(ns_rf.msg.pDU_NS_Unitdata.nS_SDU); - var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET_ACK(bvci, cell_id)); + var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET_ACK(bvci, tx_cell_id)); NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx)))); if (not oneshot) { repeat; } } diff --git a/pcu/PCU_Tests_NS.ttcn b/pcu/PCU_Tests_NS.ttcn index 5ab5f8d8..4db78d87 100644 --- a/pcu/PCU_Tests_NS.ttcn +++ b/pcu/PCU_Tests_NS.ttcn @@ -194,11 +194,11 @@ testcase TC_ns_full_bringup() runs on RAW_Test_CT { /* Expect BVC-RESET for signaling (0) and ptp BVCI */ if (mp_tolerate_bvc_reset_cellid) { - as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.bvc[0].cell_id, oneshot := true); + as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.bvc[0].cell_id, omit, oneshot := true); } else { - as_rx_bvc_reset_tx_ack(0, omit, oneshot := true); + as_rx_bvc_reset_tx_ack(0, omit, omit, oneshot := true); } - as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, oneshot := true); + as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, omit, oneshot := true); as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvc[0].bvci, oneshot := true); /* wait for one FLOW-CONTROL BVC and then ACK any further in the future */ diff --git a/pcu/PCU_Tests_SNS.ttcn b/pcu/PCU_Tests_SNS.ttcn index dc4cd82c..471c7583 100644 --- a/pcu/PCU_Tests_SNS.ttcn +++ b/pcu/PCU_Tests_SNS.ttcn @@ -187,8 +187,8 @@ testcase TC_sns_so_config_success() runs on RAW_Test_CT { f_outgoing_ns_alive(); /* Expect BVC-RESET for signaling (0) and ptp BVCI */ - as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.bvc[0].cell_id, oneshot := true); - as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, oneshot := true); + as_rx_bvc_reset_tx_ack(0, omit, omit, oneshot := true); + as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, omit, oneshot := true); as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvc[0].bvci, oneshot := true); /* wait for one FLOW-CONTROL BVC and then ACK any further in the future */ @@ -220,12 +220,12 @@ private function f_sns_bringup_1c1u(boolean sgsn_originated_reset := false) runs f_outgoing_ns_alive(1); if (sgsn_originated_reset) { - f_tx_bvc_reset_rx_ack(0, mp_gb_cfg.bvc[0].cell_id); - f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id); + f_tx_bvc_reset_rx_ack(0, omit, omit); + f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvc[0].bvci, omit, mp_gb_cfg.bvc[0].cell_id); } else { /* Expect BVC-RESET for signaling (0) and ptp BVCI */ - as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.bvc[0].cell_id, oneshot := true); - as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, oneshot := true); + as_rx_bvc_reset_tx_ack(0, omit, omit, oneshot := true); + as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, omit, oneshot := true); } /* Expect UNBLOCK for ptp BVCI on signaling NS-VC (idx==0) */ as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvc[0].bvci, oneshot := true); @@ -270,12 +270,12 @@ private function f_sns_bringup_1c1u_separate(boolean sgsn_originated_reset := fa f_outgoing_ns_alive_no_ack(idx := 0); if (sgsn_originated_reset) { - f_tx_bvc_reset_rx_ack(0, mp_gb_cfg.bvc[0].cell_id, idx := 1); - f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, idx := 1); + f_tx_bvc_reset_rx_ack(0, omit, omit, idx := 1); + f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvc[0].bvci, omit, mp_gb_cfg.bvc[0].cell_id, idx := 1); } else { /* Expect BVC-RESET for signaling BVCI=0 and ptp BVCI */ - as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.bvc[0].cell_id, oneshot := true, idx := 1); - as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, oneshot := true, idx := 1); + as_rx_bvc_reset_tx_ack(0, omit, omit, oneshot := true, idx := 1); + as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, omit, oneshot := true, idx := 1); } /* Expect UNBLOCK for ptp BVCI on signaling NS-VC (idx==1) */ as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvc[0].bvci, oneshot := true, idx := 1); @@ -322,8 +322,8 @@ testcase TC_sns_1c1u_so_bvc_reset_too_early() runs on RAW_Test_CT { f_outgoing_ns_alive_no_ack(idx := 0); /* Transmit BVC-RESET and expect no ACK*/ - f_tx_bvc_reset_rx_ack(0, mp_gb_cfg.bvc[0].cell_id, idx := 1, exp_ack := false); - f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id, idx := 1, exp_ack := false); + f_tx_bvc_reset_rx_ack(0, omit, omit, idx := 1, exp_ack := false); + f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvc[0].bvci, omit, mp_gb_cfg.bvc[0].cell_id, idx := 1, exp_ack := false); } /* Test adding new IP endpoints at runtime */ -- cgit v1.2.3