Change in osmo-ttcn3-hacks[master]: gbproxy: Fail on timeout in f_send_paging_xs_exp_one_bss

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

daniel gerrit-no-reply at lists.osmocom.org
Fri Dec 4 00:05:35 UTC 2020


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


Change subject: gbproxy: Fail on timeout in f_send_paging_xs_exp_one_bss
......................................................................

gbproxy: Fail on timeout in f_send_paging_xs_exp_one_bss

These functions would not set a verdict in case no message was ever
received. This patch ensures that a timeout while waiting for a paging
message actually fails the test.

Change-Id: If71db2d37d67d02c5d9550202128ee3470762964
Related: SYS#5002
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 18 insertions(+), 6 deletions(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index a84d346..714a56d 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -1140,6 +1140,7 @@
 					      boolean use_sig := false,integer pcu_idx := 0)
 runs on BSSGP_ConnHdlr {
 	var template (present) PDU_BSSGP exp_rx;
+	var boolean test_done := false;
 	/* doesn't really make sense: Sending to a single BVCI means the message ends up
 	 * at that BVC (cell) only, and paging all over the BSS area is not possible */
 	exp_rx := f_send_paging_ps(p4, sgsn_idx, use_sig);
@@ -1147,15 +1148,17 @@
 	timer T := 2.0;
 	T.start;
 	alt {
-	[not use_sig] PCU[pcu_idx].receive(exp_rx) {
+	[not use_sig and not test_done] PCU[pcu_idx].receive(exp_rx) {
 		setverdict(pass);
+		test_done := true;
 		repeat;
 		}
 	[not use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {
 		setverdict(fail, "Received paging on SIGNALING BVC, expected PTP BVC");
 		}
-	[use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {
+	[use_sig and not test_done] PCU_SIG[pcu_idx].receive(exp_rx) {
 		setverdict(pass);
+		test_done := true;
 		repeat;
 		}
 	[use_sig] PCU[pcu_idx].receive(exp_rx) {
@@ -1173,7 +1176,10 @@
 	[] any from PCU_SIG.receive(PDU_BSSGP:{pDU_BSSGP_PAGING_PS:=?}) {
 		setverdict(fail, "Different Paging than expected on SIGNALING BVC");
 		}
-	[] T.timeout;
+	[not test_done] T.timeout {
+		setverdict(fail, "Timeout waiting for paging");
+	}
+	[test_done] T.timeout;
 	}
 }
 
@@ -1555,6 +1561,7 @@
 					      boolean use_sig := false,integer pcu_idx := 0)
 runs on BSSGP_ConnHdlr {
 	var template (present) PDU_BSSGP exp_rx;
+	var boolean test_done := false;
 	/* doesn't really make sense: Sending to a single BVCI means the message ends up
 	 * at that BVC (cell) only, and paging all over the BSS area is not possible */
 	exp_rx := f_send_paging_cs(p4, sgsn_idx, use_sig);
@@ -1562,15 +1569,17 @@
 	timer T := 2.0;
 	T.start;
 	alt {
-	[not use_sig] PCU[pcu_idx].receive(exp_rx) {
+	[not use_sig and not test_done] PCU[pcu_idx].receive(exp_rx) {
 		setverdict(pass);
+		test_done := true;
 		repeat;
 		}
 	[not use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {
 		setverdict(fail, "Received paging on SIGNALING BVC, expected PTP BVC");
 		}
-	[use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {
+	[use_sig and not test_done] PCU_SIG[pcu_idx].receive(exp_rx) {
 		setverdict(pass);
+		test_done := true;
 		repeat;
 		}
 	[use_sig] PCU[pcu_idx].receive(exp_rx) {
@@ -1588,7 +1597,10 @@
 	[] any from PCU_SIG.receive(PDU_BSSGP:{pDU_BSSGP_PAGING_CS:=?}) {
 		setverdict(fail, "Different Paging than expected on SIGNALING BVC");
 		}
-	[] T.timeout;
+	[not test_done] T.timeout {
+		setverdict(fail, "Timeout while waiting for paging")
+	}
+	[test_done] T.timeout;
 	}
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21525
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: If71db2d37d67d02c5d9550202128ee3470762964
Gerrit-Change-Number: 21525
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201204/3ebb8604/attachment.htm>


More information about the gerrit-log mailing list