summaryrefslogtreecommitdiffstats
path: root/msc/MSC_Tests.ttcn
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-09-03 16:46:02 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-09-09 12:48:32 +0200
commit833174e7fbefd034b440a59b9bc3eda7a386fb84 (patch)
tree5739f4b415e256e0ea9ac8fc5a8bd5bfc8c648b3 /msc/MSC_Tests.ttcn
parent078666329d111ed3825c72b4f3a2a1554fb8ea09 (diff)
msc: Introduce tests to verify BSSAP and MGCP handling with IPv6
It tests IPv6 Transport Address are passed correctly through BSSAP, and forwards handles them correctly as an MGCP client too. Change-Id: Id616926dd4a9febc4268eea2ee1e377b2d22753a
Diffstat (limited to 'msc/MSC_Tests.ttcn')
-rw-r--r--msc/MSC_Tests.ttcn92
1 files changed, 86 insertions, 6 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 2a9b23a..6cb852a 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -408,6 +408,7 @@ runs on MTC_CT return BSC_ConnHdlrPars {
use_umts_aka := false,
ran_is_geran := ran_is_geran,
use_osmux := use_osmux,
+ use_ipv6 := false,
verify_cell_id := mp_enable_cell_id_test and verify_cell_id
};
if (not ran_is_geran) {
@@ -767,6 +768,22 @@ testcase TC_lu_and_mo_call() runs on MTC_CT {
vc_conn := f_start_handler(refers(f_tc_lu_and_mo_call), 7);
vc_conn.done;
}
+friend function f_tc_lu_and_mo_call_ipv6(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
+ f_init_handler(pars);
+ var CallParameters cpars := valueof(t_CallParams);
+ cpars.mgw_conn_1.mgw_rtp_ip := "::1";
+ cpars.mgw_conn_2.mgw_rtp_ip := "::2";
+ cpars.bss_rtp_ip := "::3";
+ f_perform_lu();
+ f_mo_call(cpars);
+}
+testcase TC_lu_and_mo_call_ipv6() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn;
+ f_init();
+
+ vc_conn := f_start_handler(refers(f_tc_lu_and_mo_call_ipv6), 7);
+ vc_conn.done;
+}
/* Verify T(iar) triggers and releases the channel */
friend function f_lu_and_mo_call_sccp_tiar_timeout(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
@@ -1960,6 +1977,24 @@ testcase TC_lu_and_mt_call_osmux() runs on MTC_CT {
vc_conn.done;
}
+/* LU followed by MT call (including paging) */
+friend function f_tc_lu_and_mt_call_ipv6(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
+ f_init_handler(pars);
+ var CallParameters cpars := valueof(t_CallParams('12345'H, 0));
+ cpars.mgw_conn_1.mgw_rtp_ip := "::1";
+ cpars.mgw_conn_2.mgw_rtp_ip := "::2";
+ cpars.bss_rtp_ip := "::3";
+ f_perform_lu();
+ f_mt_call(cpars);
+}
+testcase TC_lu_and_mt_call_ipv6() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn;
+ f_init();
+
+ vc_conn := f_start_handler(refers(f_tc_lu_and_mt_call_ipv6), 39);
+ vc_conn.done;
+}
+
/* MT call while already Paging */
friend function f_tc_lu_and_mt_call_already_paging(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
var CallParameters cpars := valueof(t_CallParams('123456'H, 0));
@@ -5492,7 +5527,14 @@ private altstep as_mgcp_ack_all_mdcx(CallParameters cpars) runs on BSC_ConnHdlr
}
private function f_tc_ho_inter_bsc0(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
- var CallParameters cpars := valueof(t_CallParams('12345'H, 0));
+ var CallParameters cpars;
+
+ cpars := valueof(t_CallParams('12345'H, 0));
+ if (pars.use_ipv6) {
+ cpars.mgw_conn_1.mgw_rtp_ip := "::1";
+ cpars.mgw_conn_2.mgw_rtp_ip := "::2";
+ cpars.bss_rtp_ip := "::3";
+ }
f_init_handler(pars);
@@ -5547,7 +5589,8 @@ private function f_tc_ho_inter_bsc0(charstring id, BSC_ConnHdlrPars pars) runs o
/* new BSS composes a RR Handover Command */
var PDU_ML3_NW_MS rr_ho_cmd := valueof(ts_RR_HandoverCommand);
var octetstring rr_ho_cmd_enc := enc_PDU_ML3_NW_MS(rr_ho_cmd);
- var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
+ var BSSMAP_IE_AoIP_TransportLayerAddress tla tla :=
+ valueof(f_ts_BSSMAP_IE_AoIP_TLA(cpars.bss_rtp_ip, cpars.bss_rtp_port));
BSSAP.send(ts_BSSMAP_HandoverRequestAcknowledge(rr_ho_cmd_enc, lengthof(rr_ho_cmd_enc),
tla, ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})));
@@ -5579,6 +5622,12 @@ private function f_tc_ho_inter_bsc0(charstring id, BSC_ConnHdlrPars pars) runs o
setverdict(pass);
}
private function f_tc_ho_inter_bsc1(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
+ var charstring bss_rtp_ip;
+ if (pars.use_ipv6) {
+ bss_rtp_ip := "::8";
+ } else {
+ bss_rtp_ip := "1.2.3.4";
+ }
f_init_handler(pars);
f_create_bssmap_exp_handoverRequest(194);
@@ -5588,7 +5637,8 @@ private function f_tc_ho_inter_bsc1(charstring id, BSC_ConnHdlrPars pars) runs o
/* new BSS composes a RR Handover Command */
var PDU_ML3_NW_MS rr_ho_cmd := valueof(ts_RR_HandoverCommand);
var octetstring rr_ho_cmd_enc := enc_PDU_ML3_NW_MS(rr_ho_cmd);
- var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
+ var BSSMAP_IE_AoIP_TransportLayerAddress tla :=
+ valueof(f_ts_BSSMAP_IE_AoIP_TLA(bss_rtp_ip, 2342));
BSSAP.send(ts_BSSMAP_HandoverRequestAcknowledge(rr_ho_cmd_enc, lengthof(rr_ho_cmd_enc),
tla, ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})));
@@ -5630,19 +5680,27 @@ private function f_tc_ho_inter_bsc1(charstring id, BSC_ConnHdlrPars pars) runs o
f_expect_clear();
setverdict(pass);
}
-testcase TC_ho_inter_bsc() runs on MTC_CT {
+function f_tc_ho_inter_bsc_main(boolean use_ipv6 := false) runs on MTC_CT {
var BSC_ConnHdlr vc_conn0;
var BSC_ConnHdlr vc_conn1;
f_init(2);
var BSC_ConnHdlrPars pars0 := f_init_pars(53);
+ pars0.use_ipv6 := use_ipv6;
var BSC_ConnHdlrPars pars1 := f_init_pars(53);
+ pars1.use_ipv6 := use_ipv6;
vc_conn0 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc0), pars0, 0);
vc_conn1 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc1), pars1, 1);
vc_conn0.done;
vc_conn1.done;
}
+testcase TC_ho_inter_bsc() runs on MTC_CT {
+ f_tc_ho_inter_bsc_main(false);
+}
+testcase TC_ho_inter_bsc_ipv6() runs on MTC_CT {
+ f_tc_ho_inter_bsc_main(true);
+}
function f_ML3_patch_seq_nr_MS_NW(in uint2_t seq_nr, inout octetstring enc_l3) {
log("MS_NW patching N(SD)=", seq_nr, " into dtap ", enc_l3);
@@ -5651,7 +5709,14 @@ function f_ML3_patch_seq_nr_MS_NW(in uint2_t seq_nr, inout octetstring enc_l3) {
}
private function f_tc_ho_inter_msc_out(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
- var CallParameters cpars := valueof(t_CallParams('12345'H, 0));
+ var CallParameters cpars;
+
+ cpars := valueof(t_CallParams('12345'H, 0));
+ if (pars.use_ipv6) {
+ cpars.mgw_conn_1.mgw_rtp_ip := "::1";
+ cpars.mgw_conn_2.mgw_rtp_ip := "::2";
+ cpars.bss_rtp_ip := "::3";
+ }
var hexstring ho_number := f_gen_msisdn(99999);
f_init_handler(pars);
@@ -5841,7 +5906,8 @@ private function f_tc_ho_inter_msc_out(charstring id, BSC_ConnHdlrPars pars) run
/* new BSS composes a RR Handover Command */
rr_ho_cmd := valueof(ts_RR_HandoverCommand);
rr_ho_cmd_enc := enc_PDU_ML3_NW_MS(rr_ho_cmd);
- var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
+ var BSSMAP_IE_AoIP_TransportLayerAddress tla :=
+ valueof(f_ts_BSSMAP_IE_AoIP_TLA(cpars.bss_rtp_ip, cpars.bss_rtp_port));
BSSAP.send(ts_BSSMAP_HandoverRequestAcknowledge(rr_ho_cmd_enc, lengthof(rr_ho_cmd_enc),
tla, ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})));
@@ -5889,6 +5955,16 @@ testcase TC_ho_inter_msc_out() runs on MTC_CT {
vc_conn := f_start_handler_with_pars(refers(f_tc_ho_inter_msc_out), pars, 0);
vc_conn.done;
}
+testcase TC_ho_inter_msc_out_ipv6() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn;
+ f_init(1);
+
+ var BSC_ConnHdlrPars pars := f_init_pars(54);
+ pars.use_ipv6 := true;
+
+ vc_conn := f_start_handler_with_pars(refers(f_tc_ho_inter_msc_out), pars, 0);
+ vc_conn.done;
+}
private function f_tc_lu_imsi_auth_tmsi_check_imei(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
pars.net.expect_auth := true;
@@ -6242,6 +6318,7 @@ control {
execute( TC_cmserv_imsi_unknown() );
execute( TC_cmserv_tmsi_unknown() );
execute( TC_lu_and_mo_call() );
+ execute( TC_lu_and_mo_call_ipv6() );
execute( TC_lu_and_mo_call_sccp_tiar_timeout() );
execute( TC_lu_auth_sai_timeout() );
execute( TC_lu_auth_sai_err() );
@@ -6282,6 +6359,7 @@ control {
execute( TC_reset_two() );
execute( TC_lu_and_mt_call() );
+ execute( TC_lu_and_mt_call_ipv6() );
execute( TC_lu_and_mt_call_already_paging() );
execute( TC_lu_and_mo_sms() );
@@ -6348,8 +6426,10 @@ control {
execute( TC_ho_inter_bsc_unknown_cell() );
execute( TC_ho_inter_bsc() );
+ execute( TC_ho_inter_bsc_ipv6() );
execute( TC_ho_inter_msc_out() );
+ execute( TC_ho_inter_msc_out_ipv6() );
execute( TC_lu_imsi_auth_tmsi_check_imei() );
execute( TC_lu_imsi_auth3g_tmsi_check_imei() );