fixeria submitted this change.

View Change


Approvals: osmith: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified
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
---
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
2 files changed, 36 insertions(+), 10 deletions(-)

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 {
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 7e8f467..101d632 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -1752,8 +1752,8 @@
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 {

To view, visit change 36470. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Idd679bbf720a56a76cf37ab414b1e6d90e53278b
Gerrit-Change-Number: 36470
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged