aboutsummaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-01-03 17:05:27 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2023-01-03 17:05:27 +0100
commit39bd33c72c796beb07e6d8c02719eb01f0bbeef8 (patch)
treef37e70a8ee425cd985148524da731e581030786d /bsc
parent3560979cf831dc9a2110078a3618f7807e2ed395 (diff)
bsc: Move BSSAP handling of emergency call to helper function
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests.ttcn58
1 files changed, 14 insertions, 44 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 469d7b66..45c319d0 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -9156,15 +9156,13 @@ private function f_assignment_emerg_setup() runs on MSC_ConnHdlr {
RSL.send(emerg_setup_data_ind);
}
-/* Test if the EMERGENCY SETUP gets passed on to the MSC via A when EMERGENCY
- * CALLS are permitted by the BSC config. */
-private function f_TC_assignment_emerg_setup_allow(charstring id) runs on MSC_ConnHdlr {
+/* expect EmergencySetup on BSSAP after calling f_assignment_emerg_setup() */
+private function f_assignment_emerg_setup_exp_bssap()
+runs on MSC_ConnHdlr {
var PDU_BSSAP emerg_setup_data_ind_bssap;
var PDU_ML3_MS_NW emerg_setup;
timer T := 3.0;
- f_assignment_emerg_setup()
-
T.start;
alt {
[] BSSAP.receive(tr_BSSAP_DTAP) -> value emerg_setup_data_ind_bssap {
@@ -9180,6 +9178,14 @@ private function f_TC_assignment_emerg_setup_allow(charstring id) runs on MSC_Co
setverdict(fail, "timout waiting for EMERGENCY SETUP!");
}
}
+}
+
+/* Test if the EMERGENCY SETUP gets passed on to the MSC via A when EMERGENCY
+ * CALLS are permitted by the BSC config. */
+private function f_TC_assignment_emerg_setup_allow(charstring id) runs on MSC_ConnHdlr {
+
+ f_assignment_emerg_setup();
+ f_assignment_emerg_setup_exp_bssap();
setverdict(pass);
f_perform_clear();
@@ -9191,7 +9197,7 @@ private function f_TC_assignment_emerg_setup_deny(charstring id) runs on MSC_Con
var PDU_BSSAP emerg_setup_data_ind_bssap;
timer T := 3.0;
- f_assignment_emerg_setup()
+ f_assignment_emerg_setup();
T.start;
alt {
@@ -10468,25 +10474,7 @@ private function f_tc_emerg_call_and_lcs_loc_req(charstring id) runs on MSC_Conn
* another lchan. */
g_pars.ra := f_rnd_ra_emerg();
f_assignment_emerg_setup();
-
- var PDU_BSSAP emerg_setup_data_ind_bssap;
- timer T := 3.0;
- T.start;
- alt {
- [] BSSAP.receive(tr_BSSAP_DTAP) -> value emerg_setup_data_ind_bssap {
- var PDU_ML3_MS_NW verify_emerg_setup;
- verify_emerg_setup := dec_PDU_ML3_MS_NW(emerg_setup_data_ind_bssap.pdu.dtap);
- if (not isbound(verify_emerg_setup.msgs.cc.emergencySetup)) {
- setverdict(fail, "no emergency setup");
- }
- }
- [] BSSAP.receive {
- setverdict(fail, "unexpected BSSAP message!");
- }
- [] T.timeout {
- setverdict(fail, "timeout waiting for EMERGENCY SETUP!");
- }
- }
+ f_assignment_emerg_setup_exp_bssap();
/* Here would usually be a CC Call Proceeding from the MSC, but what does the BSC care about DTAP. */
@@ -10576,25 +10564,7 @@ private function f_emerg_call_and_lcs_loc_req_early_lchan_release(RslRel rsl_rel
{
g_pars.ra := f_rnd_ra_emerg();
f_assignment_emerg_setup();
-
- var PDU_BSSAP emerg_setup_data_ind_bssap;
- timer T := 3.0;
- T.start;
- alt {
- [] BSSAP.receive(tr_BSSAP_DTAP) -> value emerg_setup_data_ind_bssap {
- var PDU_ML3_MS_NW verify_emerg_setup;
- verify_emerg_setup := dec_PDU_ML3_MS_NW(emerg_setup_data_ind_bssap.pdu.dtap);
- if (not ischosen(verify_emerg_setup.msgs.cc.emergencySetup)) {
- setverdict(fail, "no emergency setup");
- }
- }
- [] BSSAP.receive {
- setverdict(fail, "unexpected BSSAP message!");
- }
- [] T.timeout {
- setverdict(fail, "timeout waiting for EMERGENCY SETUP!");
- }
- }
+ f_assignment_emerg_setup_exp_bssap();
/* Start a Location Request to locate the emergency */
f_bssap_le_register_imsi(g_pars.imsi, omit);