fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29202 )
Change subject: BSC_Tests: fix race conditions in TC_chan_alloc_algo_ass_dynamic ......................................................................
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/1...
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 --- M bsc/BSC_Tests.ttcn 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 7f4ce46..09cd717 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -11666,6 +11666,7 @@ 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 @@ 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 @@ 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 @@ 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);