blob: 6022d3657690a0ce1f5a6c4e18f1b3ce139958d9 [file] [log] [blame]
Harald Welte9fbcf4b2018-12-07 07:56:52 +01001module PCU_Tests_RAW {
2
3/* "RAW" PCU tests: Talk directly to the PCU socket of OsmoPCU on the one hand side (emulating
4 the BTS/BSC side PCU socket server) and the Gb interface on the other hand side. No NS/BSSGP
5 Emulation is used; rather, we simply use the NS_CodecPort to implement both standard and non-
6 standard procedures on the NS and BSSGP level. The goal of these tests is to test exactly
7 those NS and BSSGP implementations on the BSS (PCU) side. */
8
9import from General_Types all;
10import from Osmocom_Types all;
11import from NS_Types all;
12import from BSSGP_Types all;
13import from Osmocom_Gb_Types all;
14
15import from BSSGP_Emulation all; /* BssgpConfig */
16import from NS_Emulation all; /* NSConfiguration */
17
18import from UD_Types all;
19import from PCUIF_Types all;
20import from PCUIF_CodecPort all;
21import from IPL4asp_Types all;
22import from NS_CodecPort all;
23import from NS_CodecPort_CtrlFunct all;
24import from Native_Functions all;
25import from PCU_Tests all;
26
27modulepar {
28 charstring mp_pcu_sock_path := PCU_SOCK_DEFAULT;
29}
30
31type component RAW_NS_CT {
32 /* UDP port towards the bottom (IUT) */
Harald Weltebf768242019-02-21 22:19:21 +010033 port NS_CODEC_PT NSCP[4];
34 var ConnectionId g_ns_conn_id[4] := {-1, -1, -1, -1};
35 var NSConfiguration g_nsconfig[4];
Harald Welte9fbcf4b2018-12-07 07:56:52 +010036 timer g_T_guard;
Harald Welteea3c7e92019-03-01 19:34:55 +010037}
Harald Welte9fbcf4b2018-12-07 07:56:52 +010038
Harald Welteea3c7e92019-03-01 19:34:55 +010039type component RAW_PCU_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +010040 /* PCUIF (we emulate the BTS part) */
41 port PCUIF_CODEC_PT PCU;
42 var ConnectionId g_pcu_conn_id := -1;
43}
44
Harald Welteea3c7e92019-03-01 19:34:55 +010045type component RAW_Test_CT extends RAW_NS_CT, RAW_PCU_CT {
46}
47
Harald Welte9fbcf4b2018-12-07 07:56:52 +010048private altstep as_Tguard() runs on RAW_NS_CT {
49 [] g_T_guard.timeout {
50 setverdict(fail, "Timeout of T_guard");
51 mtc.stop;
52 }
53}
54
Harald Welteea3c7e92019-03-01 19:34:55 +010055function f_init_pcuif() runs on RAW_PCU_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +010056 map(self:PCU, system:PCU);
57
58 /* Connect the Unix Domain Socket */
59 g_pcu_conn_id := f_pcuif_listen(PCU, mp_pcu_sock_path);
60 PCU.receive(UD_connected:?);
61
62 /* Wait for PCU_VERSION and return INFO_IND */
63 PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_TXT_IND(0, PCU_VERSION, ?)));
64 /* FIXME: make sure to use parameters from mp_gb_cfg.cell_id in the PCU INFO IND */
65 var template PCUIF_Message info_ind := ts_PCUIF_INFO_IND(bts_nr := 0,
66 nsei := mp_nsconfig.nsei,
67 nsvci := mp_nsconfig.nsvci,
68 bvci := mp_gb_cfg.bvci,
69 local_port := mp_nsconfig.remote_udp_port,
70 remote_port := mp_nsconfig.local_udp_port,
71 remote_ip := f_inet_haddr(mp_nsconfig.local_ip)
72 );
73 PCU.send(t_SD_PCUIF(g_pcu_conn_id, info_ind));
74}
75
Harald Weltebf768242019-02-21 22:19:21 +010076function f_init_ns_codec(integer idx := 0, float guard_secs := 60.0) runs on RAW_NS_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +010077 var Result res;
Harald Weltebf768242019-02-21 22:19:21 +010078
79 if (not g_T_guard.running) {
80 g_T_guard.start(guard_secs);
81 activate(as_Tguard());
82 }
83
84 if (not isbound(g_nsconfig) or not isbound(g_nsconfig[idx])) {
85 /* copy most parts from mp_nsconfig */
86 g_nsconfig[idx] := mp_nsconfig;
87 /* adjust those parts different for each NS-VC */
88 g_nsconfig[idx].nsvci := mp_nsconfig.nsvci + idx;
89 g_nsconfig[idx].local_udp_port := mp_nsconfig.local_udp_port + idx;
90 }
91
92 map(self:NSCP[idx], system:NSCP);
Harald Welte9fbcf4b2018-12-07 07:56:52 +010093 /* Connect the UDP socket */
Harald Weltebf768242019-02-21 22:19:21 +010094 log("connecting NSCP[", idx, "] to ", g_nsconfig[idx]);
95 res := f_IPL4_connect(NSCP[idx], g_nsconfig[idx].remote_ip, g_nsconfig[idx].remote_udp_port,
96 g_nsconfig[idx].local_ip, g_nsconfig[idx].local_udp_port, 0, { udp := {}});
Harald Welte9fbcf4b2018-12-07 07:56:52 +010097 if (not ispresent(res.connId)) {
Harald Weltebf768242019-02-21 22:19:21 +010098 setverdict(fail, "Could not connect NS UDP socket, check your configuration ", g_nsconfig[idx]);
Harald Welte9fbcf4b2018-12-07 07:56:52 +010099 mtc.stop;
100 }
Harald Weltebf768242019-02-21 22:19:21 +0100101 g_ns_conn_id[idx] := res.connId;
102
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100103}
104
Harald Weltebf768242019-02-21 22:19:21 +0100105function f_ns_exp(template PDU_NS exp_rx, integer idx := 0) runs on RAW_NS_CT return PDU_NS {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100106 var NS_RecvFrom nrf;
107 log("f_ns_exp() expecting ", exp_rx);
108 alt {
Harald Weltebf768242019-02-21 22:19:21 +0100109 [] NSCP[idx].receive(t_NS_RecvFrom(exp_rx)) -> value nrf { }
110 [] NSCP[idx].receive {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100111 setverdict(fail, "Received unexpected NS: ", nrf);
112 mtc.stop;
113 }
114 }
115 return nrf.msg;
116}
117
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100118/* perform outbound NS-ALIVE procedure */
Harald Weltebf768242019-02-21 22:19:21 +0100119function f_outgoing_ns_alive(integer idx := 0) runs on RAW_NS_CT {
120 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], t_NS_ALIVE));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100121 alt {
Harald Weltebf768242019-02-21 22:19:21 +0100122 [] NSCP[idx].receive(t_NS_RecvFrom(t_NS_ALIVE_ACK));
123 [] NSCP[idx].receive { repeat; }
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100124 }
125}
126
Harald Welteecd159e2019-03-16 13:36:07 +0100127/* perform outbound NS-ALIVE procedure */
128function f_outgoing_ns_alive_no_ack(integer idx := 0, float tout := 10.0) runs on RAW_NS_CT {
129 timer T := tout;
130 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], t_NS_ALIVE));
131 T.start;
132 alt {
133 [] NSCP[idx].receive(t_NS_RecvFrom(t_NS_ALIVE_ACK)) {
134 setverdict(fail, "Received unexpected NS-ALIVE ACK");
135 }
136 [] NSCP[idx].receive { repeat; }
137 [] T.timeout {
138 setverdict(pass);
139 }
140 }
141}
142
143/* ensure no matching message is received within 'tout' */
144function f_ensure_no_ns(template PDU_NS ns := ?, integer idx := 0, float tout := 3.0)
145runs on RAW_Test_CT {
146 timer T := tout;
147 T.start;
148 alt {
149 [] NSCP[idx].receive(t_NS_RecvFrom(ns)) {
150 setverdict(fail, "NS-ALIVE from unconfigured (possibly initial) endpoint");
151 }
152 [] T.timeout {
153 setverdict(pass);
154 }
155 }
156}
157
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100158/* perform outbound NS-BLOCK procedure */
Harald Weltebf768242019-02-21 22:19:21 +0100159function f_outgoing_ns_block(NsCause cause, integer idx := 0) runs on RAW_NS_CT {
160 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_BLOCK(cause, g_nsconfig[idx].nsvci)));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100161 alt {
Harald Weltebf768242019-02-21 22:19:21 +0100162 [] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_BLOCK_ACK(g_nsconfig[idx].nsvci)));
163 [] NSCP[idx].receive { repeat; }
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100164 }
165}
166
167/* receive NS-ALIVE and ACK it */
Harald Weltebf768242019-02-21 22:19:21 +0100168altstep as_rx_alive_tx_ack(boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {
169 [] NSCP[idx].receive(t_NS_RecvFrom(t_NS_ALIVE)) {
170 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], t_NS_ALIVE_ACK));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100171 if (not oneshot) { repeat; }
172 }
173}
174
Harald Welte64d07312019-03-20 09:48:39 +0100175/* Transmit BSSGP RESET for given BVCI and expect ACK */
176function f_tx_bvc_reset_rx_ack(BssgpBvci bvci, integer idx := 0, boolean exp_ack := true)
177runs on RAW_NS_CT {
178 var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET(BSSGP_CAUSE_NET_SV_CAP_MOD_GT_ZERO_KBPS, bvci,
179 mp_gb_cfg.cell_id));
180 timer T := 5.0;
181 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx))));
182 T.start;
183 alt {
184 [exp_ack] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_UNITDATA(t_SduCtrlB, 0,
185 decmatch tr_BVC_RESET_ACK(bvci, ?)))) {
186 setverdict(pass);
187 }
188 [exp_ack] T.timeout {
189 setverdict(fail, "No response to BVC-RESET");
190 }
191 [not exp_ack] T.timeout {
192 setverdict(pass);
193 }
194 [] NSCP[idx].receive { repeat; }
195 }
196}
197
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100198/* Receive a BSSGP RESET for given BVCI and ACK it */
Harald Weltebf768242019-02-21 22:19:21 +0100199altstep as_rx_bvc_reset_tx_ack(BssgpBvci bvci, boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100200 var NS_RecvFrom ns_rf;
201 /* FIXME: nail down received cell_id in match */
Harald Weltebf768242019-02-21 22:19:21 +0100202 [] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_UNITDATA(t_SduCtrlB, 0,
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100203 decmatch tr_BVC_RESET(?, bvci, ?))))
204 -> value ns_rf {
205 var PDU_BSSGP bssgp_rx := dec_PDU_BSSGP(ns_rf.msg.pDU_NS_Unitdata.nS_SDU);
206 var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET_ACK(bvci, mp_gb_cfg.cell_id));
Harald Weltebf768242019-02-21 22:19:21 +0100207 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx))));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100208 if (not oneshot) { repeat; }
209 }
210}
211
212
213/* Receive a BSSGP UNBLOCK for given BVCI and ACK it */
Harald Weltebf768242019-02-21 22:19:21 +0100214altstep as_rx_bvc_unblock_tx_ack(BssgpBvci bvci, boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100215 var NS_RecvFrom ns_rf;
Harald Weltebf768242019-02-21 22:19:21 +0100216 [] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_UNITDATA(t_SduCtrlB, 0,
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100217 decmatch t_BVC_UNBLOCK(bvci))))
218 -> value ns_rf {
219 var PDU_BSSGP bssgp_rx := dec_PDU_BSSGP(ns_rf.msg.pDU_NS_Unitdata.nS_SDU);
220 var PDU_BSSGP bssgp_tx := valueof(t_BVC_UNBLOCK_ACK(bvci));
Harald Weltebf768242019-02-21 22:19:21 +0100221 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx))));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100222 if (not oneshot) { repeat; }
223 }
224}
225
226/* Receive a BSSGP FLOW-CONTROL-BVC and ACK it */
Harald Weltebf768242019-02-21 22:19:21 +0100227altstep as_rx_bvc_fc_tx_ack(BssgpBvci bvci, boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100228 var NS_RecvFrom ns_rf;
Harald Weltebf768242019-02-21 22:19:21 +0100229 [] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_UNITDATA(t_SduCtrlB, bvci,
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100230 decmatch tr_BVC_FC_BVC)))
231 -> value ns_rf {
232 var PDU_BSSGP bssgp_rx := dec_PDU_BSSGP(ns_rf.msg.pDU_NS_Unitdata.nS_SDU);
233 var OCT1 tag := bssgp_rx.pDU_BSSGP_FLOW_CONTROL_BVC.tag.unstructured_Value;
234 var PDU_BSSGP bssgp_tx := valueof(t_BVC_FC_BVC_ACK(tag));
Harald Weltebf768242019-02-21 22:19:21 +0100235 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, bvci, enc_PDU_BSSGP(bssgp_tx))));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100236 if (not oneshot) { repeat; }
237 }
238}
239
240/**********************************************************************************
241 * Classic Gb/IP bring-up test cases using NS-{RESET,BLOCK,UNBLOCK} and no IP-SNS *
242 **********************************************************************************/
243
244/* Receive a NS-RESET and ACK it */
Harald Weltebf768242019-02-21 22:19:21 +0100245private altstep as_rx_ns_reset_ack(boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100246 var NS_RecvFrom ns_rf;
Harald Weltebf768242019-02-21 22:19:21 +0100247 [] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_RESET(NS_CAUSE_OM_INTERVENTION, g_nsconfig[idx].nsvci,
248 g_nsconfig[idx].nsei))) -> value ns_rf {
249 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_RESET_ACK(g_nsconfig[idx].nsvci,
250 g_nsconfig[idx].nsei)));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100251 if (not oneshot) { repeat; }
252 }
253}
254/* Receive a NS-UNBLOCK and ACK it */
Harald Weltebf768242019-02-21 22:19:21 +0100255private altstep as_rx_ns_unblock_ack(boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100256 var NS_RecvFrom ns_rf;
Harald Weltebf768242019-02-21 22:19:21 +0100257 [] NSCP[idx].receive(t_NS_RecvFrom(t_NS_UNBLOCK)) -> value ns_rf {
258 NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], t_NS_UNBLOCK_ACK));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100259 if (not oneshot) { repeat; }
260 }
261}
262
263/* test the NS-RESET procedure */
Harald Welteea3c7e92019-03-01 19:34:55 +0100264testcase TC_ns_reset() runs on RAW_Test_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100265 f_init_ns_codec();
266 f_init_pcuif();
267
268
269 /* Expect inbound NS-RESET procedure */
270 as_rx_ns_reset_ack(oneshot := true);
271 setverdict(pass);
272}
273
274/* ensure NS-RESET are re-transmitted */
Harald Welteea3c7e92019-03-01 19:34:55 +0100275testcase TC_ns_reset_retrans() runs on RAW_Test_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100276 f_init_ns_codec();
277 f_init_pcuif();
278
279 var integer i;
280 for (i := 0; i < 3; i := i+1) {
Harald Weltebf768242019-02-21 22:19:21 +0100281 NSCP[0].receive(t_NS_RecvFrom(tr_NS_RESET(NS_CAUSE_OM_INTERVENTION,
282 g_nsconfig[0].nsvci, g_nsconfig[0].nsei)));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100283 }
284
285 /* Expect inbound NS-RESET procedure */
286 as_rx_ns_reset_ack(oneshot := true);
287 setverdict(pass);
288}
289
290/* test the inbound NS-ALIVE procedure after NS-RESET */
Harald Welteea3c7e92019-03-01 19:34:55 +0100291testcase TC_ns_alive() runs on RAW_Test_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100292 f_init_ns_codec();
293 f_init_pcuif();
294
295 /* Expect inbound NS-RESET procedure */
296 as_rx_ns_reset_ack(oneshot := true);
297
298 /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
299 as_rx_alive_tx_ack(oneshot := true);
300 setverdict(pass);
301}
302
303/* Test for NS-RESET after NS-ALIVE timeout */
Harald Welteea3c7e92019-03-01 19:34:55 +0100304testcase TC_ns_alive_timeout_reset() runs on RAW_Test_CT {
Harald Weltebf768242019-02-21 22:19:21 +0100305 f_init_ns_codec(guard_secs := 100.0);
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100306 f_init_pcuif();
307
308 /* Expect inbound NS-RESET procedure */
309 as_rx_ns_reset_ack(oneshot := true);
310
311 /* wait for at least one NS-ALIVE */
Harald Weltebf768242019-02-21 22:19:21 +0100312 NSCP[0].receive(t_NS_RecvFrom(t_NS_ALIVE));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100313
314 /* wait for NS-RESET to re-appear, ignoring any NS-ALIVE until then */
315 alt {
316 [] as_rx_ns_reset_ack(oneshot := true) { setverdict(pass); }
Harald Weltebf768242019-02-21 22:19:21 +0100317 [] NSCP[0].receive(t_NS_RecvFrom(t_NS_ALIVE)) { repeat; }
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100318 }
319}
320
321/* test for NS-RESET/NS-ALIVE/NS-UNBLOCK */
Harald Welteea3c7e92019-03-01 19:34:55 +0100322testcase TC_ns_unblock() runs on RAW_Test_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100323 f_init_ns_codec();
324 f_init_pcuif();
325
326 /* Expect inbound NS-RESET procedure */
327 as_rx_ns_reset_ack(oneshot := true);
328
329 /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
330 as_rx_alive_tx_ack(oneshot := true);
331 activate(as_rx_alive_tx_ack());
332
333 as_rx_ns_unblock_ack(oneshot := true);
334 setverdict(pass);
335}
336
337/* test for NS-UNBLOCK re-transmissions */
Harald Welteea3c7e92019-03-01 19:34:55 +0100338testcase TC_ns_unblock_retrans() runs on RAW_Test_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100339 f_init_ns_codec();
340 f_init_pcuif();
341
342 /* Expect inbound NS-RESET procedure */
343 as_rx_ns_reset_ack(oneshot := true);
344
345 /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
346 as_rx_alive_tx_ack(oneshot := true);
347 activate(as_rx_alive_tx_ack());
348
349 /* wait for first NS-UNBLOCK, don't respond */
Harald Weltebf768242019-02-21 22:19:21 +0100350 NSCP[0].receive(t_NS_RecvFrom(t_NS_UNBLOCK));
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100351
352 /* wait for re-transmission of NS-UNBLOCK */
353 as_rx_ns_unblock_ack(oneshot := true);
354 setverdict(pass);
355}
356
357/* full bring-up of the Gb link for NS and BSSGP layer up to BVC-FC */
Harald Welteea3c7e92019-03-01 19:34:55 +0100358testcase TC_ns_full_bringup() runs on RAW_Test_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100359 f_init_ns_codec();
360 f_init_pcuif();
361
362 /* Expect inbound NS-RESET procedure */
363 as_rx_ns_reset_ack(oneshot := true);
364
365 /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
366 as_rx_alive_tx_ack(oneshot := true);
367 activate(as_rx_alive_tx_ack());
368
369 as_rx_ns_unblock_ack(oneshot := true);
370
371 f_outgoing_ns_alive();
372
373 /* Expect BVC-RESET for signaling (0) and ptp BVCI */
374 as_rx_bvc_reset_tx_ack(0, oneshot := true);
375 as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true);
376 as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true);
377
378 /* wait for one FLOW-CONTROL BVC and then ACK any further in the future */
379 as_rx_bvc_fc_tx_ack(mp_gb_cfg.bvci, oneshot := true);
380 activate(as_rx_bvc_fc_tx_ack(mp_gb_cfg.bvci));
381 setverdict(pass);
382}
383
384/* test outbound (SGSN-originated) NS-BLOCK procedure */
Harald Welteea3c7e92019-03-01 19:34:55 +0100385testcase TC_ns_so_block() runs on RAW_Test_CT {
Harald Welte9fbcf4b2018-12-07 07:56:52 +0100386 f_init_ns_codec();
387 f_init_pcuif();
388
389 /* Expect inbound NS-RESET procedure */
390 as_rx_ns_reset_ack(oneshot := true);
391
392 /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
393 as_rx_alive_tx_ack(oneshot := true);
394 activate(as_rx_alive_tx_ack());
395
396 as_rx_ns_unblock_ack(oneshot := true);
397
398 f_outgoing_ns_alive();
399
400 f_outgoing_ns_block(NS_CAUSE_EQUIPMENT_FAILURE);
401 setverdict(pass);
402}
403
404
405control {
406 execute( TC_ns_reset() );
407 execute( TC_ns_reset_retrans() );
408 execute( TC_ns_alive() );
409 execute( TC_ns_alive_timeout_reset() );
410 execute( TC_ns_unblock() );
411 execute( TC_ns_unblock_retrans() );
412 execute( TC_ns_full_bringup() );
413 execute( TC_ns_so_block() );
414}
415
416
417
418
419
420
421}