Stop tests after failures

Call mtc.stop after setverdict(fail), add reasons to most failures and
fail with verdict error for internal errors.

Change-Id: I9b618235939fa41160b9be6677b121963d3ec857
This commit is contained in:
Daniel Willmann 2018-07-06 23:11:32 +02:00
parent e4ff537f9b
commit afce86630c
13 changed files with 189 additions and 112 deletions

View File

@ -113,14 +113,8 @@ modulepar {
}
private function f_shutdown_helper() runs on test_CT {
for (var integer i := 0; i < NUM_BTS; i := i+1) {
if (isbound(bts[i]) and isbound(bts[i].rsl)) {
f_ipa_rsl_stop(bts[i].rsl);
}
}
f_ipa_ctrl_stop();
all port.stop;
setverdict(pass);
mtc.stop;
}
private function f_legacy_bssap_reset() runs on test_CT {
@ -199,7 +193,7 @@ runs on test_CT {
[] IPA_RSL[i].receive { repeat }
[] T.timeout {
setverdict(fail, "Timeout RSL waiting for ASP_IPA_EVENT_ID_ACK");
self.stop;
mtc.stop;
}
}
}
@ -230,7 +224,7 @@ function f_wait_oml(integer bts_nr, charstring status, float secs_max) runs on t
f_sleep(0.1);
if (not T.running) {
setverdict(fail, "Timeout waiting for oml-connection-state ", status);
self.stop;
mtc.stop;
}
}
}
@ -240,7 +234,7 @@ altstep as_Tguard() runs on test_CT {
var BSSAP_N_UNITDATA_ind ud_ind;
[] T_guard.timeout {
setverdict(fail, "Timeout of T_guard");
self.stop;
mtc.stop;
}
/* always respond with RESET ACK to RESET */
[] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind {
@ -253,7 +247,7 @@ altstep as_Tguard() runs on test_CT {
altstep no_bssmap_reset() runs on test_CT {
[] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) {
setverdict(fail, "unexpected BSSMAP Reset");
self.stop;
mtc.stop;
}
}
@ -340,7 +334,7 @@ runs on test_CT return RSL_Message {
[] IPA_RSL[bts_nr].receive { repeat; }
[] T.timeout {
setverdict(fail, "Timeout expecting ", t_rx);
self.stop;
mtc.stop;
}
}
return rx_rsl_ud.rsl;
@ -1325,7 +1319,7 @@ testcase TC_paging_imsi_load() runs on test_CT {
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after LOAD_IND(0)");
self.stop;
mtc.stop;
}
[] T_retrans.timeout {
/* re-trnsmit the zero-space LOAD IND to avoid BSC 'auto credit' */
@ -1404,15 +1398,15 @@ testcase TC_paging_imsi_a_reset() runs on test_CT {
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after A-RESET");
self.stop;
mtc.stop;
}
[] IPA_RSL[1].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after A-RESET");
self.stop;
mtc.stop;
}
[] IPA_RSL[2].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after A-RESET");
self.stop;
mtc.stop;
}
[] T.timeout {
setverdict(pass);
@ -1467,10 +1461,9 @@ function f_ipa_unknown_unit_id(integer mp_bsc_ipa_port) runs on test_CT return b
}
[] IPA_RSL[0].receive { repeat }
[] T.timeout {
self.stop;
return false;
}
}
return false;
}
@ -1762,7 +1755,7 @@ return BSSMAP_IE_ChannelType {
}
case else {
setverdict(fail, "Unsupported codec ", a_elem);
self.stop;
mtc.stop;
}
}
return ret;
@ -1835,7 +1828,7 @@ private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
var RSL_IE_Body mode_ie;
if (f_rsl_find_ie(rsl, RSL_IE_CHAN_MODE, mode_ie) == false) {
setverdict(fail, "Couldn't find CHAN_MODE IE");
self.stop;
mtc.stop;
}
var template RSL_IE_Body t_mode_ie := f_rsl_chmod_tmpl_from_codec(g_pars.ass_codec_list.codecElements[0]);
if (not match(mode_ie, t_mode_ie)) {
@ -1846,7 +1839,7 @@ private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
if (g_pars.expect_mr_conf_ie != omit) {
if (f_rsl_find_ie(rsl, RSL_IE_MR_CONFIG, mr_conf) == false) {
setverdict(fail, "Missing MR CONFIG IE in RSL Chan Activ");
self.stop;
mtc.stop;
}
log("found RSL MR CONFIG IE: ", mr_conf);
@ -1858,7 +1851,7 @@ private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
if (f_rsl_find_ie(rsl, RSL_IE_MR_CONFIG, mr_conf) == true) {
log("found RSL MR CONFIG IE: ", mr_conf);
setverdict(fail, "Found MR CONFIG IE in RSL Chan Activ, expecting omit");
self.stop;
mtc.stop;
}
}
}
@ -1973,7 +1966,7 @@ private function f_bssap_expect_nothing(float sec := 5.00) runs on MSC_ConnHdlr
alt {
[] BSSAP.receive(PDU_BSSAP:?) -> value bssap {
setverdict(fail, "Unexpected BSSMAP ", bssap);
self.stop;
mtc.stop;
}
[] T.timeout {
setverdict(pass);
@ -2087,7 +2080,7 @@ runs on MSC_ConnHdlr {
ss_nr := chan_nr.u.sdcch8.sub_chan;
} else {
setverdict(fail, "Invalid ChanNr ", chan_nr);
self.stop;
mtc.stop;
}
var charstring cmd := "bts "&int2str(bts_nr)&" trx "&int2str(trx_nr)&
@ -2337,7 +2330,7 @@ runs on test_CT {
var charstring mode := f_ts_dyn_mode_get(bts_nr, trx_nr, ts_nr);
if (not match(mode, exp)) {
setverdict(fail, "Unexpected TS Mode: ", mode);
self.stop;
mtc.stop;
}
}

View File

@ -147,7 +147,7 @@ private function f_get_free_mgcp_conn() runs on MSC_ConnHdlr return integer {
}
}
setverdict(fail, "Only 2 Connections per EP!");
self.stop;
mtc.stop;
}
/* Helper function to pick a specific connection by its cid. Since we reach out
@ -160,7 +160,7 @@ private function f_get_mgcp_conn(MgcpConnectionId cid) runs on MSC_ConnHdlr retu
}
}
setverdict(fail, "No Connection for ID ", cid);
self.stop;
mtc.stop;
}
/* altstep for handling of IPACC media related commands. Activated by as_Media() to test
@ -189,7 +189,7 @@ altstep as_Media_ipacc() runs on MSC_ConnHdlr {
b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_CONN_ID, ie);
if (g_media.bts.conn_id != ie.ipa_conn_id) {
setverdict(fail, "IPA MDCX for unknown ConnId", rsl);
self.stop;
mtc.stop;
}
/* mandatory */
b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_IP, ie);
@ -233,7 +233,7 @@ altstep as_Media_ipacc() runs on MSC_ConnHdlr {
b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_CONN_ID, ie);
if (g_media.bts1.conn_id != ie.ipa_conn_id) {
setverdict(fail, "IPA MDCX for unknown ConnId", rsl);
self.stop;
mtc.stop;
}
/* mandatory */
b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_IP, ie);
@ -269,7 +269,7 @@ altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr {
if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) {
if (cid != 0) {
setverdict(fail, "MGCP wildcard EP only works in first CRCX");
self.stop;
mtc.stop;
}
/* we keep the endpoint name allocated during MediaState_init */
} else {
@ -575,12 +575,12 @@ function f_ChDesc2RslChanNr(ChannelDescription2_V ch_desc, out RslChannelNr chan
}
else {
setverdict(fail, "Unknown ChDesc!");
self.stop;
mtc.stop;
}
if (ch_desc.octet3 and4b '10'O == '10'O) {
setverdict(fail, "No support for Hopping");
self.stop;
mtc.stop;
} else {
var OCT2 concat := ch_desc.octet3 & ch_desc.octet4;
arfcn := oct2int(concat);
@ -670,7 +670,7 @@ altstep as_assignment(inout AssignmentState st) runs on MSC_ConnHdlr {
repeat;
} else {
setverdict(fail, "Unexpected L3 received", l3);
self.stop;
mtc.stop;
}
}
[st.rr_ass_cmpl_seen] RSL.receive(tr_RSL_REL_REQ(st.old_chan_nr, tr_RslLinkID_DCCH(0))) {
@ -955,7 +955,7 @@ runs on MSC_ConnHdlr {
}
log("g_media ", g_media);
if (not isbound(bssap)) {
self.stop;
mtc.stop;
}
/* When the BSC detects that LCLS is possible it will cross the
@ -1019,7 +1019,7 @@ altstep as_handover(inout HandoverState st) runs on MSC_ConnHdlr {
repeat;
} else {
setverdict(fail, "Unexpected L3 received", l3);
self.stop;
mtc.stop;
}
}
[st.rr_ho_cmpl_seen] as_Media_ipacc();

View File

@ -91,7 +91,7 @@ function f_init_vty() runs on test_CT {
private altstep as_Tguard() runs on test_CT {
[] g_Tguard.timeout {
setverdict(fail, "g_Tguard timeout");
self.stop;
mtc.stop;
}
}
@ -131,7 +131,7 @@ function f_init_gsup(charstring id, boolean legacy) runs on test_CT {
[legacy] GSUP.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { }
[] T.timeout {
setverdict(fail, "No connection to GSUP Port");
self.stop;
mtc.stop;
}
}
}
@ -270,7 +270,7 @@ function f_vty_transceive_match(TELNETasp_PT pt, charstring cmd, template charst
var charstring ret := f_vty_transceive_ret(pt, cmd);
if (not match(ret, exp_ret)) {
setverdict(fail, "Non-matching VTY response: ", ret);
self.stop;
mtc.stop;
}
}
@ -359,7 +359,7 @@ runs on HLR_ConnHdlr return GSUP_PDU {
[] GSUP.receive { repeat; }
[] T.timeout {
setverdict(fail, "Timeout waiting for SAI response");
self.stop;
mtc.stop;
}
}
return ret;
@ -405,7 +405,7 @@ runs on HLR_ConnHdlr return GSUP_PDU {
[] GSUP.receive { repeat; }
[] T.timeout {
setverdict(fail, "Timeout waiting for UL response");
self.stop;
mtc.stop;
}
}
return ret;
@ -443,7 +443,7 @@ runs on HLR_ConnHdlr return GSUP_PDU {
[] GSUP.receive { repeat; }
[] T.timeout {
setverdict(fail, "Timeout waiting for PURGE response");
self.stop;
mtc.stop;
}
}
return ret;

View File

@ -71,7 +71,7 @@ module MGCP_Test {
res := MGCP_CodecPort_CtrlFunct.f_IPL4_connect(MGCP, mp_remote_ip, mp_remote_udp_port, mp_local_ip, mp_local_udp_port, 0, { udp := {} });
if (not ispresent(res.connId)) {
setverdict(fail, "Could not connect MGCP, check your configuration");
self.stop;
mtc.stop;
}
g_mgcp_conn_id := res.connId;
@ -180,9 +180,15 @@ module MGCP_Test {
T.start;
alt {
[] MGCP.receive(mrt) -> value mrf { }
[] MGCP.receive(tr_MGCP_RecvFrom_R(?)) { setverdict(fail); }
[] MGCP.receive(tr_MGCP_RecvFrom_R(?)) {
setverdict(fail, "Response didn't match template");
mtc.stop;
}
[] MGCP.receive { repeat; }
[] T.timeout { setverdict(fail); }
[] T.timeout {
setverdict(fail, "Timeout waiting for response to ", cmd);
mtc.stop;
}
}
T.stop;
@ -202,7 +208,8 @@ module MGCP_Test {
return str2hex(par.val);
}
}
setverdict(fail);
setverdict(fail, "Could not find conn id for MgcpReponse");
mtc.stop;
return '00000000'H;
}
@ -390,12 +397,14 @@ module MGCP_Test {
payload type should be visible in the SDP of the response. */
if (resp.sdp.media_list[0].media_field.fmts[0] != "0") {
setverdict(fail, "SDP contains unexpected codec");
mtc.stop;
}
/* See also OS#2658: We also expect the MGW to assign a port
number to us. */
if (isbound(resp.sdp.media_list[0].media_field.ports.port_number) == false) {
setverdict(fail, "SDP does not contain a port number");
mtc.stop;
}
}
@ -579,6 +588,7 @@ module MGCP_Test {
}
if (f_mgcp_find_param(resp_msg, "Z", ep_assigned) == false) {
setverdict(fail, "No SpecificEndpointName in MGCP response", resp);
mtc.stop;
}
/* clean-up */
@ -611,6 +621,7 @@ module MGCP_Test {
}
if (f_mgcp_find_param(resp_msg, "Z", ep_assigned[i]) == false) {
setverdict(fail, "No SpecificEndpointName in MGCP response", resp);
mtc.stop;
}
}
@ -920,6 +931,7 @@ module MGCP_Test {
stats[1] := f_rtpem_stats_get(RTPEM[1]);
if (not f_rtpem_stats_compare(stats[0], stats[1])) {
setverdict(fail, "RTP endpoint statistics don't match");
mtc.stop;
}
setverdict(pass);
}
@ -1047,6 +1059,7 @@ module MGCP_Test {
stats[1] := f_rtpem_stats_get(RTPEM[1]);
if (not f_rtpem_stats_compare(stats[0], stats[1], tolerance)) {
setverdict(fail, "RTP endpoint statistics don't match");
mtc.stop;
}
setverdict(pass);
@ -1092,10 +1105,12 @@ module MGCP_Test {
stats[0] := f_rtpem_stats_get(RTPEM[0]);
if (stats[0].num_pkts_rx_err_disabled != 0) {
setverdict(fail, "received packets from MGW on recvonly connection");
mtc.stop;
}
stats[1] := f_rtpem_stats_get(RTPEM[1]);
if (stats[1].num_pkts_rx_err_disabled != 0) {
setverdict(fail, "received packets from MGW on recvonly connection");
mtc.stop;
}
/* The second leg starts transmitting a little later */
@ -1104,10 +1119,12 @@ module MGCP_Test {
stats[0] := f_rtpem_stats_get(RTPEM[0]);
if (stats[0].num_pkts_rx_err_disabled != 0) {
setverdict(fail, "received packets from MGW on recvonly connection");
mtc.stop;
}
stats[1] := f_rtpem_stats_get(RTPEM[1]);
if (stats[1].num_pkts_rx_err_disabled != 0) {
setverdict(fail, "received packets from MGW on recvonly connection");
mtc.stop;
}
/* The first leg will now be switched into bidirectional
@ -1117,10 +1134,12 @@ module MGCP_Test {
stats[0] := f_rtpem_stats_get(RTPEM[0]);
if (stats[1].num_pkts_rx_err_disabled != 0) {
setverdict(fail, "received packets from MGW on recvonly connection");
mtc.stop;
}
stats[1] := f_rtpem_stats_get(RTPEM[1]);
if (stats[1].num_pkts_rx_err_disabled != 0) {
setverdict(fail, "received packets from MGW on recvonly connection");
mtc.stop;
}
/* When the second leg is switched into bidirectional mode
@ -1142,11 +1161,13 @@ module MGCP_Test {
temp := stats[0].num_pkts_tx - num_pkts_tx[0] - stats[1].num_pkts_rx;
if (temp > 3 or temp < -3) {
setverdict(fail, "number of packets not within normal parameters");
mtc.stop;
}
temp := stats[1].num_pkts_tx - num_pkts_tx[1] - stats[0].num_pkts_rx;
if (temp > 3 or temp < -3) {
setverdict(fail, "number of packets not within normal parameters");
mtc.stop;
}
/* Tear down */
@ -1197,6 +1218,7 @@ module MGCP_Test {
stats[1] := f_rtpem_stats_get(RTPEM[1]);
if (not f_rtpem_stats_compare(stats[0], stats[1])) {
setverdict(fail, "RTP endpoint statistics don't match");
mtc.stop;
}
setverdict(pass);
@ -1254,10 +1276,12 @@ module MGCP_Test {
stats[1] := f_rtpem_stats_get(RTPEM[1]);
if (not f_rtpem_stats_compare(stats[0], stats[1], 5)) {
setverdict(fail, "RTP endpoint statistics don't match");
mtc.stop;
}
stats[2] := f_rtpem_stats_get(RTPEM[2]);
if (stats[2].num_pkts_rx_err_disabled != 0) {
setverdict(fail, "received packets on old leg after handover");
mtc.stop;
}
setverdict(pass);

View File

@ -111,7 +111,7 @@ module RTP_Endpoint {
sub.local_name, sub.local_port, sub.connection_id, { udp := {} });
if (not ispresent(res.connId)) {
setverdict(fail, "Could not connect RTP, check your configuration");
self.stop;
mtc.stop;
}
/* connect without previous bind: save conenction id allocated by IPL4asp */
if (sub.connection_id == -1) {
@ -136,7 +136,7 @@ module RTP_Endpoint {
res := f_IPL4_listen(RTP, sub.local_name, sub.local_port, { udp := {} });
if (not ispresent(res.connId)) {
setverdict(fail, "Could not listen to RTP, check your configuration");
self.stop;
mtc.stop;
}
sub.connection_id := res.connId;
}

View File

@ -109,7 +109,7 @@ function f_alg_from_mask(OCT1 mask_in) return integer {
private altstep as_Tguard() runs on BSC_ConnHdlr {
[] g_Tguard.timeout {
setverdict(fail, "Tguard timeout");
self.stop;
mtc.stop;
}
}
@ -183,7 +183,7 @@ runs on BSC_ConnHdlr {
[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) {}
[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
setverdict(fail, "DISC.ind from SCCP");
self.stop;
mtc.stop;
}
}
}
@ -294,7 +294,7 @@ function f_mm_common() runs on BSC_ConnHdlr
}
[] BSSAP.receive(tr_BSSMAP_CipherModeCmd(?, g_pars.vec.kc)) {
setverdict(fail, "Wrong ciphering algorithm mask in CiphModCmd");
self.stop;
mtc.stop;
}
}
/* FIXME: Send the best available algorithm */
@ -331,7 +331,7 @@ runs on BSC_ConnHdlr {
if (not ispresent(lu_acc.mobileIdentityTLV) or
not ischosen(lu_acc.mobileIdentityTLV.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi)) {
setverdict(fail, "Expected TMSI but no TMSI was allocated");
self.stop;
mtc.stop;
} else {
g_pars.tmsi := lu_acc.mobileIdentityTLV.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets;
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_TmsiRealloc_Cmpl));
@ -340,13 +340,13 @@ runs on BSC_ConnHdlr {
if (ispresent(lu_acc.mobileIdentityTLV) and
ischosen(lu_acc.mobileIdentityTLV.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi)) {
setverdict(fail, "Expected no TMSI but TMSI was allocated");
self.stop;
mtc.stop;
}
}
}
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) {
setverdict(fail, "Expected LU ACK, but received LU REJ");
self.stop;
mtc.stop;
}
}
/* FIXME: there could be pending SMS or other common procedures by the MSC, let's ignore them */
@ -695,7 +695,7 @@ runs on BSC_ConnHdlr {
[] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {}
[] T.timeout {
setverdict(fail, "Timeout waiting for START_DTMF_ind");
self.stop;
mtc.stop;
}
}
@ -704,7 +704,7 @@ runs on BSC_ConnHdlr {
alt {
[] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {
setverdict(fail, "Received duplicate START_DTMF_ind");
self.stop;
mtc.stop;
}
[] T.timeout { }
}
@ -716,7 +716,7 @@ runs on BSC_ConnHdlr {
[] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { }
[] T.timeout {
setverdict(fail, "Received duplicate START_DTMF_ind");
self.stop;
mtc.stop;
}
}
@ -732,13 +732,13 @@ altstep as_clear_cmd_compl_disc(float t := 5.0) runs on BSC_ConnHdlr {
}
[] BSSAP.receive {
setverdict(fail, "Unexpected BSSMAP while waiting for SCCP Release");
self.stop;
mtc.stop;
}
}
}
[] BSSAP.receive {
setverdict(fail, "Unexpected BSSMAP while waiting for ClearCommand");
self.stop;
mtc.stop;
}
}
@ -750,7 +750,7 @@ function f_expect_clear(float t := 5.0) runs on BSC_ConnHdlr {
[] as_clear_cmd_compl_disc(t) { }
[] T.timeout {
setverdict(fail, "Timeout waiting for ClearCommand/Release");
self.stop;
mtc.stop;
}
}
}
@ -808,7 +808,7 @@ template (value) SmsParameters t_SmsPars(hexstring tp_daddr := '12345'H) := {
private altstep as_other_sms() runs on BSC_ConnHdlr {
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_SMS(?, ?, ?), ?)) {
setverdict(fail, "Unexpected SMS related PDU from MSC");
self.stop;
mtc.stop;
}
}

