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/+/21170 ) Change subject: gbproxy: Use BSSGP MGMT port to determine when all BVC are unblocked ...................................................................... gbproxy: Use BSSGP MGMT port to determine when all BVC are unblocked Change-Id: I9c94aa4b4891e8a79bca62f4fd713e4ad50f9424 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 65 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/70/21170/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 47a0cd9..9c57b8b 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -209,6 +209,9 @@ port BSSGP_CT_PROC_PT PROC; + port BSSGP_BVC_MGMT_PT SGSN_MGMT; + port BSSGP_BVC_MGMT_PT PCU_MGMT; + port TELNETasp_PT GBPVTY; var boolean g_initialized := false; @@ -282,6 +285,7 @@ connect(self:PROC, gb.vc_BSSGP:PROC); gb.vc_BSSGP_BVC[i] := f_bssgp_get_bvci_ct(gb.cfg.bvc[i].bvci, PROC); disconnect(self:PROC, gb.vc_BSSGP:PROC); + connect(self:PCU_MGMT, gb.vc_BSSGP_BVC[i]:MGMT); } } @@ -298,6 +302,7 @@ connect(self:PROC, gb.vc_BSSGP:PROC); gb.vc_BSSGP_BVC[i] := f_bssgp_get_bvci_ct(gb.cfg.bvc[i].bvci, PROC); disconnect(self:PROC, gb.vc_BSSGP:PROC); + connect(self:SGSN_MGMT, gb.vc_BSSGP_BVC[i]:MGMT); } } @@ -308,7 +313,20 @@ f_vty_transceive(GBPVTY, "enable"); } +type record of integer ro_integer; + +private function ro_integer_contains(ro_integer r, integer x) return boolean { + for (var integer j := 0; j < lengthof(r); j := j+1) { + if (r[j] == x) { + return true; + } + } + return false; +} + function f_init() runs on test_CT { + var ro_integer bvci_unblocked := {}; + var BssgpStatusIndication bsi; var integer i; if (g_initialized == true) { @@ -333,6 +351,53 @@ for (i := 0; i < lengthof(mp_nsconfig_pcu); i := i+1) { f_init_gb_pcu(g_pcu[i], "GbProxy_Test-PCU0", i); } + + /* wait until all BVC are unblocked on both sides */ + timer T := 5.0; + T.start; + alt { + [] SGSN_MGMT.receive(BssgpStatusIndication:{*, ?, BVC_S_UNBLOCKED}) -> value bsi { + bvci_unblocked := bvci_unblocked & { bsi.bvci }; + if (lengthof(bvci_unblocked) != lengthof(g_sgsn[0].cfg.bvc)) { + repeat; + } + } + [] SGSN_MGMT.receive(BssgpStatusIndication:{*, ?, ?}) { + repeat; + } + [] SGSN_MGMT.receive { + setverdict(fail, "Received unexpected message on SGSN_MGMT"); + mtc.stop; + } + + [] PCU_MGMT.receive(BssgpStatusIndication:{*, ?, BVC_S_UNBLOCKED}) -> value bsi { + repeat; + } + [] PCU_MGMT.receive(BssgpStatusIndication:{*, ?, ?}) { + repeat; + } + [] PCU_MGMT.receive(BssgpResetIndication:{0}) { + repeat; + } + [] PCU_MGMT.receive { + setverdict(fail, "Received unexpected message on PCU_MGMT"); + mtc.stop; + } + + [] T.timeout { + setverdict(fail, "Timeout waiting for unblock of all BVCs"); + mtc.stop; + } + } + + /* iterate over list and check all BVCI */ + for (i := 0; i < lengthof(g_sgsn[0].cfg.bvc); i := i+1) { + var BssgpBvci bvci := g_sgsn[0].cfg.bvc[i].bvci; + if (not ro_integer_contains(bvci_unblocked, bvci)) { + setverdict(fail, "BVCI=", bvci, " was not unblocked during start-up"); + mtc.stop; + } + } } function f_cleanup() runs on test_CT { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21170 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: I9c94aa4b4891e8a79bca62f4fd713e4ad50f9424 Gerrit-Change-Number: 21170 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/20201115/94fa78b0/attachment.htm>