From 1a859717469d4fa5dd87e573487d752b94fe1fba Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Fri, 4 Dec 2020 00:59:45 +0100 Subject: [PATCH] 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 --- gbproxy/GBProxy_Tests.ttcn | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 1430af05a..31cb4653e 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1146,6 +1146,7 @@ private function f_send_paging_ps_exp_one_bss(template (value) Paging_Field4 p4, 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 @@ runs on BSSGP_ConnHdlr { 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 @@ runs on BSSGP_ConnHdlr { [] 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 @@ private function f_send_paging_cs_exp_one_bss(template (value) Paging_Field4 p4, 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 @@ runs on BSSGP_ConnHdlr { 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 @@ runs on BSSGP_ConnHdlr { [] 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; } }