neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24562 )


Change subject: MSC_ConnectionHandler: fix race in f_create_chan_and_exp()
......................................................................

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
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/62/24562/1

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 37adc18..ec90abe 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -635,9 +635,9 @@
        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);

-       /* 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);
+       /* 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, 
tsc);
 }

 function f_rsl_send_l3(template PDU_ML3_MS_NW l3, template (omit) RslLinkId 
link_id := omit,

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24562
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1d4af737dcc0f9c9fa6cdaff3a92813d532e730c
Gerrit-Change-Number: 24562
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to