summaryrefslogtreecommitdiffstats
path: root/msc/MSC_Tests.ttcn
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-24 19:08:17 +0200
committerneels <nhofmeyr@sysmocom.de>2020-07-08 01:45:09 +0000
commit4e18cccb9ce79ae79fcd79377259d13ef92f8a6c (patch)
tree7aa96b36b1abb88e8fde300b5f3b7a04db8af444 /msc/MSC_Tests.ttcn
parenta5f0ed2ba438d8ab1203548831165d76993bd2b8 (diff)
msc: verify conn and VLR cell id in most tests
osmo-msc failed to record the Complete Layer 3 Information LAC and CI in the MSC-A as well as the VLR record. Since osmo-msc Iee1781985fb25b21ce27526c6a3768bf70d4dc9a and I194271af2acb37b4f8cc2d106ab2fd2b0d443589, osmo-msc properly records these for successful Complete Layer 3 procedures. Incorporate verification of the LAC and CI in all tests calling f_perform_lu() and f_expect_clear(). Implement by scraping the output of vty 'show subscriber imsi 1234 conn' Some tests model a failure to attach, or expire the VLR record: for those, add parameter verify_cell_id to g_pars, and pass it as false, to skip checking the LAC and CI. Disable CI checking for all Iu tests globally in f_verify_vty_lac_ci(), see OS#4634. For the latest build, which does not yet record LAC and CI properly, provide mp_enable_cell_id_test, which skips all cell id verification if set to false. Put to effect by docker-playground I052fea208021509e12826c50474b96474e7a58c2. Related: OS#4627 Depends: Iee1781985fb25b21ce27526c6a3768bf70d4dc9a (osmo-msc) Change-Id: Ie410714a96353f74a52a104c56fa0a08683e0004
Diffstat (limited to 'msc/MSC_Tests.ttcn')
-rw-r--r--msc/MSC_Tests.ttcn53
1 files changed, 29 insertions, 24 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index bfac7e9..d59d165 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -167,6 +167,8 @@ modulepar {
rctx := 1
}
};
+
+ boolean mp_enable_cell_id_test := true;
}
/* altstep for the global guard timer (only used when BSSAP_DIRECT
@@ -368,7 +370,8 @@ type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr
/* FIXME: move into BSC_ConnectionHandler? */
function f_init_pars(integer imsi_suffix, boolean sgsap := false, boolean gsup := true, integer ran_idx := 0,
- boolean ran_is_geran := true, boolean use_osmux := false, OCT4 gsup_sid := '20000101'O)
+ boolean ran_is_geran := true, boolean use_osmux := false, OCT4 gsup_sid := '20000101'O,
+ boolean verify_cell_id := true)
runs on MTC_CT return BSC_ConnHdlrPars {
var BSC_ConnHdlrNetworkPars net_pars := {
kc_support := '0A'O, /* A5/1 and A5/3 enabled */
@@ -404,7 +407,8 @@ runs on MTC_CT return BSC_ConnHdlrPars {
ran_idx := ran_idx,
use_umts_aka := false,
ran_is_geran := ran_is_geran,
- use_osmux := use_osmux
+ use_osmux := use_osmux,
+ verify_cell_id := mp_enable_cell_id_test and verify_cell_id
};
if (not ran_is_geran) {
pars.use_umts_aka := true;
@@ -447,9 +451,10 @@ function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars, integer bs
return vc_conn;
}
-function f_start_handler(void_fn fn, integer imsi_suffix, integer ran_idx := 0, boolean ran_is_geran := true, boolean use_osmux := false)
+function f_start_handler(void_fn fn, integer imsi_suffix, integer ran_idx := 0, boolean ran_is_geran := true, boolean use_osmux := false,
+ boolean verify_cell_id := true)
runs on MTC_CT return BSC_ConnHdlr {
- return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix, ran_idx := ran_idx, ran_is_geran := ran_is_geran, use_osmux := use_osmux));
+ return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix, ran_idx := ran_idx, ran_is_geran := ran_is_geran, use_osmux := use_osmux, verify_cell_id := verify_cell_id));
}
private function f_tc_lu_imsi_noauth_tmsi(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
@@ -502,7 +507,7 @@ testcase TC_lu_imsi_reject() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
- vc_conn := f_start_handler(refers(f_tc_lu_imsi_reject), 3);
+ vc_conn := f_start_handler(refers(f_tc_lu_imsi_reject), 3, verify_cell_id := false);
vc_conn.done;
}
@@ -533,7 +538,7 @@ testcase TC_lu_imsi_timeout_gsup() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
- vc_conn := f_start_handler(refers(f_tc_lu_imsi_timeout_gsup), 4);
+ vc_conn := f_start_handler(refers(f_tc_lu_imsi_timeout_gsup), 4, verify_cell_id := false);
vc_conn.done;
}
@@ -611,7 +616,7 @@ friend function f_tc_lu_imsi_timeout_tmsi_realloc(charstring id, BSC_ConnHdlrPar
/* f_expect_lu_reject() already waits for T"-1" (X1, 5 seconds), but give some
extra time to avoid race conditons... */
- f_expect_clear(7.0);
+ f_expect_clear(7.0, verify_vlr_cell_id := false);
setverdict(pass);
}
@@ -663,7 +668,7 @@ runs on BSC_ConnHdlr {
testcase TC_cmserv_imsi_unknown() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
- vc_conn := f_start_handler(refers(f_tc_cmserv_imsi_unknown), 6);
+ vc_conn := f_start_handler(refers(f_tc_cmserv_imsi_unknown), 6, verify_cell_id := false);
vc_conn.done;
}
@@ -751,7 +756,7 @@ testcase TC_lu_auth_sai_timeout() runs on MTC_CT {
f_init();
f_vty_config(MSCVTY, "network", "authentication required");
- vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_timeout), 8);
+ vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_timeout), 8, verify_cell_id := false);
vc_conn.done;
}
@@ -785,7 +790,7 @@ testcase TC_lu_auth_sai_err() runs on MTC_CT {
f_init();
f_vty_config(MSCVTY, "network", "authentication required");
- vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_err), 9);
+ vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_err), 9, verify_cell_id := false);
vc_conn.done;
}
@@ -894,7 +899,7 @@ testcase TC_lu_by_imei() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
- vc_conn := f_start_handler(refers(f_tc_lu_by_imei), 12);
+ vc_conn := f_start_handler(refers(f_tc_lu_by_imei), 12, verify_cell_id := false);
vc_conn.done;
}
@@ -974,7 +979,7 @@ testcase TC_imsi_detach_by_imsi() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
- vc_conn := f_start_handler(refers(f_tc_imsi_detach_by_imsi), 14);
+ vc_conn := f_start_handler(refers(f_tc_imsi_detach_by_imsi), 14, verify_cell_id := false);
vc_conn.done;
}
@@ -1000,7 +1005,7 @@ testcase TC_imsi_detach_by_tmsi() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
- vc_conn := f_start_handler(refers(f_tc_imsi_detach_by_tmsi), 15);
+ vc_conn := f_start_handler(refers(f_tc_imsi_detach_by_tmsi), 15, verify_cell_id := false);
vc_conn.done;
}
@@ -1026,7 +1031,7 @@ testcase TC_imsi_detach_by_imei() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
- vc_conn := f_start_handler(refers(f_tc_imsi_detach_by_imei), 16);
+ vc_conn := f_start_handler(refers(f_tc_imsi_detach_by_imei), 16, verify_cell_id := false);
vc_conn.done;
}
@@ -1053,7 +1058,7 @@ testcase TC_emerg_call_imei_reject() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
- vc_conn := f_start_handler(refers(f_tc_emerg_call_imei_reject), 17);
+ vc_conn := f_start_handler(refers(f_tc_emerg_call_imei_reject), 17, verify_cell_id := false);
vc_conn.done;
}
@@ -1195,7 +1200,7 @@ testcase TC_lu_auth_2G_fail() runs on MTC_CT {
f_init();
f_vty_config(MSCVTY, "network", "authentication required");
- vc_conn := f_start_handler(refers(f_tc_lu_auth_2G_fail), 23);
+ vc_conn := f_start_handler(refers(f_tc_lu_auth_2G_fail), 23, verify_cell_id := false);
vc_conn.done;
}
@@ -1575,7 +1580,7 @@ testcase TC_gsup_cancel() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
- vc_conn := f_start_handler(refers(f_tc_gsup_cancel), 33);
+ vc_conn := f_start_handler(refers(f_tc_gsup_cancel), 33, verify_cell_id := false);
vc_conn.done;
}
@@ -1659,7 +1664,7 @@ testcase TC_lu_imsi_auth_tmsi_encr_3_1() runs on MTC_CT {
f_vty_config(MSCVTY, "network", "authentication required");
f_vty_config(MSCVTY, "network", "encryption a5 3");
- vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), 360);
+ vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), 360, verify_cell_id := false);
vc_conn.done;
}
testcase TC_lu_imsi_auth_tmsi_encr_3_1_no_cm() runs on MTC_CT {
@@ -1669,7 +1674,7 @@ testcase TC_lu_imsi_auth_tmsi_encr_3_1_no_cm() runs on MTC_CT {
f_vty_config(MSCVTY, "network", "authentication required");
f_vty_config(MSCVTY, "network", "encryption a5 3");
- pars := f_init_pars(361);
+ pars := f_init_pars(361, verify_cell_id := false);
pars.send_early_cm := false;
vc_conn := f_start_handler_with_pars(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), pars);
vc_conn.done;
@@ -1684,7 +1689,7 @@ testcase TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() runs on MTC_CT {
* message that is reported in OS#2947 to trigger the segfault */
f_vty_config(MSCVTY, "log stderr", "logging level msc debug");
- vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), 362);
+ vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), 362, verify_cell_id := false);
vc_conn.done;
}
@@ -1726,7 +1731,7 @@ testcase TC_lu_imsi_auth_tmsi_encr_13_2() runs on MTC_CT {
f_vty_config(MSCVTY, "network", "authentication required");
f_vty_config(MSCVTY, "network", "encryption a5 1 3");
- vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_13_2), 37);
+ vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_13_2), 37, verify_cell_id := false);
vc_conn.done;
}
@@ -3986,7 +3991,7 @@ testcase TC_cipher_complete_with_invalid_cipher() runs on MTC_CT {
f_init();
f_vty_config(MSCVTY, "network", "encryption a5 1");
- vc_conn := f_start_handler(refers(f_tc_cipher_complete_with_invalid_cipher), 52);
+ vc_conn := f_start_handler(refers(f_tc_cipher_complete_with_invalid_cipher), 52, verify_cell_id := false);
vc_conn.done;
}
@@ -5999,7 +6004,7 @@ testcase TC_mm_id_resp_no_identity() runs on MTC_CT {
f_init();
- vc_conn := f_start_handler(refers(f_tc_mm_id_resp_no_identity), 7);
+ vc_conn := f_start_handler(refers(f_tc_mm_id_resp_no_identity), 7, verify_cell_id := false);
vc_conn.done;
}
@@ -6030,7 +6035,7 @@ runs on BSC_ConnHdlr {
/* The recent OsmoMSC keeps subscriber in its VLR unless the Paging is completed.
* In this case we do not send anything and just wait for a Clear Command. */
- f_expect_clear();
+ f_expect_clear(verify_vlr_cell_id := false);
}
testcase TC_lu_and_expire_while_paging() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;