From 5f6dd352ea7dfcc49315f3ba30101c2f17be318b Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Wed, 24 Aug 2022 03:08:32 +0700 Subject: [PATCH] BSC_Tests: fix race conditions in TC_chan_alloc_algo_ass_dynamic In cases a), b), c), d), and e) we're sending one or more Measurement Reports via the A-bis/RSL, and then immediately triggering a traffic channel assignment by calling f_TC_chan_alloc_algo(), which sends an Assignment Request via the A interface. The above-mentioned messages are sent immediately all together, so it may happen that the BSC handles the Assignment Request earlier than the Measurement Report(s). In this case there will be no RxLev samples, so the BSC would fall-back to ascending allocation order. Recently we saw this race condition actually happening on Jenkins: https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test-sccplite/1583/ Let's introduce an artificial delay before sending the Assignment Request, so that the BSC has enough time to process received MRs. Change-Id: I2fd6508488e935d208a7aba8e2f215b1cc14ad32 --- bsc/BSC_Tests.ttcn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 7f4ce464a..09cd71707 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -11666,6 +11666,7 @@ testcase TC_chan_alloc_algo_ass_dynamic() runs on test_CT { f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 0, ts_RSL_IE_UplinkMeas(30, 0), ts_RSL_IE_BS_Power(0)), TRX0); + f_sleep(0.3); /* give the IUT some time to process sent MRs */ f_TC_chan_alloc_algo(dt, TRX0); f_perform_clear_test_ct(dt); @@ -11677,6 +11678,7 @@ testcase TC_chan_alloc_algo_ass_dynamic() runs on test_CT { f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 1, ts_RSL_IE_UplinkMeas(48, 0), ts_RSL_IE_BS_Power(0)), TRX0); + f_sleep(0.3); /* give the IUT some time to process sent MRs */ f_TC_chan_alloc_algo(dt, TRX0); f_perform_clear_test_ct(dt); @@ -11688,6 +11690,7 @@ testcase TC_chan_alloc_algo_ass_dynamic() runs on test_CT { f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 1, ts_RSL_IE_UplinkMeas(58, 0), ts_RSL_IE_BS_Power(0)), TRX0); + f_sleep(0.3); /* give the IUT some time to process sent MRs */ f_TC_chan_alloc_algo(dt, TRX3); f_perform_clear_test_ct(dt); @@ -11703,6 +11706,7 @@ testcase TC_chan_alloc_algo_ass_dynamic() runs on test_CT { f_ipa_tx(ts_RSL_MEAS_RES_EMPTY(dt.rsl_chan_nr, 1, ts_RSL_IE_UplinkMeas(58, 0), ts_RSL_IE_BS_Power(0)), TRX0); + f_sleep(0.3); /* give the IUT some time to process sent MRs */ f_TC_chan_alloc_algo(dt, TRX0); f_perform_clear_test_ct(dt);