fixeria submitted this change.

View Change

Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
BSC_Tests: fix a race condition in TC_imm_ass_pre_[ts,chan]_ack

These test cases sporadically fail on Jenkins and 9/10 times on my
machine. The problem appears to be that we are sending both the
RSL CHANnel ReQuireD and the VTY command simultaneously, and the
later may be handled earlier than the former by osmo-bsc.

Ensure that the RSL message is handled first by sending the VTY
command after we have received the RSL CHANnel ACTivation message.

Change-Id: I38cd31041741b69eb15098a089b4d4b6b918ffd4
---
M bsc/BSC_Tests.ttcn
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index feb8bfb..2e804e1 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -10902,9 +10902,6 @@
var uint8_t ra := 2;
f_ipa_tx(0, ts_RSL_CHAN_RQD(int2oct(ra, 1), fn));

- /* (set bts 0 cfg back to default) */
- f_vty_set_imm_ass(BSCVTY);
-
chan_act := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
var RslChannelNr chan_nr := chan_act.ies[0].body.chan_nr;
var DchanTuple dt;
@@ -10915,6 +10912,9 @@
mtc.stop;
}

+ /* (set bts 0 cfg back to default) */
+ f_vty_set_imm_ass(BSCVTY);
+
/* *FIRST* expect the Immediate Assignment, before we ACK the chan act */
imm_ass := f_exp_ipa_rx(0, tr_RSL_IMM_ASSIGN(0));
f_verify_imm_ass(imm_ass, ra, fn, chan_nr, chan_ident_ie.chan_ident.ch_desc.v.arfcn,
@@ -10951,9 +10951,6 @@
var uint8_t ra := 2;
f_ipa_tx(0, ts_RSL_CHAN_RQD(int2oct(ra, 1), fn));

- /* (set bts 0 cfg back to default) */
- f_vty_set_imm_ass(BSCVTY);
-
chan_act := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
var RslChannelNr chan_nr := chan_act.ies[0].body.chan_nr;
var DchanTuple dt;
@@ -10964,6 +10961,9 @@
mtc.stop;
}

+ /* (set bts 0 cfg back to default) */
+ f_vty_set_imm_ass(BSCVTY);
+
/* *FIRST* expect the Immediate Assignment, before we ACK the chan act */
imm_ass := f_exp_ipa_rx(0, tr_RSL_IMM_ASSIGN(0));
f_verify_imm_ass(imm_ass, ra, fn, chan_nr, chan_ident_ie.chan_ident.ch_desc.v.arfcn,

To view, visit change 28220. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I38cd31041741b69eb15098a089b4d4b6b918ffd4
Gerrit-Change-Number: 28220
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged