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
Mon Dec 7 13:59:36 UTC 2020


daniel has submitted this change. ( 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(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 1430af0..31cb465 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -1146,6 +1146,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);
@@ -1153,15 +1154,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) {
@@ -1179,7 +1182,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;
 	}
 }
 
@@ -1561,6 +1567,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);
@@ -1568,15 +1575,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) {
@@ -1594,7 +1603,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: 3
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201207/27af905f/attachment.htm>


More information about the gerrit-log mailing list