fix MSC.TC_lu_clear_request: allow LU Reject, forbid 2nd Clear Cmd
When the MS sends a Clear Request in the middle of a Location Updating, it
should be permitted for the MSC to send a Location Updating Reject back. Extend
with an alt that also allows a LU reject before the Clear Command.
The test explicitly hints at https://osmocom.org/issues/2862 which rightfully
forbids the MSC to send a second Clear Command after the first is completed.
However, this test so far explicitly permits a second Clear Command, so it was
probably passing in error all the time. Set verdict to failure if a second
Clear Command is received before the DISC_IND.
This changes the test verdict to failure with current osmo-msc master,
rightfully so; the failure will be fixed by the upcoming MSC subscr conn FSM
refactoring.
Change-Id: I7bc5555b829d61b0a2529107bc9b58446865545d
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index ce9c8b9..6ec08bb 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -681,11 +681,17 @@
f_sleep(1.0);
/* send clear request in the middle of the LU */
BSSAP.send(ts_BSSMAP_ClearRequest(0));
- BSSAP.receive(tr_BSSMAP_ClearCommand);
+ alt {
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { repeat; }
+ [] BSSAP.receive(tr_BSSMAP_ClearCommand) {}
+ }
BSSAP.send(ts_BSSMAP_ClearComplete);
alt {
/* See https://osmocom.org/issues/2862 */
- [] BSSAP.receive(tr_BSSMAP_ClearCommand) { repeat; }
+ [] BSSAP.receive(tr_BSSMAP_ClearCommand) {
+ setverdict(fail, "Got a second Clear Command, only one expected");
+ repeat;
+ }
[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
}
setverdict(pass);