daniel has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27286 )

Change subject: msc: Avoid race condition when setting osmux options via VTY
......................................................................

msc: Avoid race condition when setting osmux options via VTY

If the RAN_Emulation is started before the VTY reconfiguration we could
get a BSSMAP Reset/ResetAck with Osmux support advertised even though
the test expects it to be disabled (or vice versa).

Do the VTY configuration before starting the RAN_Emulation.

Fixes sporadic/load-related TTCN3 failures with message
"BSSMAP: Timeout waiting for RESET-ACK after sending RESET"
(e.g. TC_iu_and_mt_call_osmux, TC_iu_and_mo_sms in run +1567)

Change-Id: Ife23f70c6523034f3c3c53b6c1c81428566fd43e
---
M msc/MSC_Tests.ttcn
1 file changed, 24 insertions(+), 22 deletions(-)

Approvals:
  lynxis lazus: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index db96d60..dd31daf 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -304,29 +304,7 @@
                testcase.stop("excess number of BSC instances requested");
        }

-       for (var integer i := 0; i < num_bsc; i := i + 1) {
-               if (isbound(mp_bssap_cfg[i])) {
-                       var RanOps ranops := BSC_RanOps;
-                       ranops.use_osmux := osmux;
-                       f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], 
"MSC_Test_" & int2str(i), ranops);
-                       f_ran_adapter_start(g_bssap[i]);
-               } else {
-                       testcase.stop("missing BSSAP configuration");
-               }
-       }
-
        f_ipa_ctrl_start_client(mp_msc_ip, mp_msc_ctrl_port);
-       f_init_mncc("MSC_Test");
-       f_init_mgcp("MSC_Test");
-
-       if (gsup == true) {
-               f_init_gsup("MSC_Test");
-       }
-       f_init_smpp("MSC_Test");
-
-       if (sgsap == true) {
-               f_init_sgsap("MSC_Test");
-       }

        map(self:MSCVTY, system:MSCVTY);
        f_vty_set_prompts(MSCVTY);
@@ -344,6 +322,30 @@
        } else {
                f_vty_config(MSCVTY, "msc", "osmux off");
        }
+
+       for (var integer i := 0; i < num_bsc; i := i + 1) {
+               if (isbound(mp_bssap_cfg[i])) {
+                       var RanOps ranops := BSC_RanOps;
+                       ranops.use_osmux := osmux;
+                       f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], 
"MSC_Test_" & int2str(i), ranops);
+                       f_ran_adapter_start(g_bssap[i]);
+               } else {
+                       testcase.stop("missing BSSAP configuration");
+               }
+       }
+
+       f_init_mncc("MSC_Test");
+       f_init_mgcp("MSC_Test");
+
+       if (gsup == true) {
+               f_init_gsup("MSC_Test");
+       }
+       f_init_smpp("MSC_Test");
+
+       if (sgsap == true) {
+               f_init_sgsap("MSC_Test");
+       }
+
 }

 /* Initialize for a direct connection to BSSAP. This function is an alternative

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27286
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: Ife23f70c6523034f3c3c53b6c1c81428566fd43e
Gerrit-Change-Number: 27286
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: lynxis lazus <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to