Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 1 | module BSC_Tests { |
| 2 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 3 | import from General_Types all; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 4 | import from Osmocom_Types all; |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 5 | import from GSM_Types all; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 6 | import from IPL4asp_Types all; |
| 7 | |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 8 | import from BSSAP_Types all; |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 9 | import from BSSAP_Adapter all; |
| 10 | import from BSSAP_CodecPort all; |
| 11 | import from BSSMAP_Templates all; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 12 | import from IPA_Emulation all; |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 13 | import from IPA_Types all; |
| 14 | import from RSL_Types all; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 15 | |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 16 | import from Osmocom_CTRL_Functions all; |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 17 | import from Osmocom_CTRL_Types all; |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 18 | |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 19 | import from MobileL3_CommonIE_Types all; |
| 20 | import from L3_Templates all; |
| 21 | import from GSM_RR_Types all; |
| 22 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 23 | import from RSL_Tests all; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 24 | |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 25 | const integer NUM_BTS := 3; |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 26 | const float T3101_MAX := 12.0; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 27 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 28 | |
| 29 | /* BSC specific CTRL helper functions */ |
| 30 | function f_ctrl_get_bts(IPA_CTRL_PT pt, integer bts_nr, charstring suffix) return CtrlValue { |
| 31 | return f_ctrl_get(pt, "bts." & int2str(bts_nr) & "." & suffix); |
| 32 | } |
| 33 | |
| 34 | template charstring ts_bts(integer bts_nr) := "bts." & int2str(bts_nr) & "."; |
| 35 | template charstring ts_bts_trx(integer bts_nr, integer trx_nr ) := |
| 36 | valueof(ts_bts(bts_nr)) & "trx." & int2str(trx_nr) & "."; |
| 37 | |
| 38 | function f_ctrl_get_exp_bts(IPA_CTRL_PT pt, integer bts_nr, CtrlVariable suffix, template CtrlValue exp) { |
| 39 | f_ctrl_get_exp(pt, valueof(ts_bts(bts_nr)) & suffix, exp); |
| 40 | } |
| 41 | |
| 42 | function f_ctrl_get_exp_trx(IPA_CTRL_PT pt, integer bts_nr, integer trx_nr, CtrlVariable suffix, |
| 43 | template CtrlValue exp) |
| 44 | { |
| 45 | f_ctrl_get_exp(pt, valueof(ts_bts_trx(bts_nr, trx_nr)) & suffix, exp); |
| 46 | } |
| 47 | |
| 48 | |
| 49 | |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 50 | type record BTS_State { |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 51 | IPA_Client rsl |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 52 | } |
| 53 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 54 | type component test_CT extends BSSAP_Adapter_CT { |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 55 | var BTS_State bts[NUM_BTS]; |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 56 | port IPA_RSL_PT IPA_RSL[NUM_BTS]; |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 57 | |
| 58 | var IPA_Client ctrl; |
| 59 | port IPA_CTRL_PT IPA_CTRL; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 60 | |
| 61 | var boolean g_initialized := false; |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 62 | timer T_guard := 30.0; |
| 63 | |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | modulepar { |
Harald Welte | 696ddb6 | 2017-12-08 14:01:43 +0100 | [diff] [blame] | 67 | charstring mp_bsc_ip := "127.0.0.1"; |
| 68 | integer mp_bsc_rsl_port := 3003; |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 69 | integer mp_bsc_ctrl_port := 4249; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 70 | } |
| 71 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 72 | type record IPA_Client { |
| 73 | IPA_Emulation_CT vc_IPA, |
| 74 | IPA_CCM_Parameters ccm_pars, |
| 75 | charstring id |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 76 | } |
| 77 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 78 | function f_ipa_rsl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i) |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 79 | runs on test_CT { |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 80 | timer T := 10.0; |
| 81 | |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 82 | clnt.id := "IPA" & int2str(i) & "-RSL"; |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 83 | clnt.vc_IPA := IPA_Emulation_CT.create(clnt.id & "-IPA"); |
| 84 | clnt.ccm_pars := c_IPA_default_ccm_pars; |
| 85 | clnt.ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; |
| 86 | clnt.ccm_pars.unit_id := int2str(1234+i) & "/0/0"; |
| 87 | |
| 88 | map(clnt.vc_IPA:IPA_PORT, system:IPA_CODEC_PT); |
| 89 | connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]); |
| 90 | |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 91 | clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", 10000+i, clnt.ccm_pars)); |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 92 | |
| 93 | /* wait for IPA RSL link to connect and send ID ACK */ |
| 94 | T.start; |
| 95 | alt { |
| 96 | [] IPA_RSL[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { |
| 97 | T.stop; |
| 98 | IPA_RSL[i].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_PAGING_LOAD_IND(23))); |
| 99 | } |
Harald Welte | 60e823a | 2017-12-10 14:10:59 +0100 | [diff] [blame] | 100 | [] IPA_RSL[i].receive(ASP_IPA_Event:?) { repeat } |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 101 | [] IPA_RSL[i].receive { repeat } |
| 102 | [] T.timeout { |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 103 | setverdict(fail, "Timeout RSL waiting for ASP_IPA_EVENT_ID_ACK"); |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 104 | self.stop; |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 109 | function f_ipa_ctrl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i) |
| 110 | runs on test_CT { |
| 111 | timer T := 10.0; |
| 112 | |
| 113 | clnt.id := "IPA" & int2str(i) & "-CTRL"; |
| 114 | clnt.vc_IPA := IPA_Emulation_CT.create(clnt.id & "-IPA"); |
| 115 | |
| 116 | map(clnt.vc_IPA:IPA_PORT, system:IPA_CODEC_PT); |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 117 | connect(clnt.vc_IPA:IPA_CTRL_PORT, self:IPA_CTRL); |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 118 | |
| 119 | clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", -1)); |
| 120 | |
| 121 | /* wait for IPA CTRL link to connect and send UP */ |
| 122 | T.start; |
| 123 | alt { |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 124 | [] IPA_CTRL.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { } |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 125 | [] T.timeout { |
| 126 | setverdict(fail, "Timeout CTRL waiting for ASP_IPA_EVENT_UP"); |
| 127 | self.stop; |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 133 | function f_wait_oml(integer bts_nr, charstring status, float secs_max) runs on test_CT { |
| 134 | timer T := secs_max; |
| 135 | T.start; |
| 136 | while (true) { |
| 137 | if (f_ctrl_get_bts(IPA_CTRL, bts_nr, "oml-connection-state") == status) { |
| 138 | T.stop; |
Harald Welte | bd868bd | 2017-12-10 18:28:40 +0100 | [diff] [blame] | 139 | /* the 'degraded' state exists from OML connection time, and we have to wait |
| 140 | * until all MO's are initialized */ |
| 141 | T.start(1.0); |
| 142 | T.timeout; |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 143 | return; |
| 144 | } |
Harald Welte | bd868bd | 2017-12-10 18:28:40 +0100 | [diff] [blame] | 145 | f_sleep(0.5); |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 146 | if (not T.running) { |
| 147 | setverdict(fail, "Timeout waiting for oml-connection-state ", status); |
| 148 | self.stop; |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 153 | function f_sleep(float seconds) { |
| 154 | timer T := seconds; |
| 155 | T.start; |
| 156 | T.timeout; |
| 157 | } |
| 158 | |
| 159 | altstep as_Tguard() runs on test_CT { |
Harald Welte | 60e823a | 2017-12-10 14:10:59 +0100 | [diff] [blame] | 160 | var BSSAP_N_UNITDATA_ind ud_ind; |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 161 | [] T_guard.timeout { setverdict(fail, "Timeout of T_guard"); } |
Harald Welte | 60e823a | 2017-12-10 14:10:59 +0100 | [diff] [blame] | 162 | /* always respond with RESET ACK to RESET */ |
| 163 | [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { |
| 164 | BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, |
| 165 | ts_BSSMAP_ResetAck)); |
Harald Welte | 69c1c26 | 2017-12-13 21:02:08 +0100 | [diff] [blame] | 166 | repeat; |
Harald Welte | 60e823a | 2017-12-10 14:10:59 +0100 | [diff] [blame] | 167 | } |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | function f_init() runs on test_CT { |
| 171 | var integer i; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 172 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 173 | if (g_initialized) { |
| 174 | return; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 175 | } |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 176 | g_initialized := true; |
| 177 | |
| 178 | /* Call a function of our 'parent component' BSSAP_Adapter_CT to start the |
| 179 | * MSC-side BSSAP emulation */ |
| 180 | f_bssap_init("VirtMSC"); |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 181 | f_ipa_ctrl_start(ctrl, mp_bsc_ip, mp_bsc_ctrl_port, 0); |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 182 | |
Harald Welte | 696ddb6 | 2017-12-08 14:01:43 +0100 | [diff] [blame] | 183 | for (i := 0; i < NUM_BTS; i := i+1) { |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 184 | /* wait until osmo-bts-omldummy has respawned */ |
| 185 | f_wait_oml(i, "degraded", 5.0); |
| 186 | /* start RSL connection */ |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 187 | f_ipa_rsl_start(bts[i].rsl, mp_bsc_ip, mp_bsc_rsl_port, i); |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 188 | /* wait until BSC tells us "connected" */ |
| 189 | f_wait_oml(i, "connected", 5.0); |
Harald Welte | 696ddb6 | 2017-12-08 14:01:43 +0100 | [diff] [blame] | 190 | } |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 191 | f_sleep(0.5); |
Harald Welte | 696ddb6 | 2017-12-08 14:01:43 +0100 | [diff] [blame] | 192 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 193 | T_guard.start; |
| 194 | activate(as_Tguard()); |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 195 | } |
| 196 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 197 | function f_exp_ipa_rx(integer bts_nr, template RSL_Message t_rx, float t_secs := 2.0, IpaStreamId sid := IPAC_PROTO_RSL_TRX0) |
| 198 | runs on test_CT return RSL_Message { |
| 199 | var ASP_RSL_Unitdata rx_rsl_ud; |
| 200 | timer T := t_secs; |
| 201 | |
| 202 | T.start; |
| 203 | alt { |
| 204 | [] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(sid, t_rx)) -> value rx_rsl_ud { |
| 205 | T.stop; |
| 206 | } |
| 207 | [] IPA_RSL[bts_nr].receive { repeat; } |
Harald Welte | b291770 | 2017-12-10 15:48:52 +0100 | [diff] [blame] | 208 | [] T.timeout { |
| 209 | setverdict(fail, "Timeout expecting ", t_rx); |
| 210 | self.stop; |
| 211 | } |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 212 | } |
| 213 | return rx_rsl_ud.rsl; |
| 214 | } |
| 215 | |
| 216 | function f_ipa_tx(integer bts_nr, template RSL_Message t_tx, IpaStreamId sid := IPAC_PROTO_RSL_TRX0) |
| 217 | runs on test_CT { |
| 218 | IPA_RSL[bts_nr].send(ts_ASP_RSL_UD(sid, t_tx)); |
| 219 | } |
| 220 | |
| 221 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 222 | /* verify we get a CHAN_ACT after CHAN RQD */ |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 223 | testcase TC_chan_act_noreply() runs on test_CT { |
| 224 | var BSSAP_N_UNITDATA_ind ud_ind; |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 225 | |
| 226 | f_init(); |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 227 | f_bssap_reset(); |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 228 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 229 | IPA_RSL[0].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_CHAN_RQD('23'O, 23))); |
| 230 | f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); |
| 231 | setverdict(pass); |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 232 | } |
| 233 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 234 | /* verify if the "chreq:total" counter increments as expected */ |
| 235 | testcase TC_chan_act_counter() runs on test_CT { |
| 236 | var BSSAP_N_UNITDATA_ind ud_ind; |
| 237 | var integer chreq_total; |
| 238 | |
| 239 | f_init(); |
| 240 | f_bssap_reset(); |
| 241 | |
| 242 | chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); |
| 243 | IPA_RSL[0].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_CHAN_RQD('23'O, 23))); |
| 244 | f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); |
| 245 | f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", chreq_total+1); |
| 246 | |
| 247 | setverdict(pass); |
| 248 | } |
| 249 | |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 250 | /* CHAN RQD -> CHAN ACT -> CHAN ACT ACK -> RF CHAN REL */ |
| 251 | testcase TC_chan_act_ack_noest() runs on test_CT { |
| 252 | var RSL_Message rx_rsl; |
| 253 | |
| 254 | f_init(); |
| 255 | f_bssap_reset(); |
| 256 | |
| 257 | /* Send CHAN RQD and wait for allocation; acknowledge it */ |
Harald Welte | d693965 | 2017-12-13 21:02:46 +0100 | [diff] [blame] | 258 | var RslChannelNr chan_nr := f_chreq_act_ack(); |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 259 | |
| 260 | /* expect BSC to disable the channel again if there's no RLL EST IND */ |
| 261 | rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), T3101_MAX); |
| 262 | |
| 263 | setverdict(pass); |
| 264 | } |
| 265 | |
| 266 | /* Test behavior if MSC never answers to CR */ |
| 267 | testcase TC_chan_act_ack_est_ind_noreply() runs on test_CT { |
| 268 | var RSL_Message rx_rsl; |
| 269 | |
| 270 | f_init(); |
| 271 | f_bssap_reset(); |
| 272 | |
| 273 | /* Send CHAN RQD and wait for allocation; acknowledge it */ |
Harald Welte | d693965 | 2017-12-13 21:02:46 +0100 | [diff] [blame] | 274 | var RslChannelNr chan_nr := f_chreq_act_ack(); |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 275 | |
| 276 | var octetstring l3 := '00010203040506'O |
| 277 | f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); |
| 278 | |
| 279 | BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))); |
| 280 | |
| 281 | /* expect BSC to disable the channel again if there's no response from MSC */ |
| 282 | rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), T3101_MAX); |
| 283 | |
| 284 | setverdict(pass); |
| 285 | } |
| 286 | |
| 287 | /* Test behavior if MSC answers with CREF to CR */ |
| 288 | testcase TC_chan_act_ack_est_ind_refused() runs on test_CT { |
| 289 | var BSSAP_N_CONNECT_ind rx_c_ind; |
| 290 | var RSL_Message rx_rsl; |
| 291 | |
| 292 | f_init(); |
| 293 | f_bssap_reset(); |
| 294 | |
| 295 | /* Send CHAN RQD and wait for allocation; acknowledge it */ |
Harald Welte | d693965 | 2017-12-13 21:02:46 +0100 | [diff] [blame] | 296 | var RslChannelNr chan_nr := f_chreq_act_ack(); |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 297 | |
| 298 | var octetstring l3 := '00010203040506'O |
| 299 | f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); |
| 300 | |
| 301 | BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) -> value rx_c_ind; |
| 302 | BSSAP.send(ts_BSSAP_DISC_req(rx_c_ind.connectionId, 0)); |
| 303 | |
| 304 | /* expect BSC to disable the channel */ |
| 305 | rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), T3101_MAX); |
| 306 | |
| 307 | setverdict(pass); |
| 308 | } |
| 309 | |
Harald Welte | 618ef64 | 2017-12-14 14:58:20 +0100 | [diff] [blame] | 310 | /* CHAN RQD -> CHAN ACT -> CHAN ACT NACK -> RF CHAN REL */ |
| 311 | testcase TC_chan_act_nack() runs on test_CT { |
| 312 | var RSL_Message rx_rsl; |
| 313 | var integer chact_nack; |
| 314 | |
| 315 | f_init(); |
| 316 | f_bssap_reset(); |
| 317 | |
| 318 | chact_nack := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack"); |
| 319 | |
| 320 | f_ipa_tx(0, ts_RSL_CHAN_RQD('33'O, 33)); |
| 321 | rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); |
| 322 | var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; |
| 323 | |
| 324 | f_ipa_tx(0, ts_RSL_CHAN_ACT_NACK(chan_nr, RSL_ERR_EQUIPMENT_FAIL)); |
| 325 | |
| 326 | /* wait for some time to hope the NACK arrives before the CTRL GET below */ |
| 327 | f_sleep(0.5); |
| 328 | |
| 329 | f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack", chact_nack+1); |
| 330 | |
| 331 | setverdict(pass); |
| 332 | } |
| 333 | |
| 334 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 335 | type record DchanTuple { |
| 336 | integer sccp_conn_id, |
| 337 | RslChannelNr rsl_chan_nr |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 338 | } |
| 339 | |
Harald Welte | d693965 | 2017-12-13 21:02:46 +0100 | [diff] [blame] | 340 | /* Send CHAN RQD and wait for allocation; acknowledge it */ |
| 341 | private function f_chreq_act_ack(OCT1 ra := '23'O, GsmFrameNumber fn := 23) |
| 342 | runs on test_CT return RslChannelNr { |
| 343 | var RSL_Message rx_rsl; |
| 344 | f_ipa_tx(0, ts_RSL_CHAN_RQD(ra, fn)); |
| 345 | rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); |
| 346 | var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; |
| 347 | f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, fn+10)); |
| 348 | return chan_nr; |
| 349 | } |
| 350 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 351 | /* helper function to establish a dedicated channel via BTS and MSC */ |
| 352 | function f_est_dchan(OCT1 ra, GsmFrameNumber fn, octetstring l3) |
| 353 | runs on test_CT return DchanTuple { |
| 354 | var BSSAP_N_CONNECT_ind rx_c_ind; |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 355 | var DchanTuple dt; |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 356 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 357 | /* Send CHAN RQD and wait for allocation; acknowledge it */ |
Harald Welte | d693965 | 2017-12-13 21:02:46 +0100 | [diff] [blame] | 358 | dt.rsl_chan_nr := f_chreq_act_ack(ra, fn); |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 359 | |
| 360 | f_ipa_tx(0, ts_RSL_EST_IND(dt.rsl_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); |
| 361 | |
| 362 | BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) -> value rx_c_ind; |
| 363 | dt.sccp_conn_id := rx_c_ind.connectionId; |
| 364 | BSSAP.send(ts_BSSAP_CONNECT_res(dt.sccp_conn_id)); |
| 365 | |
| 366 | return dt; |
Harald Welte | a5d2ab2 | 2017-12-09 14:21:42 +0100 | [diff] [blame] | 367 | } |
| 368 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 369 | /* Test behavior of channel release after unilateral RLL REL IND (DISC from MS) */ |
| 370 | testcase TC_chan_rel_rll_rel_ind() runs on test_CT { |
| 371 | var RSL_Message rx_rsl; |
| 372 | var DchanTuple dt; |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 373 | |
| 374 | f_init(); |
| 375 | f_bssap_reset(); |
| 376 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 377 | dt := f_est_dchan('23'O, 23, '00010203040506'O); |
| 378 | |
| 379 | /* simulate RLL REL IND */ |
| 380 | f_ipa_tx(0, ts_RSL_REL_IND(dt.rsl_chan_nr, valueof(ts_RslLinkID_DCCH(0)))); |
| 381 | |
| 382 | /* expect BSC to disable the channel */ |
| 383 | rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), T3101_MAX); |
| 384 | /* respond with CHAN REL ACK */ |
| 385 | f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(dt.rsl_chan_nr)); |
| 386 | |
| 387 | /* expect DISC_IND on MSC side */ |
| 388 | BSSAP.receive(tr_BSSAP_DISC_ind(dt.sccp_conn_id, ?, ?)); |
| 389 | |
| 390 | setverdict(pass); |
| 391 | } |
| 392 | |
| 393 | /* Test behavior of channel release after CONN FAIL IND from BTS */ |
| 394 | testcase TC_chan_rel_conn_fail() runs on test_CT { |
| 395 | var BSSAP_N_DATA_ind rx_di; |
| 396 | var RSL_Message rx_rsl; |
| 397 | var DchanTuple dt; |
| 398 | |
| 399 | f_init(); |
| 400 | f_bssap_reset(); |
| 401 | |
| 402 | dt := f_est_dchan('23'O, 23, '00010203040506'O); |
| 403 | |
| 404 | /* simulate CONN FAIL IND */ |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 405 | f_ipa_tx(0, ts_RSL_CONN_FAIL_IND(dt.rsl_chan_nr, RSL_ERR_RADIO_LINK_FAIL)); |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 406 | /* TODO: different cause values? */ |
| 407 | |
| 408 | /* expect BSC to disable the channel */ |
| 409 | rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), T3101_MAX); |
| 410 | /* respond with CHAN REL ACK */ |
| 411 | f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(dt.rsl_chan_nr)); |
| 412 | |
| 413 | /* expect Clear Request from BSC */ |
| 414 | BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_ClearRequest)) -> value rx_di; |
| 415 | |
| 416 | /* Instruct BSC to clear channel */ |
| 417 | var BssmapCause cause := bit2int(rx_di.userData.pdu.bssmap.clearRequest.cause.causeValue); |
| 418 | BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_ClearCommand(cause))); |
| 419 | |
| 420 | /* expect Clear Complete from BSC */ |
| 421 | BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_ClearComplete)); |
| 422 | |
| 423 | /* release the SCCP connection */ |
| 424 | BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0)); |
| 425 | |
| 426 | /* wait for SCCP emulation to do its job */ |
| 427 | f_sleep(1.0); |
| 428 | |
| 429 | setverdict(pass); |
| 430 | } |
| 431 | |
| 432 | /* Test behavior of channel release after hard Clear Command from MSC */ |
| 433 | testcase TC_chan_rel_hard_clear() runs on test_CT { |
| 434 | var BSSAP_N_DATA_ind rx_di; |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 435 | var DchanTuple dt; |
| 436 | var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); |
| 437 | |
| 438 | f_init(); |
| 439 | f_bssap_reset(); |
| 440 | |
| 441 | dt := f_est_dchan('23'O, 23, '00010203040506'O); |
| 442 | |
| 443 | /* Instruct BSC to clear channel */ |
| 444 | var BssmapCause cause := 0; |
| 445 | BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_ClearCommand(cause))); |
| 446 | |
| 447 | /* expect Clear Complete from BSC on A */ |
| 448 | BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_ClearComplete)) { |
| 449 | /* release the SCCP connection */ |
| 450 | BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0)); |
| 451 | } |
| 452 | |
| 453 | /* Clear the queue, it might still contain stuff like IMMEDIATE ASSIGN */ |
| 454 | IPA_RSL[0].clear; |
| 455 | alt { |
| 456 | /* ignore DEACTIVATE SACCH (if any) */ |
| 457 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, |
| 458 | tr_RSL_DEACT_SACCH(dt.rsl_chan_nr))) { |
| 459 | repeat; |
| 460 | } |
| 461 | /* acknowledge RLL release (if any)*/ |
| 462 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, |
| 463 | tr_RSL_REL_REQ(dt.rsl_chan_nr, ?))) { |
| 464 | /* FIXME: Why are we getting this for LinkID SACCH? */ |
| 465 | f_ipa_tx(0, ts_RSL_REL_CONF(dt.rsl_chan_nr, main_dcch)); |
| 466 | repeat; |
| 467 | } |
| 468 | /* Expect RF channel release from BSC on Abis */ |
| 469 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, |
| 470 | tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL))) { |
| 471 | /* respond with CHAN REL ACK */ |
| 472 | f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(dt.rsl_chan_nr)); |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | setverdict(pass); |
| 477 | } |
| 478 | |
Harald Welte | d8c36cd | 2017-12-09 23:05:31 +0100 | [diff] [blame] | 479 | /* Test behavior of channel release after hard RLSD from MSC */ |
| 480 | testcase TC_chan_rel_hard_rlsd() runs on test_CT { |
Harald Welte | d8c36cd | 2017-12-09 23:05:31 +0100 | [diff] [blame] | 481 | var DchanTuple dt; |
| 482 | var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); |
| 483 | |
| 484 | f_init(); |
| 485 | f_bssap_reset(); |
| 486 | |
| 487 | dt := f_est_dchan('23'O, 23, '00010203040506'O); |
| 488 | |
| 489 | /* release the SCCP connection */ |
| 490 | BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0)); |
| 491 | |
| 492 | /* Clear the queue, it might still contain stuff like IMMEDIATE ASSIGN */ |
| 493 | IPA_RSL[0].clear; |
| 494 | alt { |
| 495 | /* ignore DEACTIVATE SACCH (if any) */ |
| 496 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, |
| 497 | tr_RSL_DEACT_SACCH(dt.rsl_chan_nr))) { |
| 498 | repeat; |
| 499 | } |
| 500 | /* acknowledge RLL release (if any)*/ |
| 501 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, |
| 502 | tr_RSL_REL_REQ(dt.rsl_chan_nr, ?))) { |
| 503 | /* FIXME: Why are we getting this for LinkID SACCH? */ |
| 504 | f_ipa_tx(0, ts_RSL_REL_CONF(dt.rsl_chan_nr, main_dcch)); |
| 505 | repeat; |
| 506 | } |
| 507 | /* Expect RF channel release from BSC on Abis */ |
| 508 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, |
| 509 | tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL))) { |
| 510 | /* respond with CHAN REL ACK */ |
| 511 | f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(dt.rsl_chan_nr)); |
| 512 | } |
| 513 | } |
| 514 | |
| 515 | setverdict(pass); |
| 516 | } |
| 517 | |
Harald Welte | 85804d4 | 2017-12-10 14:11:58 +0100 | [diff] [blame] | 518 | /* Test behavior of channel release after BSSMAP RESET from MSC */ |
| 519 | testcase TC_chan_rel_a_reset() runs on test_CT { |
Harald Welte | 85804d4 | 2017-12-10 14:11:58 +0100 | [diff] [blame] | 520 | var DchanTuple dt; |
| 521 | var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); |
| 522 | |
| 523 | f_init(); |
| 524 | f_bssap_reset(); |
| 525 | |
| 526 | dt := f_est_dchan('23'O, 23, '00010203040506'O); |
| 527 | |
| 528 | /* Clear the queue, it might still contain stuff like IMMEDIATE ASSIGN */ |
| 529 | IPA_RSL[0].clear; |
| 530 | |
| 531 | /* perform BSSAP RESET, expect RESET ACK and DISC.ind on connection */ |
| 532 | BSSAP.send(ts_BSSAP_UNITDATA_req(g_sccp_addr_peer, g_sccp_addr_own, ts_BSSMAP_Reset(0))); |
| 533 | interleave { |
| 534 | [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_sccp_addr_own, g_sccp_addr_peer, tr_BSSMAP_ResetAck)) { } |
| 535 | [] BSSAP.receive(tr_BSSAP_DISC_ind(dt.sccp_conn_id, ?, ?)) { } |
| 536 | } |
| 537 | |
| 538 | alt { |
| 539 | /* ignore DEACTIVATE SACCH (if any) */ |
| 540 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, |
| 541 | tr_RSL_DEACT_SACCH(dt.rsl_chan_nr))) { |
| 542 | repeat; |
| 543 | } |
| 544 | /* acknowledge RLL release (if any)*/ |
| 545 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, |
| 546 | tr_RSL_REL_REQ(dt.rsl_chan_nr, ?))) { |
| 547 | /* FIXME: Why are we getting this for LinkID SACCH? */ |
| 548 | f_ipa_tx(0, ts_RSL_REL_CONF(dt.rsl_chan_nr, main_dcch)); |
| 549 | repeat; |
| 550 | } |
| 551 | /* Expect RF channel release from BSC on Abis */ |
| 552 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, |
| 553 | tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL))) { |
| 554 | /* respond with CHAN REL ACK */ |
| 555 | f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(dt.rsl_chan_nr)); |
| 556 | } |
| 557 | /* ignore any user data */ |
| 558 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_MsgTypeR(?))) { |
| 559 | repeat; |
| 560 | } |
| 561 | } |
| 562 | |
| 563 | setverdict(pass); |
| 564 | } |
| 565 | |
Harald Welte | 5cd20ed | 2017-12-13 21:03:20 +0100 | [diff] [blame] | 566 | /* Test behavior if RSL EST IND for non-active channel */ |
| 567 | testcase TC_rll_est_ind_inact_lchan() runs on test_CT { |
| 568 | timer T := 2.0; |
| 569 | |
| 570 | f_init(); |
| 571 | f_bssap_reset(); |
| 572 | |
| 573 | var octetstring l3 := '00010203040506'O; |
| 574 | var RslChannelNr chan_nr := valueof(t_RslChanNr_Bm(6)); |
| 575 | f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); |
| 576 | |
| 577 | T.start; |
| 578 | alt { |
| 579 | [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { |
| 580 | setverdict(fail, "MSC received COMPL L3 for non-active lchan"); |
| 581 | } |
| 582 | [] BSSAP.receive {} |
| 583 | [] IPA_RSL[0].receive {} |
| 584 | [] T.timeout {} |
| 585 | } |
| 586 | |
| 587 | setverdict(pass); |
| 588 | } |
| 589 | |
| 590 | /* Test behavior if RSL EST IND for invalid SAPI */ |
| 591 | testcase TC_rll_est_ind_inval_sapi1() runs on test_CT { |
| 592 | var RslChannelNr chan_nr; |
| 593 | |
| 594 | f_init(); |
| 595 | f_bssap_reset(); |
| 596 | |
| 597 | chan_nr := f_chreq_act_ack() |
| 598 | |
| 599 | var octetstring l3 := '00010203040506'O; |
| 600 | f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(1)), l3)); |
| 601 | |
| 602 | timer T := 2.0; |
| 603 | T.start; |
| 604 | alt { |
| 605 | [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { |
| 606 | setverdict(fail, "MSC received COMPL L3 for invalid SAPI 1"); |
| 607 | } |
| 608 | [] BSSAP.receive { repeat; } |
| 609 | [] IPA_RSL[0].receive { repeat; } |
| 610 | [] T.timeout {} |
| 611 | } |
| 612 | |
| 613 | setverdict(pass); |
| 614 | } |
| 615 | |
| 616 | /* Test behavior if RSL EST IND for invalid SAPI */ |
| 617 | testcase TC_rll_est_ind_inval_sapi3() runs on test_CT { |
| 618 | timer T := 2.0; |
| 619 | |
| 620 | f_init(); |
| 621 | f_bssap_reset(); |
| 622 | |
| 623 | var RslChannelNr chan_nr := f_chreq_act_ack(); |
| 624 | |
| 625 | var octetstring l3 := '00010203040506'O; |
| 626 | f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(3)), l3)); |
| 627 | |
| 628 | T.start; |
| 629 | alt { |
| 630 | [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { |
| 631 | setverdict(fail, "MSC received COMPL L3 for invalid SAPI 3"); |
| 632 | } |
| 633 | [] BSSAP.receive { repeat; } |
| 634 | [] IPA_RSL[0].receive { repeat; } |
| 635 | [] T.timeout {} |
| 636 | } |
| 637 | |
| 638 | setverdict(pass); |
| 639 | } |
| 640 | |
| 641 | /* Test behavior if RSL EST IND for invalid SACCH */ |
| 642 | testcase TC_rll_est_ind_inval_sacch() runs on test_CT { |
| 643 | timer T := 2.0; |
| 644 | |
| 645 | f_init(); |
| 646 | f_bssap_reset(); |
| 647 | |
| 648 | var RslChannelNr chan_nr := f_chreq_act_ack(); |
| 649 | |
| 650 | var octetstring l3 := '00010203040506'O; |
| 651 | f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_SACCH(0)), l3)); |
| 652 | |
| 653 | T.start; |
| 654 | alt { |
| 655 | [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { |
| 656 | setverdict(fail, "MSC received COMPL L3 for invalid Link SACCH"); |
| 657 | } |
| 658 | [] BSSAP.receive { repeat; } |
| 659 | [] IPA_RSL[0].receive { repeat; } |
| 660 | [] T.timeout {} |
| 661 | } |
| 662 | |
| 663 | setverdict(pass); |
| 664 | } |
| 665 | |
| 666 | |
| 667 | |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 668 | |
| 669 | testcase TC_ctrl_msc_connection_status() runs on test_CT { |
| 670 | var charstring ctrl_resp; |
| 671 | |
| 672 | f_init(); |
| 673 | f_bssap_reset(); |
| 674 | |
| 675 | /* See https://osmocom.org/issues/2729 */ |
| 676 | f_ctrl_get_exp(IPA_CTRL, "msc_connection_status", "connected"); |
| 677 | setverdict(pass); |
| 678 | } |
| 679 | |
| 680 | testcase TC_ctrl() runs on test_CT { |
| 681 | var charstring ctrl_resp; |
| 682 | |
| 683 | f_init(); |
| 684 | f_bssap_reset(); |
| 685 | |
| 686 | /* all below values must match the osmo-bsc.cfg config file used */ |
| 687 | |
| 688 | f_ctrl_get_exp(IPA_CTRL, "mcc", "1"); |
| 689 | f_ctrl_get_exp(IPA_CTRL, "mnc", "1"); |
| 690 | f_ctrl_get_exp(IPA_CTRL, "short-name", "OsmoBSC"); |
| 691 | f_ctrl_get_exp(IPA_CTRL, "long-name", "OsmoBSC"); |
| 692 | f_ctrl_get_exp(IPA_CTRL, "number-of-bts", "1"); |
| 693 | |
| 694 | var integer bts_nr := 0; |
| 695 | f_ctrl_get_exp_bts(IPA_CTRL, bts_nr, "location-area-code", "1"); |
| 696 | f_ctrl_get_exp_bts(IPA_CTRL, bts_nr, "cell-identity", "0"); |
| 697 | f_ctrl_get_exp_bts(IPA_CTRL, bts_nr, "oml-connection-state", "connected"); |
| 698 | f_ctrl_get_exp_bts(IPA_CTRL, bts_nr, "gprs-mode", "gprs"); |
| 699 | f_ctrl_get_exp_bts(IPA_CTRL, bts_nr, "rf_state", "operational,unlocked,on"); |
| 700 | f_ctrl_get_exp_trx(IPA_CTRL, bts_nr, 0, "arfcn", "871"); |
| 701 | f_ctrl_get_exp_trx(IPA_CTRL, bts_nr, 0, "max-power-reduction", "20"); |
| 702 | |
| 703 | var integer uptime := str2int(f_ctrl_get_bts(IPA_CTRL, bts_nr, "oml-uptime")); |
| 704 | f_sleep(2.0); |
| 705 | if (str2int(f_ctrl_get_bts(IPA_CTRL, bts_nr, "oml-uptime")) < uptime+1) { |
| 706 | setverdict(fail, "oml-uptime not incrementing as expected"); |
| 707 | } |
| 708 | /* TODO: Disconnect RSL, imply that OML is disconnected and check for uptime zero? */ |
| 709 | |
| 710 | f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bsc", 0, "paging:attempted", 0); |
| 711 | |
| 712 | setverdict(pass); |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 713 | } |
| 714 | |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 715 | function f_bssap_tx_ud(template PDU_BSSAP bssap) runs on test_CT { |
| 716 | BSSAP.send(ts_BSSAP_UNITDATA_req(g_sccp_addr_peer, g_sccp_addr_own, bssap)); |
| 717 | } |
| 718 | |
| 719 | |
| 720 | /*********************************************************************** |
| 721 | * Paging Testing |
| 722 | ***********************************************************************/ |
| 723 | |
| 724 | type record Cell_Identity { |
| 725 | GsmMcc mcc, |
| 726 | GsmMnc mnc, |
| 727 | GsmLac lac, |
| 728 | GsmCellId ci |
| 729 | }; |
| 730 | private const Cell_Identity cid := { '001'H, '001'H, 1, 0 }; |
| 731 | |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 732 | type set of integer BtsIdList; |
| 733 | |
| 734 | private function f_bts_in_list(integer bts_id, BtsIdList bts_ids) return boolean { |
| 735 | for (var integer j := 0; j < sizeof(bts_ids); j := j + 1) { |
| 736 | if (bts_id == bts_ids[j]) { |
| 737 | return true; |
| 738 | } |
| 739 | } |
| 740 | return false; |
| 741 | } |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 742 | |
| 743 | /* core paging test helper function; used by most paging test cases */ |
| 744 | private function f_pageing_helper(hexstring imsi, |
| 745 | template BSSMAP_FIELD_CellIdentificationList cid_list, |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 746 | BtsIdList bts_ids := { 0 }, |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 747 | template RSL_ChanNeeded rsl_chneed := omit, |
| 748 | template OCT4 tmsi := omit) runs on test_CT |
| 749 | { |
| 750 | var template BSSMAP_IE_ChannelNeeded bssmap_chneed; |
| 751 | var MobileIdentity mi; |
| 752 | var template octetstring id_enc; /* FIXME */ |
| 753 | var RSL_Message rx_rsl; |
| 754 | var integer paging_group := hex2int(imsi[lengthof(imsi)-1]); |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 755 | var integer i; |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 756 | |
| 757 | f_init(); |
| 758 | f_bssap_reset(); |
| 759 | |
| 760 | /* Clear the queue, it might still contain stuff like BCCH FILLING */ |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 761 | for (i := 0; i < sizeof(bts_ids); i := i + 1) { |
| 762 | IPA_RSL[bts_ids[i]].clear; |
| 763 | } |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 764 | |
| 765 | if (isvalue(rsl_chneed)) { |
| 766 | /* The values of 08.08 3.2.2.36 and 08.58 9.3.40 are luckily identical */ |
| 767 | bssmap_chneed := ts_BSSMAP_IE_ChanNeeded(int2bit(enum2int(valueof(rsl_chneed)),2)); |
| 768 | } else { |
| 769 | bssmap_chneed := omit; |
| 770 | } |
| 771 | |
| 772 | f_bssap_tx_ud(ts_BSSMAP_Paging(imsi, cid_list, tmsi, bssmap_chneed)); |
| 773 | |
| 774 | /* FIXME: Disabled due to bugs in both GSM_RR_Types and MobileL3_CommonIE_Types IMSI encoder |
| 775 | if (isvalue(tmsi)) { |
| 776 | mi := valueof(t_Osmo_MI_TMSI(oct2int(valueof(tmsi)))); |
| 777 | } else { |
| 778 | mi := valueof(ts_Osmo_MI_IMSI(imsi)); |
| 779 | } |
| 780 | id_enc := enc_MobileIdentity(mi); |
| 781 | */ |
| 782 | id_enc := ?; |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 783 | for (i := 0; i < sizeof(bts_ids); i := i + 1) { |
| 784 | rx_rsl := f_exp_ipa_rx(bts_ids[i], tr_RSL_PAGING_CMD(id_enc)); |
| 785 | /* check channel type, paging group */ |
| 786 | if (rx_rsl.ies[1].body.paging_group != paging_group) { |
| 787 | setverdict(fail, "Paging for wrong paging group"); |
| 788 | } |
| 789 | if (ispresent(rsl_chneed) and |
| 790 | rx_rsl.ies[3].body.chan_needed.chan_needed != valueof(rsl_chneed)) { |
| 791 | setverdict(fail, "RSL Channel Needed != BSSMAP Channel Needed"); |
| 792 | } |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 793 | } |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 794 | /* do a quick check on all not-included BTSs if they received paging */ |
| 795 | for (i := 0; i < NUM_BTS; i := i + 1) { |
| 796 | timer T := 0.1; |
| 797 | if (f_bts_in_list(i, bts_ids)) { |
| 798 | continue; |
| 799 | } |
| 800 | T.start; |
| 801 | alt { |
| 802 | [] IPA_RSL[i].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(id_enc))) { |
| 803 | setverdict(fail, "Paging on BTS ", i, " which is not part of ", bts_ids); |
| 804 | } |
| 805 | [] IPA_RSL[i].receive { repeat; } |
| 806 | [] T.timeout { } |
| 807 | } |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 808 | } |
| 809 | |
| 810 | setverdict(pass); |
| 811 | } |
| 812 | |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 813 | const BtsIdList c_BtsId_all := { 0, 1, 2 }; |
| 814 | const BtsIdList c_BtsId_LAC1 := { 0, 1 }; |
| 815 | const BtsIdList c_BtsId_LAC2 := { 2 }; |
| 816 | |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 817 | /* PAGING by IMSI + TMSI */ |
| 818 | testcase TC_paging_imsi_nochan() runs on test_CT { |
| 819 | var BSSMAP_FIELD_CellIdentificationList cid_list; |
| 820 | cid_list := valueof(ts_BSSMAP_CIL_noCell); |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 821 | f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 822 | } |
| 823 | |
| 824 | /* PAGING by IMSI + TMSI */ |
| 825 | testcase TC_paging_tmsi_nochan() runs on test_CT { |
| 826 | var BSSMAP_FIELD_CellIdentificationList cid_list; |
| 827 | cid_list := valueof(ts_BSSMAP_CIL_noCell); |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 828 | f_pageing_helper('001010100000001'H, cid_list, c_BtsId_all, omit, 'A1B2C301'O); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 829 | } |
| 830 | |
| 831 | /* Paging with different "channel needed' values */ |
| 832 | testcase TC_paging_tmsi_any() runs on test_CT { |
| 833 | var BSSMAP_FIELD_CellIdentificationList cid_list; |
| 834 | cid_list := valueof(ts_BSSMAP_CIL_noCell); |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 835 | f_pageing_helper('001010100000002'H, cid_list, c_BtsId_all, RSL_CHANNEED_ANY, 'A1B2C302'O); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 836 | } |
| 837 | testcase TC_paging_tmsi_sdcch() runs on test_CT { |
| 838 | var BSSMAP_FIELD_CellIdentificationList cid_list; |
| 839 | cid_list := valueof(ts_BSSMAP_CIL_noCell); |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 840 | f_pageing_helper('001010100000003'H, cid_list, c_BtsId_all, RSL_CHANNEED_SDCCH, 'A1B2C303'O); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 841 | } |
| 842 | testcase TC_paging_tmsi_tch_f() runs on test_CT { |
| 843 | var BSSMAP_FIELD_CellIdentificationList cid_list; |
| 844 | cid_list := valueof(ts_BSSMAP_CIL_noCell); |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 845 | f_pageing_helper('001010000000004'H, cid_list, c_BtsId_all, RSL_CHANNEED_TCH_F, 'A1B2C304'O); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 846 | } |
| 847 | testcase TC_paging_tmsi_tch_hf() runs on test_CT { |
| 848 | var BSSMAP_FIELD_CellIdentificationList cid_list; |
| 849 | cid_list := valueof(ts_BSSMAP_CIL_noCell); |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 850 | f_pageing_helper('001010000000005'H, cid_list, c_BtsId_all, RSL_CHANNEED_TCH_ForH, 'A1B2C305'O); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 851 | } |
| 852 | |
| 853 | /* Paging by CGI */ |
| 854 | testcase TC_paging_imsi_nochan_cgi() runs on test_CT { |
| 855 | var template BSSMAP_FIELD_CellIdentificationList cid_list; |
| 856 | cid_list := { cIl_CGI := { ts_BSSMAP_CI_CGI(cid.mcc, cid.mnc, cid.lac, cid.ci) } }; |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 857 | f_pageing_helper('001010000000006'H, cid_list, { 0 }); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 858 | } |
| 859 | |
| 860 | /* Paging by LAC+CI */ |
| 861 | testcase TC_paging_imsi_nochan_lac_ci() runs on test_CT { |
| 862 | var template BSSMAP_FIELD_CellIdentificationList cid_list; |
| 863 | cid_list := { cIl_LAC_CI := { ts_BSSMAP_CI_LAC_CI(cid.lac, cid.ci) } }; |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 864 | f_pageing_helper('001010000000007'H, cid_list, { 0 }); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 865 | } |
| 866 | |
| 867 | /* Paging by CI */ |
| 868 | testcase TC_paging_imsi_nochan_ci() runs on test_CT { |
| 869 | var template BSSMAP_FIELD_CellIdentificationList cid_list; |
| 870 | cid_list := { cIl_CI := { ts_BSSMAP_CI_CI(cid.ci) } }; |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 871 | f_pageing_helper('001010000000008'H, cid_list, { 0 }); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 872 | } |
| 873 | |
| 874 | /* Paging by LAI */ |
| 875 | testcase TC_paging_imsi_nochan_lai() runs on test_CT { |
| 876 | var template BSSMAP_FIELD_CellIdentificationList cid_list; |
| 877 | cid_list := { cIl_LAI := { ts_BSSMAP_CI_LAI(cid.mcc, cid.mnc, cid.lac) } }; |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 878 | f_pageing_helper('001010000000009'H, cid_list, c_BtsId_LAC1); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 879 | } |
| 880 | |
| 881 | /* Paging by LAC */ |
| 882 | testcase TC_paging_imsi_nochan_lac() runs on test_CT { |
| 883 | var template BSSMAP_FIELD_CellIdentificationList cid_list; |
| 884 | cid_list := { cIl_LAC := { ts_BSSMAP_CI_LAC(cid.lac) } }; |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 885 | f_pageing_helper('001010000000010'H, cid_list, c_BtsId_LAC1); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 886 | } |
| 887 | |
| 888 | /* Paging by "all in BSS" */ |
| 889 | testcase TC_paging_imsi_nochan_all() runs on test_CT { |
| 890 | var template BSSMAP_FIELD_CellIdentificationList cid_list; |
| 891 | cid_list := { cIl_allInBSS := ''O }; |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 892 | f_pageing_helper('001010000000011'H, cid_list, c_BtsId_all); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 893 | } |
| 894 | |
| 895 | /* Paging by PLMN+LAC+RNC */ |
| 896 | /* Paging by RNC */ |
| 897 | /* Paging by LAC+RNC */ |
| 898 | |
| 899 | /* Paging on multiple cells (multiple in one LAC): Verify all of them page */ |
| 900 | /* Paging on multiple cells (multiple entries in list): Verify all of them page */ |
| 901 | /* Verify paging retransmission interval + count */ |
| 902 | /* Verify paging stops after channel establishment */ |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 903 | /* Test behavior under paging overload */ |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 904 | |
Harald Welte | e65d40e | 2017-12-13 00:09:06 +0100 | [diff] [blame] | 905 | /* Verify PCH load */ |
| 906 | testcase TC_paging_imsi_load() runs on test_CT { |
| 907 | var BSSMAP_FIELD_CellIdentificationList cid_list; |
| 908 | timer T := 4.0; |
| 909 | cid_list := valueof(ts_BSSMAP_CIL_noCell); |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 910 | f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); |
Harald Welte | e65d40e | 2017-12-13 00:09:06 +0100 | [diff] [blame] | 911 | |
| 912 | /* tell BSC there is no paging space anymore */ |
| 913 | f_ipa_tx(0, ts_RSL_PAGING_LOAD_IND(0)); |
| 914 | |
| 915 | /* Wait for 4 seconds if any more PAGING CMD are received on RSL. Normally, |
| 916 | * there would be 8 retransmissions during 4 seconds */ |
| 917 | T.start; |
| 918 | alt { |
| 919 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { |
| 920 | setverdict(fail, "Received PAGING after LOAD_IND(0)"); |
| 921 | self.stop; |
| 922 | } |
| 923 | [] T.timeout { |
| 924 | setverdict(pass); |
| 925 | } |
| 926 | } |
| 927 | } |
| 928 | |
Harald Welte | 1ff6999 | 2017-12-14 12:31:17 +0100 | [diff] [blame] | 929 | /* Verify PCH load */ |
| 930 | testcase TC_paging_counter() runs on test_CT { |
| 931 | var BSSMAP_FIELD_CellIdentificationList cid_list; |
| 932 | timer T := 4.0; |
| 933 | var integer i; |
| 934 | var integer paging_attempted_bsc; |
| 935 | var integer paging_attempted_bts[NUM_BTS]; |
| 936 | var integer paging_expired_bts[NUM_BTS]; |
| 937 | cid_list := valueof(ts_BSSMAP_CIL_noCell); |
| 938 | |
| 939 | f_init(); |
| 940 | |
| 941 | /* read counters before paging */ |
| 942 | paging_attempted_bsc := f_ctrl_get_ratectr_abs(IPA_CTRL, "bsc", 0, "paging:attempted"); |
| 943 | for (i := 0; i < NUM_BTS; i := i+1) { |
| 944 | paging_attempted_bts[i] := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", i, "paging:attempted"); |
| 945 | paging_expired_bts[i] := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", i, "paging:expired"); |
| 946 | } |
| 947 | |
| 948 | f_pageing_helper('001230000000001'H, cid_list, c_BtsId_all); |
| 949 | |
| 950 | /* expect the attempted pages on BSC and each BTSs to have incremented by one */ |
| 951 | f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bsc", 0, "paging:attempted", paging_attempted_bsc+1); |
| 952 | for (i := 0; i < NUM_BTS; i := i+1) { |
| 953 | f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", i, "paging:attempted", |
| 954 | paging_attempted_bts[i]+1); |
| 955 | } |
| 956 | |
| 957 | /* assume that 12s later the paging on all BTSs have expired and hence incremented by 1 */ |
| 958 | f_sleep(12.0); |
| 959 | for (i := 0; i < NUM_BTS; i := i+1) { |
| 960 | f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", i, "paging:expired", |
| 961 | paging_expired_bts[i]+1); |
| 962 | } |
| 963 | setverdict(pass); |
| 964 | |
| 965 | } |
| 966 | |
| 967 | |
Harald Welte | 1098500 | 2017-12-12 09:29:15 +0100 | [diff] [blame] | 968 | /* Verify paging stops after A-RESET */ |
| 969 | testcase TC_paging_imsi_a_reset() runs on test_CT { |
| 970 | var BSSMAP_FIELD_CellIdentificationList cid_list; |
| 971 | timer T := 3.0; |
| 972 | cid_list := valueof(ts_BSSMAP_CIL_noCell); |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 973 | f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); |
Harald Welte | 1098500 | 2017-12-12 09:29:15 +0100 | [diff] [blame] | 974 | |
| 975 | /* Perform a BSSMAP Reset and wait for ACK */ |
| 976 | BSSAP.send(ts_BSSAP_UNITDATA_req(g_sccp_addr_peer, g_sccp_addr_own, ts_BSSMAP_Reset(0))); |
| 977 | alt { |
| 978 | [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_sccp_addr_own, g_sccp_addr_peer, tr_BSSMAP_ResetAck)) { } |
| 979 | [] BSSAP.receive { repeat; } |
| 980 | } |
| 981 | |
| 982 | /* Clear the queue, it might still contain stuff like BCCH FILLING */ |
| 983 | IPA_RSL[0].clear; |
| 984 | |
| 985 | /* Wait for 3 seconds if any more PAGING CMD are received on RSL */ |
| 986 | T.start; |
| 987 | alt { |
| 988 | [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { |
| 989 | setverdict(fail, "Received PAGING after A-RESET"); |
| 990 | self.stop; |
| 991 | } |
Harald Welte | 5d1a220 | 2017-12-13 19:51:29 +0100 | [diff] [blame] | 992 | [] IPA_RSL[1].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { |
| 993 | setverdict(fail, "Received PAGING after A-RESET"); |
| 994 | self.stop; |
| 995 | } |
| 996 | [] IPA_RSL[2].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { |
| 997 | setverdict(fail, "Received PAGING after A-RESET"); |
| 998 | self.stop; |
| 999 | } |
Harald Welte | 1098500 | 2017-12-12 09:29:15 +0100 | [diff] [blame] | 1000 | [] T.timeout { |
| 1001 | setverdict(pass); |
| 1002 | } |
| 1003 | } |
| 1004 | } |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 1005 | |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 1006 | control { |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 1007 | execute( TC_ctrl_msc_connection_status() ); |
Harald Welte | 96c9441 | 2017-12-09 03:12:45 +0100 | [diff] [blame] | 1008 | execute( TC_ctrl() ); |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 1009 | execute( TC_chan_act_noreply() ); |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 1010 | execute( TC_chan_act_counter() ); |
Harald Welte | ae02669 | 2017-12-09 01:03:01 +0100 | [diff] [blame] | 1011 | execute( TC_chan_act_ack_noest() ); |
| 1012 | execute( TC_chan_act_ack_est_ind_noreply() ); |
| 1013 | execute( TC_chan_act_ack_est_ind_refused() ); |
Harald Welte | 618ef64 | 2017-12-14 14:58:20 +0100 | [diff] [blame] | 1014 | execute( TC_chan_act_nack() ); |
Harald Welte | 4003d11 | 2017-12-09 22:35:39 +0100 | [diff] [blame] | 1015 | execute( TC_chan_rel_rll_rel_ind() ); |
| 1016 | execute( TC_chan_rel_conn_fail() ); |
| 1017 | execute( TC_chan_rel_hard_clear() ); |
Harald Welte | d8c36cd | 2017-12-09 23:05:31 +0100 | [diff] [blame] | 1018 | execute( TC_chan_rel_hard_rlsd() ); |
Harald Welte | 85804d4 | 2017-12-10 14:11:58 +0100 | [diff] [blame] | 1019 | execute( TC_chan_rel_a_reset() ); |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 1020 | |
Harald Welte | 5cd20ed | 2017-12-13 21:03:20 +0100 | [diff] [blame] | 1021 | execute( TC_rll_est_ind_inact_lchan() ); |
| 1022 | execute( TC_rll_est_ind_inval_sapi1() ); |
| 1023 | execute( TC_rll_est_ind_inval_sapi3() ); |
| 1024 | execute( TC_rll_est_ind_inval_sacch() ); |
| 1025 | |
Harald Welte | 6f521d8 | 2017-12-11 19:52:02 +0100 | [diff] [blame] | 1026 | execute( TC_paging_imsi_nochan() ); |
| 1027 | execute( TC_paging_tmsi_nochan() ); |
| 1028 | execute( TC_paging_tmsi_any() ); |
| 1029 | execute( TC_paging_tmsi_sdcch() ); |
| 1030 | execute( TC_paging_tmsi_tch_f() ); |
| 1031 | execute( TC_paging_tmsi_tch_hf() ); |
| 1032 | execute( TC_paging_imsi_nochan_cgi() ); |
| 1033 | execute( TC_paging_imsi_nochan_lac_ci() ); |
| 1034 | execute( TC_paging_imsi_nochan_ci() ); |
| 1035 | execute( TC_paging_imsi_nochan_lai() ); |
| 1036 | execute( TC_paging_imsi_nochan_lac() ); |
| 1037 | execute( TC_paging_imsi_nochan_all() ); |
Harald Welte | 1098500 | 2017-12-12 09:29:15 +0100 | [diff] [blame] | 1038 | execute( TC_paging_imsi_a_reset() ); |
Harald Welte | e65d40e | 2017-12-13 00:09:06 +0100 | [diff] [blame] | 1039 | execute( TC_paging_imsi_load() ); |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 1040 | } |
| 1041 | |
| 1042 | } |