summaryrefslogtreecommitdiffstats
path: root/bsc/BSC_Tests.ttcn
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-10-09 15:00:37 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-10 14:23:40 +0000
commit4860473c7bceb6cbd8234ef4eecc312b2f5c607f (patch)
treedc826b1e6ef3792a5773e42c58a30007cd5f88d1 /bsc/BSC_Tests.ttcn
parent59c15d67cabbd95dcbbb50c968cbe600f4462f64 (diff)
MSC_ConnectionHandler: Use explicit AoIP flag
Most differences between sccplite and AoIP are visible during the assignment. The current implementation checks for the presence of a CIC in the ASSIGNMENT REQUEST in order to detect if the communication should be modeled by AoIP or sccplite. This method is error prone and does not work very well in situations where only signalling is used, because there in sccplite and AoIP no CIC or AoIP trasp. identifier is present, so there is nothing to check on. To resolve this we need an explicit way to tell the MSC_ConnectionHandler that it has to behave like an AoIP MSC or like an sccplite MSC. - Add an aoip flag to TestHdlrParams - Make sure BSC_Tests.ttcn sets the AoIP depending on mp_bssap_cfg.transport Change-Id: I800249e783deb018d99e81d814843e0574a5c69b Related: OS#3639
Diffstat (limited to 'bsc/BSC_Tests.ttcn')
-rw-r--r--bsc/BSC_Tests.ttcn56
1 files changed, 34 insertions, 22 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 9a85a1f..754f7b3 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -119,6 +119,18 @@ modulepar {
};
}
+private function f_gen_test_hdlr_pars() return TestHdlrParams {
+
+ var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ pars.aoip := true;
+ } else {
+ pars.aoip := false;
+ }
+
+ return pars;
+}
+
private function f_shutdown_helper() runs on test_CT {
all component.stop;
setverdict(pass);
@@ -1571,7 +1583,7 @@ private function f_tc_ciph_mode_a5(charstring id) runs on MSC_ConnHdlr {
}
testcase TC_ciph_mode_a5_0() runs on test_CT {
var MSC_ConnHdlr vc_conn;
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
pars.encr := valueof(t_EncrParams('01'O, f_rnd_octstring(8)));
f_init(1, true);
@@ -1581,7 +1593,7 @@ testcase TC_ciph_mode_a5_0() runs on test_CT {
}
testcase TC_ciph_mode_a5_1() runs on test_CT {
var MSC_ConnHdlr vc_conn;
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
pars.encr := valueof(t_EncrParams('02'O, f_rnd_octstring(8)));
f_init(1, true);
@@ -1591,7 +1603,7 @@ testcase TC_ciph_mode_a5_1() runs on test_CT {
}
testcase TC_ciph_mode_a5_3() runs on test_CT {
var MSC_ConnHdlr vc_conn;
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
pars.encr := valueof(t_EncrParams('08'O, f_rnd_octstring(8)));
f_init(1, true);
@@ -1613,7 +1625,7 @@ private function f_tc_assignment_fr_a5(charstring id) runs on MSC_ConnHdlr {
}
testcase TC_assignment_fr_a5_0() runs on test_CT {
var MSC_ConnHdlr vc_conn;
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
pars.encr := valueof(t_EncrParams('01'O, f_rnd_octstring(8)));
f_init(1, true);
@@ -1623,7 +1635,7 @@ testcase TC_assignment_fr_a5_0() runs on test_CT {
}
testcase TC_assignment_fr_a5_1() runs on test_CT {
var MSC_ConnHdlr vc_conn;
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
pars.encr := valueof(t_EncrParams('02'O, f_rnd_octstring(8)));
f_init(1, true);
@@ -1633,7 +1645,7 @@ testcase TC_assignment_fr_a5_1() runs on test_CT {
}
testcase TC_assignment_fr_a5_3() runs on test_CT {
var MSC_ConnHdlr vc_conn;
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
pars.encr := valueof(t_EncrParams('08'O, f_rnd_octstring(8)));
f_init(1, true);
@@ -1644,7 +1656,7 @@ testcase TC_assignment_fr_a5_3() runs on test_CT {
/* Expect ASSIGNMENT FAIL if mandatory IE is missing */
private function f_tc_assignment_fr_a5_1_codec_missing(charstring id) runs on MSC_ConnHdlr {
- g_pars := valueof(t_def_TestHdlrPars);
+ g_pars := f_gen_test_hdlr_pars();
var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail;
var PDU_BSSAP ass_cmd := f_gen_ass_req();
const OCT8 kc := '0001020304050607'O;
@@ -1665,7 +1677,7 @@ testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT {
}
private function f_tc_assignment_fr_a5_4(charstring id) runs on MSC_ConnHdlr {
- g_pars := valueof(t_def_TestHdlrPars);
+ g_pars := f_gen_test_hdlr_pars();
var template PDU_BSSAP exp_compl := f_gen_exp_compl();
var PDU_BSSAP ass_cmd := f_gen_ass_req();
const OCT8 kc := '0001020304050607'O;
@@ -1689,10 +1701,9 @@ testcase TC_assignment_fr_a5_4() runs on test_CT {
private function f_tc_assignment_sign(charstring id) runs on MSC_ConnHdlr {
- g_pars := valueof(t_def_TestHdlrPars);
+ g_pars := f_gen_test_hdlr_pars();
var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, omit);
- var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, omit));
-
+ var PDU_BSSAP ass_cmd := f_gen_ass_req();
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeSIGNAL);
f_establish_fully(ass_cmd, exp_compl);
}
@@ -1886,7 +1897,7 @@ private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
}
testcase TC_assignment_codec_fr() runs on test_CT {
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
var MSC_ConnHdlr vc_conn;
f_init(1, true);
@@ -1898,7 +1909,7 @@ testcase TC_assignment_codec_fr() runs on test_CT {
}
testcase TC_assignment_codec_hr() runs on test_CT {
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
var MSC_ConnHdlr vc_conn;
f_init(1, true);
@@ -1910,7 +1921,7 @@ testcase TC_assignment_codec_hr() runs on test_CT {
}
testcase TC_assignment_codec_efr() runs on test_CT {
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
var MSC_ConnHdlr vc_conn;
f_init(1, true);
@@ -1922,7 +1933,7 @@ testcase TC_assignment_codec_efr() runs on test_CT {
}
testcase TC_assignment_codec_amr_f() runs on test_CT {
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
var MSC_ConnHdlr vc_conn;
/* Note: This setups the codec configuration. The parameter payload in
@@ -1948,7 +1959,7 @@ testcase TC_assignment_codec_amr_f() runs on test_CT {
}
testcase TC_assignment_codec_amr_h() runs on test_CT {
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
var MSC_ConnHdlr vc_conn;
/* See note above */
@@ -1975,7 +1986,8 @@ testcase TC_assignment_codec_amr_h() runs on test_CT {
* a) BSSMAP Classmark Request should result in RR CLASSMARK ENQUIRY,
* b) L3 RR CLASSMARK CHANGE should result in BSSMAP CLASSMARK UPDATE */
private function f_tc_classmark(charstring id) runs on MSC_ConnHdlr {
- g_pars := valueof(t_def_TestHdlrPars);
+ g_pars := f_gen_test_hdlr_pars();
+
f_create_chan_and_exp();
/* we should now have a COMPL_L3 at the MSC */
BSSAP.receive(tr_BSSMAP_ComplL3);
@@ -1996,7 +2008,7 @@ testcase TC_classmark() runs on test_CT {
}
private function f_est_single_l3(template PDU_ML3_MS_NW l3) runs on MSC_ConnHdlr {
- g_pars := valueof(t_def_TestHdlrPars);
+ g_pars := f_gen_test_hdlr_pars();
f_create_chan_and_exp();
/* we should now have a COMPL_L3 at the MSC */
BSSAP.receive(tr_BSSMAP_ComplL3);
@@ -2064,7 +2076,7 @@ testcase TC_unsol_ho_fail() runs on test_CT {
/* short message from MS should be ignored */
private function f_tc_err_82_short_msg(charstring id) runs on MSC_ConnHdlr {
- g_pars := valueof(t_def_TestHdlrPars);
+ g_pars := f_gen_test_hdlr_pars();
f_create_chan_and_exp();
/* we should now have a COMPL_L3 at the MSC */
BSSAP.receive(tr_BSSMAP_ComplL3);
@@ -2146,7 +2158,7 @@ runs on MSC_ConnHdlr {
/* intra-BSC hand-over between BTS0 and BTS1 */
private function f_tc_ho_int(charstring id) runs on MSC_ConnHdlr {
- g_pars := valueof(t_def_TestHdlrPars);
+ g_pars := f_gen_test_hdlr_pars();
var template PDU_BSSAP exp_compl := f_gen_exp_compl();
var PDU_BSSAP ass_cmd := f_gen_ass_req();
const OCT8 kc := '0001020304050607'O;
@@ -2189,7 +2201,7 @@ testcase TC_ho_int() runs on test_CT {
}
private function f_tc_ho_out_of_this_bsc(charstring id) runs on MSC_ConnHdlr {
- g_pars := valueof(t_def_TestHdlrPars);
+ g_pars := f_gen_test_hdlr_pars();
var PDU_BSSAP ass_req := f_gen_ass_req();
ass_req.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
@@ -2327,7 +2339,7 @@ private function f_tc_ho_into_this_bsc(charstring id) runs on MSC_ConnHdlr {
}
testcase TC_ho_into_this_bsc() runs on test_CT {
var MSC_ConnHdlr vc_conn;
- var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
f_init(1, true);
f_sleep(1.0);