View File

@ -133,7 +133,7 @@ modulepar {
private altstep as_Tguard_direct() runs on MTC_CT {
[] Tguard_direct.timeout {
setverdict(fail, "Tguard timeout");
self.stop;
mtc.stop;
}
}
@ -213,7 +213,7 @@ function f_init_gsup(charstring id) runs on MTC_CT {
[] GSUP_IPA_EVENT.receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_UP)) { }
[] T.timeout {
setverdict(fail, "No connection to GSUP Port");
self.stop
mtc.stop
}
}
}
@ -226,7 +226,7 @@ function f_init(integer num_bsc := 1) runs on MTC_CT {
g_initialized := true;
if (num_bsc > NUM_BSC) {
setverdict(fail, "excess number of BSC instances requested");
testcase.stop("excess number of BSC instances requested");
}
for (var integer i := 0; i < num_bsc; i := i + 1) {
@ -234,7 +234,7 @@ function f_init(integer num_bsc := 1) runs on MTC_CT {
f_bssap_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), BSC_BssmapOps);
f_bssap_start(g_bssap[i]);
} else {
setverdict(fail, "missing BSSAP configuration");
testcase.stop("missing BSSAP configuration");
}
}
@ -529,7 +529,7 @@ private function f_tc_lu_imsi_reject(charstring id, BSC_ConnHdlrPars pars) runs
}
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Acc)) {
setverdict(fail, "Expecting LU REJ, but got ACCEPT");
self.stop;
mtc.stop;
}
}
f_expect_clear();
@ -558,7 +558,7 @@ private function f_tc_lu_imsi_timeout_gsup(charstring id, BSC_ConnHdlrPars pars)
}
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Acc)) {
setverdict(fail, "Expecting LU REJ, but got ACCEPT");
self.stop;
mtc.stop;
}
}
f_expect_clear();
@ -605,11 +605,18 @@ runs on BSC_ConnHdlr {
alt {
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ)) { }
//[] BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_ACC)) { }
[] BSSAP.receive { setverdict(fail, "Received unexpected BSSAP"); }
[] BSSAP.receive {
setverdict(fail, "Received unexpected BSSAP");
mtc.stop;
}
[] GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)) {
setverdict(fail, "Unexpected GSUP UL REQ");
mtc.stop;
}
[] T.timeout {
setverdict(fail, "Timeout waiting for CM SERV REQ");
mtc.stop;
}
[] T.timeout { setverdict(fail, "Timeout waiting for CM SERV REQ"); }
}
f_expect_clear();
@ -730,6 +737,7 @@ private function f_tc_lu_clear_request(charstring id, BSC_ConnHdlrPars pars) run
/* See https://osmocom.org/issues/2862 */
[] BSSAP.receive(tr_BSSMAP_ClearCommand) {
setverdict(fail, "Got a second Clear Command, only one expected");
mtc.stop;
repeat;
}
[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
@ -840,6 +848,7 @@ private function f_tc_lu_tmsi_noauth_unknown(charstring id, BSC_ConnHdlrPars par
}
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) {
setverdict(fail, "Expected LU ACK, but received REJ");
mtc.stop;
}
}
@ -1127,7 +1136,7 @@ private function f_tc_cl3_no_payload(charstring id, BSC_ConnHdlrPars pars) runs
[] as_clear_cmd_compl_disc();
[] T.timeout {
setverdict(fail, "Timeout waiting for ClearCommand or SCCP Release");
self.stop;
mtc.stop;
}
}
setverdict(pass);
@ -1161,7 +1170,7 @@ private function f_tc_cl3_rnd_payload(charstring id, BSC_ConnHdlrPars pars) runs
[] as_clear_cmd_compl_disc();
[] T.timeout {
setverdict(fail, "Timeout waiting for ClearCommand or SCCP Release");
self.stop;
mtc.stop;
}
}
setverdict(pass);
@ -1305,7 +1314,10 @@ private function f_tc_mo_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) r
timer T := 30.0;
T.start;
alt {
[] T.timeout { setverdict(fail, "Timeout waiting for channel release"); self.stop; }
[] T.timeout {
setverdict(fail, "Timeout waiting for channel release");
mtc.stop;
}
[] 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;
@ -1317,7 +1329,10 @@ private function f_tc_mo_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) r
* the current implementation, there is no recovery mechanism implemented
* and a DLCX can not be performed as the MSC does not know a specific
* endpoint yet. */
[] MGCP.receive { setverdict(fail, "Unexpected MGCP message"); self.stop; }
[] MGCP.receive {
setverdict(fail, "Unexpected MGCP message");
mtc.stop;
}
[] as_clear_cmd_compl_disc();
}
}
@ -1405,7 +1420,10 @@ private function f_tc_mt_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) r
timer T := 30.0;
T.start;
alt {
[] T.timeout { setverdict(fail, "Timeout waiting for channel release"); self.stop; }
[] T.timeout {
setverdict(fail, "Timeout waiting for channel release");
mtc.stop;
}
[] BSSAP.receive { repeat; }
[] MNCC.receive { repeat; }
[] GSUP.receive { repeat; }
@ -1449,7 +1467,10 @@ private function f_tc_mt_t310(charstring id, BSC_ConnHdlrPars pars) runs on BSC_
timer T := 190.0;
T.start;
alt {
[] T.timeout { setverdict(fail, "Timeout waiting for T310"); self.stop; }
[] T.timeout {
setverdict(fail, "Timeout waiting for T310");
mtc.stop;
}
[] MNCC.receive(tr_MNCC_DISC_ind(cpars.mncc_callref)) {
MNCC.send(ts_MNCC_REL_req(cpars.mncc_callref, valueof(ts_MNCC_cause(23))));
}
@ -1496,7 +1517,7 @@ private function f_tc_gsup_cancel(charstring id, BSC_ConnHdlrPars pars) runs on
[] GSUP.receive(tr_GSUP_CL_RES(g_pars.imsi)) { }
[] GSUP.receive(tr_GSUP_CL_ERR(g_pars.imsi)) {
setverdict(fail, "Received GSUP Location Cancel Error");
self.stop;
mtc.stop;
}
}
@ -1508,7 +1529,7 @@ private function f_tc_gsup_cancel(charstring id, BSC_ConnHdlrPars pars) runs on
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ)) { }
[] BSSAP.receive {
setverdict(fail, "Received unexpected BSSAP instead of CM SERV REJ");
self.stop;
mtc.stop;
}
}
setverdict(pass);
@ -1581,11 +1602,11 @@ private function f_tc_lu_imsi_auth_tmsi_encr_3_1(charstring id, BSC_ConnHdlrPars
}
[] BSSAP.receive(tr_BSSMAP_CipherModeCmd(?,?)) {
setverdict(fail, "CipherModeCommand despite no A5 intersection");
self.stop;
mtc.stop;
}
[] BSSAP.receive {
setverdict(fail, "Unknown/unexpected BSSAP received");
self.stop;
mtc.stop;
}
}
setverdict(pass);
@ -1648,11 +1669,11 @@ private function f_tc_lu_imsi_auth_tmsi_encr_13_2(charstring id, BSC_ConnHdlrPar
}
[] BSSAP.receive(tr_BSSMAP_CipherModeCmd(?,?)) {
setverdict(fail, "CipherModeCommand despite no A5 intersection");
self.stop;
mtc.stop;
}
[] BSSAP.receive {
setverdict(fail, "Unknown/unexpected BSSAP received");
self.stop;
mtc.stop;
}
}
setverdict(pass);
@ -1764,6 +1785,7 @@ testcase TC_cr_before_reset() runs on MTC_CT {
[reset_ack_seen == true] T.timeout { setverdict(pass) }
[reset_ack_seen == false] T.timeout {
setverdict(fail, "no BSSMAP RESET ACK seen!");
mtc.stop;
}
}
}
@ -1999,7 +2021,7 @@ function f_sm_ton_from_gsm(BIT3 ton) return SMPP_TON {
case ('110'B) { return abbreviated; }
}
setverdict(fail, "Unknown TON ", ton);
self.stop;
mtc.stop;
}
/* convert GSM L3 NPI to SMPP_NPI enum */
function f_sm_npi_from_gsm(BIT4 npi) return SMPP_NPI {
@ -2014,7 +2036,7 @@ function f_sm_npi_from_gsm(BIT4 npi) return SMPP_NPI {
case ('1010'B) { return ermes; }
}
setverdict(fail, "Unknown NPI ", npi);
self.stop;
mtc.stop;
}
/* build a SMPP_SM from SmsParameters */
@ -2154,7 +2176,7 @@ runs on BSC_ConnHdlr {
}
[] BSSAP.receive {
setverdict(fail, "Unknown/unexpected BSSAP received");
self.stop;
mtc.stop;
}
}
@ -2217,7 +2239,7 @@ runs on BSC_ConnHdlr {
}
[] BSSAP.receive {
setverdict(fail, "Unknown/unexpected BSSAP received");
self.stop;
mtc.stop;
}
}

