pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41782?usp=email )


Change subject: bts: TC_pcu_{rts_req,time_ind}: process FNs in port queue after 
time out
......................................................................

bts: TC_pcu_{rts_req,time_ind}: process FNs in port queue after time out

Since we sometimes run short on counted FNs, but we validate that there
were no FN gaps, it means we are simply late counting the generated
RTS.req from IUT. Let's try to get a more accurate count by trying to
process RTS.req in the port queue after the timeframe of the test
finishes. In the end, we want to count the RTS.req transmitted by the
IUT, not the ones we can receive in time.

Change-Id: Iacd4eafbdb42207465ac0c5e03492c460280ecf7
---
M bts/BTS_Tests.ttcn
1 file changed, 20 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/82/41782/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 592e58f..bf59eb8 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -6062,6 +6062,7 @@
        var float test_duration := 5.0;
        var PCUIF_Message msg;
        timer T;
+       timer Tcountremaining;

        f_init_with_pcuif();
        f_TC_pcu_act_req(0, 0, 7, true);
@@ -6084,7 +6085,15 @@
        [] PCU.receive {
                repeat;
                }
-       [] T.timeout {}
+       [] T.timeout {
+               /* Disable new incoming elements; but current queue elements 
are still processed.
+                * This way we get a more accurate count of TIME_IND submitted 
by IUT during the specified time. */
+               PCU.halt;
+               log("Finish processing remaining queued messages");
+               Tcountremaining.start(1.0);
+               repeat;
+               }
+       [] Tcountremaining.timeout { }
        }
        var integer fn_expired := last_fn - first_fn;
        log(fn_expired, " fn expired with ", num_time_ind, " PCU_TIME.ind");
@@ -6117,6 +6126,7 @@
        var float test_duration := 5.0;
        var PCUIF_Message msg;
        timer T;
+       timer Tcountremaining;

        f_init_with_pcuif();
        f_TC_pcu_act_req(0, 0, 7, true);
@@ -6163,7 +6173,15 @@
        [] PCU.receive {
                repeat;
                }
-       [] T.timeout {}
+       [] T.timeout {
+               /* Disable new incoming elements; but current queue elements 
are still processed.
+                * This way we get a more accurate count of RTS.req submitted 
by IUT during the specified time. */
+               PCU.halt;
+               log("Finish processing remaining queued messages");
+               Tcountremaining.start(1.0);
+               repeat;
+               }
+       [] Tcountremaining.timeout { }
        }
        var integer fn_expired := f_max(pdtch_last_fn, ptcch_last_fn) - 
f_min(pdtch_first_fn, ptcch_first_fn);
        log(fn_expired, " fn expired with num_rts_pdtch=", num_rts_pdtch, ", 
num_rts_ptcch=", num_rts_ptcch);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41782?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iacd4eafbdb42207465ac0c5e03492c460280ecf7
Gerrit-Change-Number: 41782
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to