MSC_ConnectionHandler: fix race in f_create_chan_and_exp()

During f_create_chan_and_exp() (part of f_establish_fully()), announce
the BSSAP L3 expectation before activating the lchan.

In RSL_Emulation f_chan_est(), we go through Chan Request, Channel Act
and Immediate Assignment followed by EST IND. Right after that, osmo-bsc
sends a Complete Layer 3 on BSSAP. But in f_create_chan_and_exp(), we
only create the expectation of the BSSAP right after the call to
f_chan_est(), i.e. only after sending the EST IND. So far it was always
juuust in time to work, but when I added a little check to the end of
f_chan_est(), or alternatively an f_sleep(0.2), then BSC tests always
fail with:

Test case TC_reassignment_fr finished. Verdict: fail reason: Couldn't find Expect for incoming connection { [...] pdu := { bssmap := { completeLayer3Information... }

With the BSSAP expectation done first, this error is avoided.

Change-Id: I1d4af737dcc0f9c9fa6cdaff3a92813d532e730c
This commit is contained in:
Neels Hofmeyr 2021-06-04 22:46:06 +02:00
parent 54ebb4a27a
commit d601f9c0d6
1 changed files with 1 additions and 1 deletions

View File

@ -635,9 +635,9 @@ function f_create_chan_and_exp() runs on MSC_ConnHdlr {
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));
var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info);
f_create_bssmap_exp(l3_enc);
/* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */
RSL_Emulation.f_chan_est(g_pars.ra, l3_enc, g_pars.link_id, g_pars.fn);
f_create_bssmap_exp(l3_enc);
}
function f_rsl_send_l3(template PDU_ML3_MS_NW l3, template (omit) RslLinkId link_id := omit,