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
changes/86/27286/2
Daniel Willmann 9 months ago committed by daniel
parent 9e789bec1b
commit 0886215539
  1. 36
      msc/MSC_Tests.ttcn

@ -304,6 +304,25 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr
testcase.stop("excess number of BSC instances requested");
}
f_ipa_ctrl_start_client(mp_msc_ip, mp_msc_ctrl_port);
map(self:MSCVTY, system:MSCVTY);
f_vty_set_prompts(MSCVTY);
f_vty_transceive(MSCVTY, "enable");
/* set some defaults */
f_vty_config(MSCVTY, "network", "authentication optional");
f_vty_config(MSCVTY, "msc", "assign-tmsi");
f_vty_config(MSCVTY, "msc", "check-imei-rqd 0");
f_vty_config(MSCVTY, "network", "encryption a5 0");
f_vty_config(MSCVTY, "cs7 instance 0", "sccp-timer ias " & int2str(g_msc_sccp_timer_ias));
f_vty_config(MSCVTY, "cs7 instance 0", "sccp-timer iar " & int2str(g_msc_sccp_timer_iar));
if (osmux) {
f_vty_config(MSCVTY, "msc", "osmux on");
} 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;
@ -315,7 +334,6 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr
}
}
f_ipa_ctrl_start_client(mp_msc_ip, mp_msc_ctrl_port);
f_init_mncc("MSC_Test");
f_init_mgcp("MSC_Test");
@ -328,22 +346,6 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr
f_init_sgsap("MSC_Test");
}
map(self:MSCVTY, system:MSCVTY);
f_vty_set_prompts(MSCVTY);
f_vty_transceive(MSCVTY, "enable");
/* set some defaults */
f_vty_config(MSCVTY, "network", "authentication optional");
f_vty_config(MSCVTY, "msc", "assign-tmsi");
f_vty_config(MSCVTY, "msc", "check-imei-rqd 0");
f_vty_config(MSCVTY, "network", "encryption a5 0");
f_vty_config(MSCVTY, "cs7 instance 0", "sccp-timer ias " & int2str(g_msc_sccp_timer_ias));
f_vty_config(MSCVTY, "cs7 instance 0", "sccp-timer iar " & int2str(g_msc_sccp_timer_iar));
if (osmux) {
f_vty_config(MSCVTY, "msc", "osmux on");
} else {
f_vty_config(MSCVTY, "msc", "osmux off");
}
}
/* Initialize for a direct connection to BSSAP. This function is an alternative

Loading…
Cancel
Save