msc: fix f_tc_mt_crcx_ran_reject(): properly handle Iu-ReleaseCommand
Previous commit [1] uncovers a problem in f_tc_mt_crcx_ran_reject():
this function uses as_clear_cmd_compl_disc(), which is expecting
A-interface (GERAN) specific BSSMAP Clear Command. The Iu-interface
(UTRAN) specific RANAP Iu-ReleaseCommand is not handled at all.
The testcase was passing so far due to a bug in as_optional_cc_rel(),
which would unblock the alt-statemtnt on receipt of CC RELEASE, so
that we would never respond to RANAP Iu-ReleaseCommand.
Let's derive a new altstep from f_expect_clear() and use it.
Change-Id: Idd679bbf720a56a76cf37ab414b1e6d90e53278b
Related: [1] I0143b4d33b1ebe4cce99c09018540524c4626eec
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 0a30114..be12fae 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -1966,7 +1966,7 @@
setverdict(pass);
}
-/* expect a clear command */
+/* expect a clear command (for GERAN only!) */
altstep as_clear_cmd_compl_disc() runs on BSC_ConnHdlr {
var PDU_BSSAP bssap;
[] BSSAP.receive(tr_BSSMAP_ClearCommand) {
@@ -1987,23 +1987,28 @@
}
}
+/* expect a BSSMAP Clear Command (for GERAN) or an Iu-ReleaseCommand (for UTRAN) */
+altstep as_expect_clear() runs on BSC_ConnHdlr {
+ [g_pars.ran_is_geran] as_clear_cmd_compl_disc();
+ [not g_pars.ran_is_geran] as_iu_release_compl_disc();
+}
+
function f_expect_clear(float t := 5.0, boolean verify_vlr_cell_id := true) runs on BSC_ConnHdlr {
timer T := t;
T.start;
alt {
- [g_pars.ran_is_geran] as_clear_cmd_compl_disc() { }
- [not g_pars.ran_is_geran] as_iu_release_compl_disc() { }
+ [] as_expect_clear() {
+ if (verify_vlr_cell_id) {
+ /* Now the conn is gone, but the VLR reflects the cell ID */
+ f_verify_vty_lac_ci();
+ }
+ }
[] T.timeout {
setverdict(fail, "Timeout waiting for ClearCommand/Release");
mtc.stop;
}
}
-
- if (verify_vlr_cell_id) {
- /* Now the conn is gone, but the VLR reflects the cell ID */
- f_verify_vty_lac_ci();
- }
}
function f_create_bssmap_exp_n_connect(integer targetPointCode) runs on BSC_ConnHdlr {