laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41288?usp=email )

Change subject: bsc: TC_lcs_loc_req_without_smlc: new test
......................................................................

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, 56 insertions(+), 0 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 156c8ef..ef3867b 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,39 @@
        f_shutdown_helper();
 }

+/* Ensure that Location Requests from MSC without SMLC configured lead to an
+ * error towards the MSC (SYS#7714) */
+private function f_tc_lcs_loc_req_without_smlc(charstring id) runs on 
MSC_ConnHdlr {
+       f_sleep(1.0);
+
+       f_establish_fully(omit, omit);
+       f_bssap_le_register_imsi(g_pars.imsi, omit);
+
+       
BSSAP.send(valueof(ts_BSSMAP_Perform_Location_Request(ts_BSSMAP_Imsi(g_pars.imsi),
+                                       ts_CellId_CGI('262'H, '42'H, 23, 42))));
+
+       BSSAP.receive(tr_BSSMAP_Perform_Location_Response(
+                       locationEstimate := omit, positioningData := omit,
+                       lCS_Cause := 
tr_BSSMAP_LcsCause(BSSMAP_LCS_CAUSE_SYSTEM_FAILURE)));
+
+       f_perform_clear();
+
+       f_sleep(2.0);
+       setverdict(pass);
+}
+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 +13021,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 https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41288?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1cd7a7658b21d3eb04443a15ffd5ddf09b466af5
Gerrit-Change-Number: 41288
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>

Reply via email to