View File

@ -121,7 +121,7 @@ private function f_UlTbf_ack_one_block(inout UlTbfState us, integer n) {
var integer idx := n - us.et.v_a;
if (idx < 0 or idx > lengthof(us.et.v_b)) {
setverdict(fail, "UlTbf: Cannot ACK ", n, " while V(A) is ", us.et.v_a);
self.stop;
mtc.stop;
}
/* set the bit in the acknowledge state array */
us.et.v_b[idx] := '1'B;
@ -411,7 +411,7 @@ function f_dl_tbf_mod_sns(DlTbfState ds, integer val) return integer
function f_dl_tbf_is_in_window(integer bsn) return boolean {
setverdict(fail, "pleaes implement me");
self.stop;
mtc.stop;
}
function f_dl_tbf_is_received(inout DlTbfState ds, integer bsn) return boolean {
@ -471,7 +471,7 @@ function f_dl_tbf_process_dl_data(inout DlTbfState ds, RlcmacDlDataBlock db) {
var integer bsn := db.mac_hdr.hdr_ext.bsn;
if (db.mac_hdr.hdr_ext.tfi != ds.tfi) {
setverdict(fail, "Unexpected TFI of DL Data Block ", db);
self.stop;
mtc.stop;
}
f_dl_tbf_mark_received(ds, bsn);
if (ds.tbf.ack_mode) {
@ -480,7 +480,7 @@ function f_dl_tbf_process_dl_data(inout DlTbfState ds, RlcmacDlDataBlock db) {
* SNS */
if (bsn < ds.er.v_q or bsn > ds.er.v_q + ds.tbf.ws) {
setverdict(fail, "Unexpected BSN outside of window ", bsn);
self.stop;
mtc.stop;
}
/* In RLC acknowledged mode, the value of V(Q) shall be updated when the RLC

View File

@ -131,7 +131,8 @@ module PCU_Tests {
log("NS Expected: ", b);
if (a != b) {
setverdict(fail);
setverdict(fail, "Values mismatch", a, b);
mtc.stop;
} else {
setverdict(pass);
}
@ -188,7 +189,10 @@ module PCU_Tests {
alt {
[] BSSGP.receive(t_BssgpStsInd(?, ?, BVC_S_UNBLOCKED)) { }
[] BSSGP.receive { repeat; }
[] T.timeout { setverdict(fail); }
[] T.timeout {
setverdict(fail, "Timeout establishing BSSGP connection");
mtc.stop;
}
}
T.stop
log("BSSGP successfully initialized");
@ -233,7 +237,7 @@ module PCU_Tests {
[] L1.receive { repeat; }
[] T.timeout {
setverdict(fail, "Timeout establishing UL TBF");
self.stop;
mtc.stop;
}
}
T.stop;
@ -275,6 +279,7 @@ function f_bssgp_wait_ul_ud(template BssgpDecoded bd_exp) runs on dummy_CT {
}
[] T.timeout {
setverdict(fail, "Timeout waiting for ", bd_exp);
mtc.stop;
}
}
}
@ -365,7 +370,8 @@ function f_ul_tbf(inout UlTbfState us) runs on dummy_CT {
log("LLC Expected: ", b);
if (a != b) {
setverdict(fail);
setverdict(fail, "LLC input ", b, " != expected ", a);
mtc.stop;
} else {
setverdict(pass);
}
@ -437,7 +443,10 @@ function f_ul_tbf(inout UlTbfState us) runs on dummy_CT {
log("Dec: ", udb);
var octetstring enc := enc_RlcmacUlBlock(udb);
log("Enc: ", enc);
if (enc != buf) { setverdict(fail, "Re-encoded data doesn't equal input data"); }
if (enc != buf) {
setverdict(fail, "Re-encoded data doesn't equal input data");
mtc.stop;
}
}
function f_rlcmac_uld_decenc(in octetstring buf) {
@ -447,7 +456,10 @@ function f_ul_tbf(inout UlTbfState us) runs on dummy_CT {
log("Dec: ", udb);
var octetstring enc := enc_RlcmacUlDataBlock(udb);
log("Enc: ", enc);
if (enc != buf) { setverdict(fail, "Re-encoded data doesn't equal input data"); }
if (enc != buf) {
setverdict(fail, "Re-encoded data doesn't equal input data");
mtc.stop;
}
}
function f_rlcmac_dld_decenc(in octetstring buf) {
@ -457,7 +469,10 @@ function f_ul_tbf(inout UlTbfState us) runs on dummy_CT {
log("Dec: ", udb);
var octetstring enc := enc_RlcmacDlDataBlock(udb);
log("Enc: ", enc);
if (enc != buf) { setverdict(fail, "Re-encoded data doesn't equal input data"); }
if (enc != buf) {
setverdict(fail, "Re-encoded data doesn't equal input data");
mtc.stop;
}
}
@ -561,7 +576,7 @@ function f_ul_tbf(inout UlTbfState us) runs on dummy_CT {
[] L1.receive { repeat };
[] T.timeout {
setverdict(fail, "Timeout waiting for IMM ASS")
self.stop;
mtc.stop;
}
}
T.stop;

View File

@ -57,7 +57,7 @@ function f_tcp_client_init() runs on IPA_selftest_CT {
res := IPL4asp_PortType.f_IPL4_connect(IP, "127.0.0.1", 55555, "", -1,-1, {tcp:={}});
if (not ispresent(res.connId)) {
setverdict(fail, "Could not connect to TCP port, check your configuration");
self.stop;
mtc.stop;
}
g_ip_conn_id := res.connId;
}

View File

@ -134,7 +134,7 @@ private function f_init_gsup(charstring id) runs on test_CT {
[] GSUP_IPA_EVENT.receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_UP)) { }
[] T.timeout {
setverdict(fail, "No connection to GSUP Port");
self.stop;
mtc.stop;
}
}
}
@ -240,7 +240,7 @@ runs on test_CT return BSSGP_ConnHdlr {
private altstep as_Tguard() runs on BSSGP_ConnHdlr {
[] g_Tguard.timeout {
setverdict(fail, "Tguard timeout");
self.stop;
mtc.stop;
}
}
@ -385,19 +385,19 @@ function f_process_attach_accept(PDU_GMM_AttachAccept aa) runs on BSSGP_ConnHdlr
if (not (g_pars.bssgp_cell_id.ra_id.lai.mcc_mnc == aa_plmn)) {
setverdict(fail, "mismatching PLMN in Attach Accept: " & hex2str(aa_plmn)
& "; expected " & hex2str(g_pars.bssgp_cell_id.ra_id.lai.mcc_mnc));
self.stop;
mtc.stop;
}
g_pars.ra := aa.routingAreaIdentification;
if (ispresent(aa.allocatedPTMSI)) {
if (not g_pars.net.expect_ptmsi) {
setverdict(fail, "unexpected P-TMSI allocation");
self.stop;
mtc.stop;
}
f_upd_ptmsi_and_tlli(aa.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets);
}
if (ispresent(aa.msIdentity)) {
setverdict(fail, "unexpected TMSI allocation in non-combined attach");
self.stop;
mtc.stop;
}
/* P-TMSI.sig */
if (ispresent(aa.ptmsiSignature)) {
@ -414,13 +414,13 @@ function f_process_rau_accept(PDU_GMM_RoutingAreaUpdateAccept ra) runs on BSSGP_
if (ispresent(ra.allocatedPTMSI)) {
if (not g_pars.net.expect_ptmsi) {
setverdict(fail, "unexpected P-TMSI allocation");
self.stop;
mtc.stop;
}
f_upd_ptmsi_and_tlli(ra.allocatedPTMSI.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets);
}
if (ispresent(ra.msIdentity)) {
setverdict(fail, "unexpected TMSI allocation in non-combined attach");
self.stop;
mtc.stop;
}
/* P-TMSI.sig */
if (ispresent(ra.ptmsiSignature)) {
@ -540,6 +540,7 @@ private function f_TC_attach_auth_id_timeout(charstring id) runs on BSSGP_ConnHd
}
[] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
setverdict(fail, "Wrong Attach Reject Cause");
mtc.stop;
}
}
}
@ -608,6 +609,7 @@ private function f_TC_attach_gsup_lu_timeout(charstring id) runs on BSSGP_ConnHd
[] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
setverdict(fail);
mtc.stop;
}
}
}
@ -637,6 +639,7 @@ private function f_TC_attach_gsup_lu_reject(charstring id) runs on BSSGP_ConnHdl
[] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
setverdict(fail);
mtc.stop;
}
}
}
@ -718,6 +721,7 @@ private function f_TC_attach_closed_foreign(charstring id) runs on BSSGP_ConnHdl
}
[] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) {
setverdict(fail);
mtc.stop;
}
}
}
@ -771,6 +775,7 @@ private function f_TC_attach_rau(charstring id) runs on BSSGP_ConnHdlr {
}
[] BSSGP.receive(tr_BD_L3_MT(tr_GMM_RAU_REJECT)) {
setverdict(fail, "Unexpected RAU Reject");
mtc.stop;
}
[] BSSGP.receive { repeat; }
}
@ -796,10 +801,12 @@ function f_detach_mo(BIT3 detach_type, boolean power_off, boolean expect_purge)
alt {
[not expect_purge] GSUP.receive(tr_GSUP_PURGE_MS_REQ(?)) {
setverdict(fail, "Unexpected GSUP PURGE MS for unregistered TLLI");
mtc.stop;
}
[power_off] BSSGP.receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> value bd {
g_pars.ra := omit;
setverdict(fail, "Unexpected ATTACH ACCEPT in no-power-off DETACH");
mtc.stop;
/* TODO: check if any PDP contexts are deactivated on network side? */
}
[power_off] T.timeout {
@ -930,9 +937,11 @@ function f_pdp_ctx_act(inout PdpActPars apars, boolean send_recovery := false) r
}
[exp_rej] BSSGP.receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT)) {
setverdict(fail, "Unexpected PDP CTX ACT ACC");
mtc.stop;
}
[not exp_rej] BSSGP.receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) {
setverdict(fail, "Unexpected PDP CTX ACT FAIL");
mtc.stop;
}
[not exp_rej] BSSGP.receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(apars.tid, apars.sapi))) {
setverdict(pass);
@ -1159,9 +1168,11 @@ private function f_TC_pdp_act_unattached(charstring id) runs on BSSGP_ConnHdlr {
}
[] GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) {
setverdict(fail, "Unexpected GTP PDP CTX ACT");
mtc.stop;
}
[] BSSGP.receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(?, ?))) {
setverdict(fail, "Unexpected SM PDP CTX ACT ACK");
mtc.stop;
}
[] BSSGP.receive { repeat; }
}
@ -1403,10 +1414,11 @@ private function f_TC_hlr_location_cancel_request_update(charstring id) runs on
[] BSSGP.receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(*, *, *))) {
T.stop;
setverdict(fail, "Unexpected GMM Detach Request");
mtc.stop;
}
[] T.timeout {
setverdict(pass);
self.stop;
mtc.stop;
}
[] BSSGP.receive {
repeat;
@ -1569,6 +1581,7 @@ private function f_TC_attach_no_imei_response(charstring id) runs on BSSGP_ConnH
}
if (count_req != 5) {
setverdict(fail, "Did not received GMM ID Request Type IMEI 5 times!");
mtc.stop;
}
setverdict(pass);
}
@ -1616,6 +1629,7 @@ private function f_TC_attach_no_imsi_response(charstring id) runs on BSSGP_ConnH
}
if (count_req != 5) {
setverdict(fail, "Did not received GMM ID Request Type IMSI 5 times!");
mtc.stop;
}
setverdict(pass);
}
@ -1675,6 +1689,7 @@ private function f_TC_attach_closed_imsi_added(charstring id) runs on BSSGP_Conn
alt {
[] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
setverdict(fail, "Received unexpected GMM Attach REJECT");
mtc.stop;
}
[] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) -> value bd {
f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
@ -1730,6 +1745,7 @@ private function f_TC_attach_check_complete_resend(charstring id) runs on BSSGP_
}
if (count_req != 5) {
setverdict(fail, "Did not received GMM Attach Complete.");
mtc.stop;
}
setverdict(pass);
}

