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/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20923 )
Change subject: PCU_Tests_SNS: improve SGSN originated BVC-RESETs
......................................................................
PCU_Tests_SNS: improve SGSN originated BVC-RESETs
The BVC-RESETs are a little bit more complicated. The PCU will send
a BVC-RESET after the NSE become available.
Ensure the RESET is received and ignored so there is no race condition
if both sides send a BVC-RESET at the same time.
The test case TC_sns_1c1u_so_bvc_reset is still failing because the PCU can't
handle BVC-RESETs properly (both PTP and signalling).
Change-Id: Id681749d75073c1d50a4b0a2e86f0a2dd0955b45
---
M library/RAW_NS.ttcn
M pcu/PCU_Tests_SNS.ttcn
2 files changed, 24 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/23/20923/1
diff --git a/library/RAW_NS.ttcn b/library/RAW_NS.ttcn
index 314bf31..02ed9de 100644
--- a/library/RAW_NS.ttcn
+++ b/library/RAW_NS.ttcn
@@ -67,15 +67,16 @@
}
-function f_ns_exp(template PDU_NS exp_rx, integer idx := 0) runs on RAW_NS_CT return PDU_NS {
+function f_ns_exp(template PDU_NS exp_rx, integer idx := 0, boolean ignore_other_pdu := false) runs on RAW_NS_CT return PDU_NS {
var NS_RecvFrom nrf;
log("f_ns_exp() expecting ", exp_rx);
alt {
[] NSCP[idx].receive(t_NS_RecvFrom(exp_rx)) -> value nrf { }
- [] NSCP[idx].receive(t_NS_RecvFrom(?)) -> value nrf {
+ [not ignore_other_pdu] NSCP[idx].receive(t_NS_RecvFrom(?)) -> value nrf {
setverdict(fail, "Received unexpected NS: ", nrf);
mtc.stop;
}
+ [ignore_other_pdu] NSCP[idx].receive { repeat; }
}
return nrf.msg;
}
diff --git a/pcu/PCU_Tests_SNS.ttcn b/pcu/PCU_Tests_SNS.ttcn
index 86b83c2..20e0fde 100644
--- a/pcu/PCU_Tests_SNS.ttcn
+++ b/pcu/PCU_Tests_SNS.ttcn
@@ -287,11 +287,21 @@
f_outgoing_ns_alive(1);
if (sgsn_originated_reset) {
+ /* Expect BVC-RESET, but ignore it to prevent a race condition of BVC RESETs */
+ var template PDU_NS pdu := tr_NS_UNITDATA(t_SduCtrlB, 0, decmatch tr_BVC_RESET(?, 0, omit));
+ f_ns_exp(pdu, ignore_other_pdu := true);
+ /* SGSN originated BVC-RESET on an uninitialized signalling BVC */
f_tx_bvc_reset_rx_ack(0, omit, omit);
+
+ /* Expect BVC-RESET PTP BVC, but ignore it to prevent a race condition of BVC RESETs */
+ pdu := tr_NS_UNITDATA(t_SduCtrlB, 0, decmatch tr_BVC_RESET(?, mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id));
+ f_ns_exp(pdu, ignore_other_pdu := true);
+ /* SGSN originated BVC-RESET on an uninitialized PTP BVC */
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 */
+ /* Expect BVC-RESET for signaling BVCI=0 */
as_rx_bvc_reset_tx_ack(0, omit, omit, oneshot := true);
+ /* Expect BVC-RESET from the PCU on PTP BVC */
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) */
@@ -337,11 +347,20 @@
f_outgoing_ns_alive_no_ack(idx := 0);
if (sgsn_originated_reset) {
+ /* Expect BVC-RESET, but ignore it to prevent a race condition of BVC RESETs */
+ var template PDU_NS pdu := tr_NS_UNITDATA(t_SduCtrlB, 0, decmatch tr_BVC_RESET(?, 0, omit));
+ f_ns_exp(pdu, idx := 1, ignore_other_pdu := true);
+ /* SGSN originated BVC-RESET on an uninitialized sign BVC */
f_tx_bvc_reset_rx_ack(0, omit, omit, idx := 1);
+
+ /* Expect BVC-RESET PTP BVC, but ignore it to prevent a race condition of BVC RESETs */
+ pdu := tr_NS_UNITDATA(t_SduCtrlB, 0, decmatch tr_BVC_RESET(?, mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id));
+ f_ns_exp(pdu, idx := 1, ignore_other_pdu := true);
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 */
+ /* Expect BVC-RESET for signaling BVCI=0 */
as_rx_bvc_reset_tx_ack(0, omit, omit, oneshot := true, idx := 1);
+ /* Expect BVC-RESET from the PCU on PTP BVC */
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) */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20923
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: Id681749d75073c1d50a4b0a2e86f0a2dd0955b45
Gerrit-Change-Number: 20923
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201026/fbd44016/attachment.htm>