From 69170519b05cc07fbda28c585ca976f444024e10 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 3 Jun 2022 01:49:42 +0600 Subject: [PATCH] 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 --- bsc/BSC_Tests.ttcn | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index feb8bfb3b..2e804e1ec 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -10902,9 +10902,6 @@ testcase TC_imm_ass_pre_chan_ack() runs on test_CT { 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 @@ testcase TC_imm_ass_pre_chan_ack() runs on test_CT { 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 @@ testcase TC_imm_ass_pre_ts_ack() runs on test_CT { 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 @@ testcase TC_imm_ass_pre_ts_ack() runs on test_CT { 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,