osmith has uploaded this change for review.
bsc: TC_lcs_loc_req_without_smlc: new test
Related: SYS#7714
Depends: osmo-bsc Ie8a66f9decf9fff602f7fecfb71a78fab900066f
Change-Id: I1cd7a7658b21d3eb04443a15ffd5ddf09b466af5
---
M bsc/BSC_Tests.ttcn
M library/Osmocom_VTY_Functions.ttcn
2 files changed, 41 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/41288/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 156c8ef..dc59fcb 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -9492,6 +9492,18 @@
f_vty_transceive(BSCVTY, "exit");
}
+/* Enable/Disable SMLC via VTY */
+private function f_vty_enable_smlc(boolean enable) runs on test_CT {
+ f_vty_enter_cfg_smlc(BSCVTY);
+ if (enable) {
+ f_vty_transceive(BSCVTY, "enable");
+ } else {
+ f_vty_transceive(BSCVTY, "no enable");
+ }
+ f_vty_transceive(BSCVTY, "exit");
+ f_vty_transceive(BSCVTY, "exit");
+}
+
/* Begin assignment procedure and send an EMERGENCY SETUP (RR) */
private function f_assignment_emerg_setup() runs on MSC_ConnHdlr {
var PDU_ML3_MS_NW emerg_setup;
@@ -11014,6 +11026,24 @@
f_shutdown_helper();
}
+/* Ensure that Location Requests from MSC without SMLC configured lead to a
+ * proper error towards the MSC (SYS#7714) */
+private function f_tc_lcs_loc_req_without_smlc(charstring id) runs on MSC_ConnHdlr {
+ f_lcs_loc_req_for_active_ms(false);
+}
+testcase TC_lcs_loc_req_without_smlc() runs on test_CT {
+ var MSC_ConnHdlr vc_conn;
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
+
+ f_init(1, true);
+ f_vty_enable_smlc(false);
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_tc_lcs_loc_req_without_smlc), pars);
+ vc_conn.done;
+ f_vty_enable_smlc(true);
+ f_shutdown_helper();
+}
+
/* Attempt Complete Layer 3 without any MSC available (OS#4832) */
private function f_tc_no_msc(charstring id) runs on MSC_ConnHdlr {
f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR);
@@ -12976,6 +13006,12 @@
execute( TC_emerg_call_and_lcs_loc_req() );
execute( TC_emerg_call_and_lcs_loc_req_early_lchan_rel_ind() );
execute( TC_emerg_call_and_lcs_loc_req_early_lchan_conn_fail() );
+
+ /* Remove "is nightly" check after osmo-bsc > 1.13 is released
+ * with Ie8a66f9decf9fff602f7fecfb71a78fab900066f */
+ if (Misc_Helpers.f_osmo_repo_is("nightly")) {
+ execute( TC_lcs_loc_req_without_smlc() );
+ }
}
execute( TC_no_msc() );
diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn
index dc87131..7dd5c59 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -154,6 +154,11 @@
f_vty_transceive(pt, "cs7 instance " & int2str(cs7_inst));
}
+function f_vty_enter_cfg_smlc(TELNETasp_PT pt) {
+ f_vty_enter_config(pt);
+ f_vty_transceive(pt, "smlc");
+}
+
type record of charstring rof_charstring;
function f_vty_config3(TELNETasp_PT pt, rof_charstring config_nodes, rof_charstring cmds)
{
To view, visit change 41288. To unsubscribe, or for help writing mail filters, visit settings.