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
This commit is contained in:
Vadim Yanitskiy 2024-03-27 16:23:30 +07:00
parent 7093a5d9a2
commit b3e42cfcdc
2 changed files with 15 additions and 10 deletions

View File

@ -1966,7 +1966,7 @@ runs on BSC_ConnHdlr {
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 @@ altstep as_clear_cmd_compl_disc() runs on BSC_ConnHdlr {
}
}
/* 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 {

View File

@ -1752,8 +1752,8 @@ friend function f_tc_mt_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) ru
repeat;
}
[] MGCP.receive { repeat; }
[] as_clear_cmd_compl_disc();
[] as_optional_cc_rel(cpars);
[] as_optional_cc_rel(cpars); /* repeats internally */
[] as_expect_clear() { setverdict(pass); }
}
}
testcase TC_mt_crcx_ran_reject() runs on MTC_CT {