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/+/22659 ) Change subject: fr: Don't wait indefinitely, but wait until all UE components terminate ...................................................................... fr: Don't wait indefinitely, but wait until all UE components terminate Change-Id: Ifdf9c7fb625ccdb467b3b87f79431da18fea5f2e --- M fr/FR_Tests.ttcn 1 file changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/22659/1 diff --git a/fr/FR_Tests.ttcn b/fr/FR_Tests.ttcn index f3652a3..973f262 100644 --- a/fr/FR_Tests.ttcn +++ b/fr/FR_Tests.ttcn @@ -85,6 +85,7 @@ timer g_Tguard; var LLC_Entities llc; } +type record of UE_CT ro_ue; type record UE_Pars { hexstring imsi, @@ -120,7 +121,7 @@ } function f_start_ue(void_fn fn, charstring id, GbInstance gb, integer imsi_suffix, BSSGP_BVC_CT bvc_comp, float t_guard := 30.0) -runs on test_CT +runs on test_CT return UE_CT { var UE_CT ue_comp; var UE_Pars ue_pars := { @@ -133,10 +134,13 @@ connect(ue_comp:BSSGP_SIG[0], bvc_comp:BSSGP_SP_SIG); connect(ue_comp:BSSGP_PROC[0], bvc_comp:BSSGP_PROC); ue_comp.start(f_handler_init(fn, id, ue_pars)); + + return ue_comp; } testcase TC_foo() runs on test_CT { + var ro_ue ues := {}; for (var integer i := 0; i < lengthof(mp_nsconfig); i := i+1) { g_gb[i].cfg := { @@ -151,20 +155,26 @@ log("Initializing Gb interface ", i, ": NSEI=", g_gb[i].cfg.nsei); f_init_gb(g_gb[i], "gb", i); } + for (var integer i := 0; i < lengthof(mp_nsconfig); i := i+1) { for (var integer j := 0; j < mp_num_bvc; j := j+1) { var BSSGP_BVC_CT bvc_comp := f_bssgp_get_bvci_ct(g_gb[i].cfg.bvc[j].bvci, BSSGP_PROC[i]); for (var integer k := 0; k < mp_num_ue_in_bvc; k := k+1) { var charstring id := "gb" & int2str(i) & "-bvc" & int2str(g_gb[i].cfg.bvc[j].bvci) & "-UEsim" & int2str(k); - f_start_ue(refers(f_ul_ud), id, g_gb[i], i*10000+j*100+k, bvc_comp); + var UE_CT ue; + ue := f_start_ue(refers(f_ul_ud), id, g_gb[i], i*10000+j*100+k, bvc_comp); + ues := ues & { ue }; /* a bit of staggering to ensure the timers above don't run all at the same time */ f_sleep(0.05); } } } - while (true) { - f_sleep(100.0); + + /* wait for all UE components to terminate */ + for (var integer i := 0; i < lengthof(ues); i := i + 1) { + ues[i].done; } + setverdict(pass); } control { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22659 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: Ifdf9c7fb625ccdb467b3b87f79431da18fea5f2e Gerrit-Change-Number: 22659 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/20210203/64cff5c2/attachment.htm>