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
This commit is contained in:
Daniel Willmann 2022-02-22 13:21:49 +01:00 committed by daniel
parent 9e789bec1b
commit 0886215539
1 changed files with 24 additions and 22 deletions

View File

@ -304,29 +304,7 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr
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 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr
} 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