This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/7380 msc: wait for clear-command/complete/sccp-release Not all tests were waiting/expecting the complete connection shutdown, which results in the possibility for CLEAR CMD to arrive during shutdown of the TITAN components and cause related errors. Change-Id: I3a6c2e1f78b58f86ef84d4e323f432016a9afa7e --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 38 insertions(+), 51 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/80/7380/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 561cf19..4ba84f8 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -705,35 +705,33 @@ setverdict(pass); } /* expect a clear command */ +altstep as_clear_cmd_compl_disc(float t := 5.0) runs on BSC_ConnHdlr { + [] BSSAP.receive(tr_BSSMAP_ClearCommand) { + BSSAP.send(ts_BSSMAP_ClearComplete); + alt { + [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { + setverdict(pass); + } + [] BSSAP.receive { + setverdict(fail, "Unexpected BSSMAP while waiting for SCCP Release"); + self.stop; + } + } + } + [] BSSAP.receive { + setverdict(fail, "Unexpected BSSMAP while waiting for ClearCommand"); + self.stop; + } +} + function f_expect_clear(float t := 5.0) runs on BSC_ConnHdlr { timer T := t; T.start; alt { - [] BSSAP.receive(tr_BSSMAP_ClearCommand) { } - [] BSSAP.receive { - setverdict(fail, "Unexpected BSSMAP while waiting for ClearCommand"); - self.stop; - } + [] as_clear_cmd_compl_disc(t) { } [] T.timeout { - setverdict(fail, "Timeout waiting for ClearCommand"); - self.stop; - } - } - - BSSAP.send(ts_BSSMAP_ClearComplete); - - T.start; - alt { - [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { - setverdict(pass); - } - [] BSSAP.receive { - setverdict(fail, "Unexpected BSSMAP while waiting for SCCP Release"); - self.stop; - } - [] T.timeout { - setverdict(fail, "Timeout waiting for SCCP Release"); + setverdict(fail, "Timeout waiting for ClearCommand/Release"); self.stop; } } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 156bdd9..698b341 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -457,7 +457,9 @@ GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); GSUP.send(ts_GSUP_UL_ERR(g_pars.imsi, 23)); alt { - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej(int2oct(23,1)))) { } + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej(int2oct(23,1)))) { + f_expect_clear(); + } [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Acc)) { setverdict(fail, "Expecting LU REJ, but got ACCEPT"); self.stop; @@ -484,7 +486,9 @@ /* Normally the HLR would need to respond here, but we decide to force a timeout here */ alt { /* FIXME: Expect specific reject cause */ - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { } + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { + f_expect_clear(); + } [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Acc)) { setverdict(fail, "Expecting LU REJ, but got ACCEPT"); self.stop; @@ -1042,12 +1046,9 @@ alt { [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {} /* Expect LU REJECT with Cause == Illegal MS */ - [] BSSAP.receive(tr_BSSMAP_ClearCommand) { - BSSAP.send(ts_BSSMAP_ClearComplete); - BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND); - } [] BSSAP.receive(tr_PDU_DTAP_MT(?)) { repeat; } [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) { repeat; } + [] as_clear_cmd_compl_disc(); [] T.timeout { setverdict(fail, "Timeout waiting for ClearCommand or SCCP Release"); self.stop; @@ -1079,13 +1080,9 @@ alt { /* Immediate disconnect */ [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {} - /* Expect LU REJECT with Cause == Illegal MS */ - [] BSSAP.receive(tr_BSSMAP_ClearCommand) { - BSSAP.send(ts_BSSMAP_ClearComplete); - BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND); - } [] BSSAP.receive(tr_PDU_DTAP_MT(?)) { repeat; } [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) { repeat; } + [] as_clear_cmd_compl_disc(); [] T.timeout { setverdict(fail, "Timeout waiting for ClearCommand or SCCP Release"); self.stop; @@ -1233,11 +1230,6 @@ T.start; alt { [] T.timeout { setverdict(fail, "Timeout waiting for channel release"); self.stop; } - [] BSSAP.receive(tr_BSSMAP_ClearCommand) { - BSSAP.send(ts_BSSMAP_ClearComplete); - BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND); - setverdict(pass); - } [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id))); repeat; @@ -1253,6 +1245,7 @@ repeat; } [] MGCP.receive { repeat; } + [] as_clear_cmd_compl_disc(); } } testcase TC_mo_crcx_ran_reject() runs on MTC_CT { @@ -1340,11 +1333,6 @@ T.start; alt { [] T.timeout { setverdict(fail, "Timeout waiting for channel release"); self.stop; } - [] BSSAP.receive(tr_BSSMAP_ClearCommand) { - BSSAP.send(ts_BSSMAP_ClearComplete); - BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND); - setverdict(pass); - } [] BSSAP.receive { repeat; } [] MNCC.receive { repeat; } [] GSUP.receive { repeat; } @@ -1354,6 +1342,7 @@ repeat; } [] MGCP.receive { repeat; } + [] as_clear_cmd_compl_disc(); } } testcase TC_mt_crcx_ran_reject() runs on MTC_CT { @@ -1398,16 +1387,12 @@ BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id))); alt { - [] BSSAP.receive(tr_BSSMAP_ClearCommand) { - BSSAP.send(ts_BSSMAP_ClearComplete); - BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND); - setverdict(pass); - } [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); f_create_mgcp_delete_ep(cpars.mgcp_ep); repeat; } + [] as_clear_cmd_compl_disc(); } } testcase TC_mt_t310() runs on MTC_CT { @@ -1518,7 +1503,9 @@ } f_mm_auth(); alt { - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { } + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { + f_expect_clear(); + } [] BSSAP.receive(tr_BSSMAP_CipherModeCmd(?,?)) { setverdict(fail, "CipherModeCommand despite no A5 intersection"); self.stop; @@ -1583,7 +1570,9 @@ BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3)); f_mm_auth(); alt { - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { } + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { + f_expect_clear(); + } [] BSSAP.receive(tr_BSSMAP_CipherModeCmd(?,?)) { setverdict(fail, "CipherModeCommand despite no A5 intersection"); self.stop; -- To view, visit https://gerrit.osmocom.org/7380 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a6c2e1f78b58f86ef84d4e323f432016a9afa7e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org>