diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-03-09 17:03:49 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-12 14:28:41 +0000 |
commit | 8fe9eba3eb5636b233bedbb3c9998604a60d4556 (patch) | |
tree | 726d7b107039baf7d8286ec252741d08ae36793a | |
parent | 344c0cf6cf1593495efbbd4575417391c72e6e1a (diff) |
L1CTL: Try FBSB up to 10 times in f_L1CTL_FBSB()
For some reason, even with a perfectly valid/strong signal, the FBSB
task sometimes fails in the firmware. Let's wrap a loop around
it and try up to 10 times before failing the test.
Change-Id: I2262278dcd7e2f0cf4d293e0549527866522bece
-rw-r--r-- | library/L1CTL_PortType.ttcn | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index 4dcacb8f..f241c393 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -35,15 +35,18 @@ module L1CTL_PortType { function f_L1CTL_FBSB(L1CTL_PT pt, Arfcn arfcn, L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED) { timer T := 5.0; - pt.send(t_L1CTL_FBSB_REQ(arfcn, t_L1CTL_FBSB_F_ALL, 0, ccch_mode, 0)); - T.start - alt { - [] pt.receive(t_L1CTL_FBSB_CONF(0)) {}; - [] pt.receive(t_L1CTL_FBSB_CONF(?)) { + for (var integer i := 0; i < 10; i := i+1) { + pt.send(t_L1CTL_FBSB_REQ(arfcn, t_L1CTL_FBSB_F_ALL, 0, ccch_mode, 63)); + T.start + alt { + [] pt.receive(t_L1CTL_FBSB_CONF(0)) { return; }; + [] pt.receive(t_L1CTL_FBSB_CONF(?)) { } + [i == 9] pt.receive(t_L1CTL_FBSB_CONF(?)) { setverdict(fail, "FBSB Failed with non-zero return code"); }; [] pt.receive { repeat; }; [] T.timeout { setverdict(fail, "Timeout in FBSB") }; + } } } |