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/.
Stefan Sperling gerrit-no-reply at lists.osmocom.orgStefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/10414 Change subject: update DTX fill frame test expectations ...................................................................... update DTX fill frame test expectations Fix an off-by-one in frame number comparison: Ensure that we won't stop testing until after fn + 104 has been received. The DTX test case would never pass since the alt statement was always repeated even if enough frames had been received. Fix this by moving code which runs before frame fn + 104 is received into an 'else' cause. We receive SACCH frames in DTX mode so we must account for them. Introduce separate counters for SACCH and non-SACCH fill frames to make test failure diagnosis easier. Note that we cannot expect a specific amount of SACCH frames during a particular test run since their amount depends on what the current frame number window happens to be. We can however add the counters for SACCH and non-SACCH fill frames and obtain a meaningful result. Change-Id: Ie573b54ab5654f027c470aa7a565d2b5b97dc74b Related: OS#1950 --- M bts/BTS_Tests.ttcn 1 file changed, 38 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/10414/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 890be91..923a8cc 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3832,7 +3832,9 @@ var octetstring l2_fill_frame_sacch := substr(l2_fill_frame, 0, lengthof(l2_fill_frame) - 2); var GsmFrameNumber first_fn; var boolean is_first_frame := true; - var integer nfill_frames := 0; + var integer nfill_frames_sacch := 0; + var integer nfill_frames_nonsacch := 0; + var integer expected_fill_frames := 10000; /* initial value causes test failure if not overridden */ const integer dtx_tchf_mod := 104; /* Frames numbers (mod 104) for which a fill frame is expected on TCHF if DTX is enabled. */ var Integers required_tdma_frames_dtx_tchf := { 52, 53, 54, 55, 56, 57, 58, 59 }; @@ -3872,32 +3874,47 @@ f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); setverdict(fail, "Received fill frame on non-TCH/F channel; DTX is only allowed on TCH/F!"); } - if (fn >= first_fn + dtx_tchf_mod) { + if (fn > first_fn + dtx_tchf_mod) { T.stop; f_rsl_chan_deact(); f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); - /* With DTX enabled we can expect at least 1 fill frame every 104 frames. */ - if (nfill_frames < 1) { - setverdict(fail); + + /* With DTX enabled we can expect at least 3 fill frames for every 104 frames. + * 2 SACCH, 1 TCH/F */ + expected_fill_frames := 3; + + if (nfill_frames_sacch + nfill_frames_nonsacch < expected_fill_frames) { + log("received only ", nfill_frames_sacch, "+", nfill_frames_nonsacch, + " (SACCH+other) out of ", expected_fill_frames, " expected fill frames"); + setverdict(fail, "Not enough fill frames received"); } else { setverdict(pass); } - } - for (var integer i := 0; i < lengthof(required_tdma_frames_dtx_tchf); i := i + 1) { - if (fn mod dtx_tchf_mod == required_tdma_frames_dtx_tchf[i]) { - nfill_frames := nfill_frames + 1; + } else { + if (dl.dl_info.link_id.c == SACCH) { + nfill_frames_sacch := nfill_frames_sacch + 1; repeat; } + /* On DTX TCH/F channels, fill frames occur only for specific frame numbers mod 104. */ + for (var integer i := 0; i < lengthof(required_tdma_frames_dtx_tchf); i := i + 1) { + if (fn mod dtx_tchf_mod == required_tdma_frames_dtx_tchf[i]) { + nfill_frames_nonsacch := nfill_frames_nonsacch + 1; + repeat; + } + } + log("Received DTX TCH fill frame with bad frame number: ", fn, + " (mod ", dtx_tchf_mod, ": ", fn mod dtx_tchf_mod, ")"); + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + setverdict(fail, "Unexpected L2 fill frame received on Um"); } - log("Received DTX TCH fill frame with bad frame number: ", fn, - " (mod ", dtx_tchf_mod, ": ", fn mod dtx_tchf_mod, ")"); - f_rsl_chan_deact(); - f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); - setverdict(fail, "Unexpected L2 fill frame received on Um"); } else { - nfill_frames := nfill_frames + 1; - if (fn >= first_fn + dtx_tchf_mod) { - var integer expected_fill_frames; + if (dl.dl_info.link_id.c == SACCH) { + nfill_frames_sacch := nfill_frames_sacch + 1; + } else { + nfill_frames_nonsacch := nfill_frames_nonsacch + 1; + } + if (fn > first_fn + dtx_tchf_mod) { T.stop; if (f_g_chan_is_tchf()) { /* Without DTX we can expect 25 fill frames for every 104 frames. @@ -3917,9 +3934,12 @@ f_rsl_chan_deact(); f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); - if (nfill_frames >= expected_fill_frames) { + + if (nfill_frames_sacch + nfill_frames_nonsacch >= expected_fill_frames) { setverdict(pass); } else { + log("received only ", nfill_frames_sacch, "+", nfill_frames_nonsacch, + " (SACCH+other) out of ", expected_fill_frames, " expected fill frames"); setverdict(fail, "Not enough fill frames received"); } } else { -- To view, visit https://gerrit.osmocom.org/10414 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie573b54ab5654f027c470aa7a565d2b5b97dc74b Gerrit-Change-Number: 10414 Gerrit-PatchSet: 1 Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180809/f3689210/attachment.htm>