fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27986 )
Change subject: BTS_Tests: fix expectations in TC_speech_no_rtp_tch[fh]
......................................................................
BTS_Tests: fix expectations in TC_speech_no_rtp_tch[fh]
On receipt of a FACCH block, trxcon generates not only a DATA.ind,
but also one or two artificial TRAFFIC.ind with BFI. These BFIs
have CRC != 0 indicating their nature, so my initial assumption
about CRC being 0 was incorrect.
Instead of checking CRC, let's count received dummy FACCH frammes.
This patch makes both TC_speech_no_rtp_tch[fh] pass.
Change-Id: Ic680002f60e598cfeeb448c517581b3506355e5b
Related: SYS#5919
Fixes: OS#4823
---
M bts/BTS_Tests.ttcn
1 file changed, 27 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/86/27986/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 06fe43b..4bcb90b 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -7893,10 +7893,12 @@
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
+/* Verify that we get dummy FACCH blocks on Downlink in the absence of RTP frames */
private function f_TC_speech_no_rtp(charstring id) runs on ConnHdlr {
- var template L1ctlDlMessage tr_bad_frame;
+ var integer facch_count := 0;
+ var integer facch_count_exp;
var L1ctlDlMessage l1_dl;
- timer T := 8.0;
+ timer T := 2.0;
f_l1_tune(L1CTL);
RSL.clear;
@@ -7907,27 +7909,40 @@
f_sleep(2.0); /* ... so let's give the L1 some time to stabilize */
L1CTL.clear;
- /* A universal template for bad Downlink frame: {DATA,TRAFFIC}.ind */
- tr_bad_frame := tr_L1CTL_TRAFFIC_IND(g_chan_nr, tr_RslLinkID_DCCH(0));
- tr_bad_frame.header.msg_type := (L1CTL_DATA_IND, L1CTL_TRAFFIC_IND);
- tr_bad_frame.dl_info.fire_crc := (1..255); /* != 0 */
- tr_bad_frame.payload := ?;
-
T.start;
alt {
- /* OS#4823: DATA.ind or TRAFFIC.ind with bad CRC most likely means that
- * the IUT is sending *dummy bursts*, so the L1 fails to decode them. */
- [] L1CTL.receive(tr_bad_frame) -> value l1_dl {
- setverdict(fail, "Received {DATA,TRAFFIC}.ind with bad CRC: ", l1_dl);
+ /* Expect dummy FACCH frames with LAPDm func=UI */
+ [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_DCCH(0))) -> value l1_dl
{
+ var octetstring payload := l1_dl.payload.data_ind.payload;
+ /* XXX: TITAN does not support match(payload, '0303012b?#19'O) */
+ if (substr(payload, 0, 4) != '0303012B'O) {
+ setverdict(fail, "Unexpected FACCH payload := ", payload);
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+ }
+ log("Rx FACCH frame: ", payload);
+ facch_count := facch_count + 1;
+ repeat;
}
[] as_l1_sacch();
[] L1CTL.receive { repeat; }
[] T.timeout {
/* We're done, break the loop */
+ log("Rx ", facch_count, " dummy FACCH blocks");
setverdict(pass);
}
}
+ /* Expect a certain number of FACCH frames depending on the channel rate */
+ if (match(g_chan_nr, t_RslChanNr_Bm(?))) {
+ facch_count_exp := 90; /* ~50 FACCH/F blocks/s, so at least 90 in 2s */
+ } else {
+ facch_count_exp := 40; /* ~25 FACCH/H blocks/s, so at least 40 in 2s */
+ }
+ if (facch_count < facch_count_exp) {
+ setverdict(fail, "Expected at least ", facch_count_exp, " DL FACCH
frames, ",
+ "but received ", facch_count);
+ }
+
f_rsl_chan_deact();
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27986
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: Ic680002f60e598cfeeb448c517581b3506355e5b
Gerrit-Change-Number: 27986
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange