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.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22459 ) Change subject: gbproxy: Use Misc_Helpers.f_shutdown() whenever applicable ...................................................................... gbproxy: Use Misc_Helpers.f_shutdown() whenever applicable This should avoid some of the "known" races during shut-down Change-Id: I4fdd47e9c5887597dca89580f856ddc6cd8f54f1 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 43 insertions(+), 56 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/22459/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index df27a3d..4879521 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -592,8 +592,7 @@ repeat; } [] SGSN_MGMT.receive { - setverdict(fail, "Received unexpected message on SGSN_MGMT"); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, "Received unexpected message on SGSN_MGMT"); } [] PCU_MGMT.receive(BssgpStatusIndication:{*, ?, BVC_S_UNBLOCKED}) -> value bsi { @@ -606,8 +605,7 @@ repeat; } [] PCU_MGMT.receive { - setverdict(fail, "Received unexpected message on PCU_MGMT"); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, "Received unexpected message on PCU_MGMT"); } [] T.timeout { @@ -622,8 +620,8 @@ for (var integer j := 0; j < lengthof(g_sgsn[i].cfg.bvc); j := j+1) { var BssgpBvci bvci := g_sgsn[i].cfg.bvc[j].bvci; if (not ro_integer_contains(bvci_unblocked[i], bvci)) { - setverdict(fail, "SGSN ", i, " BVCI=", bvci, " was not unblocked during start-up"); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("SGSN ", i, " BVCI=", bvci, " was not unblocked during start-up")); } } } @@ -742,8 +740,7 @@ private altstep as_gTguard(timer Tguard) { [] Tguard.timeout { - setverdict(fail, "Tguard timeout"); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, "Tguard timeout"); } } @@ -821,16 +818,16 @@ setverdict(pass); } [] SGSN_PTP[sgsn_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected BSSGP on SGSN[", sgsn_idx, "] side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Unexpected BSSGP on SGSN[", sgsn_idx, "] side: ", rx)); } [] SGSN_SIG[sgsn_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected SIG BSSGP on SGSN[", sgsn_idx, "] side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Unexpected SIG BSSGP on SGSN[", sgsn_idx, "] side: ", rx)); } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on SGSN[", sgsn_idx, "] side: ", exp_rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Timeout waiting for BSSGP on SGSN[", sgsn_idx, "] side: ", exp_rx)); } } } @@ -858,16 +855,16 @@ setverdict(pass); } [] any from SGSN_PTP.receive(PDU_BSSGP:?) -> value rx @index value rx_idx { - setverdict(fail, "Unexpected BSSGP on SGSN[", rx_idx, "] side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Unexpected BSSGP on SGSN[", rx_idx, "] side: ", rx)); } [] any from SGSN_SIG.receive(PDU_BSSGP:?) -> value rx @index value rx_idx { - setverdict(fail, "Unexpected SIG BSSGP on SGSN[", rx_idx, "] side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Unexpected SIG BSSGP on SGSN[", rx_idx, "] side: ", rx)); } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on SGSN side: ", exp_rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Timeout waiting for BSSGP on SGSN side: ", exp_rx)); } } return rx_idx; @@ -895,16 +892,14 @@ setverdict(pass); } [] PCU_PTP[pcu_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected BSSGP on PCU side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, log2str("Unexpected BSSGP on PCU side: ", rx)); } [] PCU_SIG[pcu_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected SIG BSSGP on PCU side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, log2str("Unexpected SIG BSSGP on PCU side: ", rx)); } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on PCU side: ", exp_rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Timeout waiting for BSSGP on PCU side: ", exp_rx)); } } } @@ -987,12 +982,10 @@ setverdict(fail, "BSSGP arrived on wrong SGSN[", rx_idx, "] instead of SGSN[", sgsn_idx, "]"); } [] G_SGSN[sgsn_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected BSSGP on SGSN side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, log2str("Unexpected BSSGP on SGSN side: ", rx)); } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on SGSN side: ", exp_rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, log2str("Timeout waiting for BSSGP on SGSN side: ", exp_rx)); } } } @@ -1014,12 +1007,10 @@ setverdict(fail, "BSSGP arrived on wrong PCU[", rx_idx, "] instead of PCU[", pcu_idx, "]"); } [] G_PCU[pcu_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected BSSGP on PCU side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, log2str("Unexpected BSSGP on PCU side: ", rx)); } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on PCU side: ", exp_rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, log2str("Timeout waiting for BSSGP on PCU side: ", exp_rx)); } } } @@ -1061,12 +1052,12 @@ return rx_pdu.pDU_BSSGP_SUSPEND_ACK.suspend_Reference_Number.suspend_Reference_Number_value; } [] PCU_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_NACK(g_pars.tlli, bvcc.cell_id.ra_id, ?)) -> value rx_pdu { - setverdict(fail, "SUSPEND-NACK in response to SUSPEND for TLLI ", g_pars.tlli); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("SUSPEND-NACK in response to SUSPEND for TLLI ", g_pars.tlli)); } [] T.timeout { - setverdict(fail, "No SUSPEND-ACK in response to SUSPEND for TLLI ", g_pars.tlli); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("No SUSPEND-ACK in response to SUSPEND for TLLI ", g_pars.tlli)); } } return '00'O; @@ -1080,12 +1071,12 @@ alt { [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_ACK(g_pars.tlli, bvcc.cell_id.ra_id)); [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_NACK(g_pars.tlli, bvcc.cell_id.ra_id, ?)) { - setverdict(fail, "RESUME-NACK in response to RESUME for TLLI ", g_pars.tlli); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("RESUME-NACK in response to RESUME for TLLI ", g_pars.tlli)); } [] T.timeout { - setverdict(fail, "No RESUME-ACK in response to SUSPEND for TLLI ", g_pars.tlli); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("No RESUME-ACK in response to SUSPEND for TLLI ", g_pars.tlli)); } } } @@ -1399,8 +1390,7 @@ [] NS.receive(NsUnitdataIndication:{0,?,?,*,*}) { repeat; } /* signaling BVC */ [] NS.receive(NsStatusIndication:?) { repeat; } [] NS.receive { - setverdict(fail, "Rx unexpected NS"); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, "Rx unexpected NS"); } [] T.timeout { } @@ -2828,12 +2818,11 @@ setverdict(pass); } [] any from RIM_SGSN.receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected BSSGP on SGSN side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, log2str("Unexpected BSSGP on SGSN side: ", rx)); } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on SGSN side: ", exp_rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Timeout waiting for BSSGP on SGSN side: ", exp_rx)); } } } @@ -2851,12 +2840,11 @@ setverdict(pass); } [] RIM_PCU[pcu_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected BSSGP on PCU side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, log2str("Unexpected BSSGP on PCU side: ", rx)); } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on PCU side: ", exp_rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Timeout waiting for BSSGP on PCU side: ", exp_rx)); } } } @@ -2881,12 +2869,11 @@ setverdict(fail, "Received RIM on SGSN but expected it on other PCU"); } [] any from RIM_SGSN.receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected BSSGP on SGSN side: ", rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, log2str("Unexpected BSSGP on SGSN side: ", rx)); } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on SGSN side: ", exp_rx); - mtc.stop; + f_shutdown(__FILE__, __LINE__, fail, + log2str("Timeout waiting for BSSGP on SGSN side: ", exp_rx)); } } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22459 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: I4fdd47e9c5887597dca89580f856ddc6cd8f54f1 Gerrit-Change-Number: 22459 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/20210127/ed51f68d/attachment.htm>