View File

@ -131,7 +131,7 @@ runs on test_CT return ConnHdlr {
private altstep as_Tguard() runs on ConnHdlr {
[] g_Tguard.timeout {
setverdict(fail, "Tguard timeout");
self.stop;
mtc.stop;
}
}

View File

@ -139,8 +139,8 @@ module Test {
/* ensure a given TC slot of the SI vector contains given SI type at least once at TC */
function f_ensure_si_vec_contains(SystemInformationVectorPerTc arr, integer tc, RrMessageType key, boolean ext_bcch := false) {
if (not f_si_vecslot_contains(arr[tc], key, ext_bcch)) {
log("Fail: No ", key, " in TC=", tc, "!");
setverdict(fail);
setverdict(fail, "Fail: No ", key, " in TC=", tc, "!");
mtc.stop;
}
}
@ -180,8 +180,8 @@ module Test {
/* ensure a given TC slot of the SI vector contains given SI type at least N out of M times at TC */
function f_ensure_si_vec_contains_n_of_m(SystemInformationVectorPerTc arr, integer tc, RrMessageType key, boolean ext_bcch := false, integer n, integer m) {
if (not f_si_vecslot_contains_n_of_m(arr[tc], key, ext_bcch, n, m)) {
log("Fail: Not ", n, "/", m, " of ", key, " in TC=", tc, "!");
setverdict(fail);
setverdict(fail, "Fail: Not ", n, "/", m, " of ", key, " in TC=", tc, "!");
mtc.stop;
}
}
@ -202,8 +202,8 @@ module Test {
/* ensure a given TC slot of the SI vector contains only given SI type */
function f_ensure_si_vec_contains_only(SystemInformationVectorPerTc arr, integer tc, RrMessageType key, boolean ext_bcch := false) {
if (not f_si_vecslot_contains_only(arr[tc], key, ext_bcch)) {
log("Fail: Not all ", key, " in TC=", tc, "!");
setverdict(fail);
setverdict(fail, "Fail: Not all ", key, " in TC=", tc, "!");
mtc.stop;
}
}
@ -233,6 +233,7 @@ module Test {
for (i := 0; i < sizeof(si_per_tc); i := i + 1) {
if (sizeof(si_per_tc[i]) == 0) {
setverdict(fail, "No SI messages for TC=0!");
mtc.stop;
}
}
if (cfg.si1_present) {
@ -313,6 +314,7 @@ module Test {
}
if (f_si_vec_contains(si_per_tc, SYSTEM_INFORMATION_TYPE_13alt)) {
setverdict(fail, "Cannot have SI13alt and SI13");
mtc.stop;
}
}
if (cfg.si16_present or cfg.si17_present) {
@ -323,6 +325,7 @@ module Test {
}
if (f_si_vec_contains(si_per_tc, SYSTEM_INFORMATION_TYPE_22)) {
setverdict(fail, "Cannot have SI16/SI17 and SI22!");
mtc.stop;
}
if (not cfg.bcch_extended) {
testcase.stop("Error: SI16/SI17 requires BCCH Extd!");
@ -368,6 +371,7 @@ module Test {
}
if (f_si_vec_contains(si_per_tc, SYSTEM_INFORMATION_TYPE_13)) {
setverdict(fail, "Cannot have SI13alt and SI13");
mtc.stop;
}
if (not cfg.bcch_extended) {
f_ensure_si_vec_contains_n_of_m(si_per_tc, 4, SYSTEM_INFORMATION_TYPE_13alt, false, 1, 4);
@ -399,6 +403,7 @@ module Test {
f_ensure_si_vec_contains_n_of_m(si_per_tc, 4, SYSTEM_INFORMATION_TYPE_21, true, 1, 4);
if (f_si_vecslot_contains(si_per_tc[4], SYSTEM_INFORMATION_TYPE_21)) {
setverdict(fail, "Cannot have SI21 on BCCH Norm if BCCH Extd enabled!");
mtc.stop;
}
}
}
@ -413,6 +418,7 @@ module Test {
if (f_si_vec_contains(si_per_tc, SYSTEM_INFORMATION_TYPE_16) or
f_si_vec_contains(si_per_tc, SYSTEM_INFORMATION_TYPE_17)) {
setverdict(fail, "Cannot have SI16/SI17 and SI22!");
mtc.stop;
}
if (not cfg.bcch_extended) {
testcase.stop("Error: SI22 requires BCCH Extd!");
@ -484,6 +490,7 @@ module Test {
var SystemInformation si := f_gsmtap_get_si(pt, msg_type);
if (not match(si, t)) {
setverdict(fail, "SI ", si, " doesn't match ", t);
mtc.stop;
} else {
setverdict(pass);
}