Change in osmo-ttcn3-hacks[master]: PCU_Tests_{NS, SNS}: Fix our expectations regarding CellID in BVC-RESET

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/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Oct 9 13:00:10 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20507 )


Change subject: PCU_Tests_{NS,SNS}: Fix our expectations regarding CellID in BVC-RESET
......................................................................

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
---
M library/RAW_NS.ttcn
M pcu/PCU_Tests_NS.ttcn
M pcu/PCU_Tests_SNS.ttcn
3 files changed, 23 insertions(+), 21 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/20507/1

diff --git a/library/RAW_NS.ttcn b/library/RAW_NS.ttcn
index 2353046..314bf31 100644
--- a/library/RAW_NS.ttcn
+++ b/library/RAW_NS.ttcn
@@ -139,16 +139,17 @@
 }
 
 /* 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 @@
 }
 
 /* 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 5ab5f8d..4db78d8 100644
--- a/pcu/PCU_Tests_NS.ttcn
+++ b/pcu/PCU_Tests_NS.ttcn
@@ -194,11 +194,11 @@
 
 	/* 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 dc4cd82..471c758 100644
--- a/pcu/PCU_Tests_SNS.ttcn
+++ b/pcu/PCU_Tests_SNS.ttcn
@@ -187,8 +187,8 @@
 	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 @@
 	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 @@
 	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 @@
 	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 */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20507
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: Ic8a83f5214c372faa15178dd9b54364e7d2a60cb
Gerrit-Change-Number: 20507
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201009/ef19b40a/attachment.htm>


More information about the gerrit-log mailing list