]> git.meshlink.io Git - meshlink/blob - test/blackbox/run_blackbox_tests/test_cases_channel_conn.c
Update the blackbox test infrastructure.
[meshlink] / test / blackbox / run_blackbox_tests / test_cases_channel_conn.c
1 /*
2     test_cases_channel_conn.c -- Execution of specific meshlink black box test cases
3     Copyright (C) 2018  Guus Sliepen <guus@meshlink.io>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License along
16     with this program; if not, write to the Free Software Foundation, Inc.,
17     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #include <assert.h>
21 #include <string.h>
22 #include <stdlib.h>
23 #include <stdarg.h>
24 #include <setjmp.h>
25 #include <pthread.h>
26 #include <cmocka.h>
27 #include "execute_tests.h"
28 #include "test_cases_channel_conn.h"
29 #include "../common/containers.h"
30 #include "../common/test_step.h"
31 #include "../common/common_handlers.h"
32 #include "../common/mesh_event_handler.h"
33
34 #define PEER_ID "0"
35 #define NUT_ID  "1"
36 #define RELAY_ID  "2"
37
38 static void test_case_channel_conn_01(void **state);
39 static bool test_steps_channel_conn_01(void);
40 static void test_case_channel_conn_02(void **state);
41 static bool test_steps_channel_conn_02(void);
42 static void test_case_channel_conn_03(void **state);
43 static bool test_steps_channel_conn_03(void);
44 static void test_case_channel_conn_04(void **state);
45 static bool test_steps_channel_conn_04(void);
46 static void test_case_channel_conn_05(void **state);
47 static bool test_steps_channel_conn_05(void);
48 static void test_case_channel_conn_06(void **state);
49 static bool test_steps_channel_conn_06(void);
50 static void test_case_channel_conn_07(void **state);
51 static bool test_steps_channel_conn_07(void);
52 static void test_case_channel_conn_08(void **state);
53 static bool test_steps_channel_conn_08(void);
54
55 static char *test_channel_conn_2_nodes[] = { "peer", "nut" };
56 static char *test_channel_conn_3_nodes[] = { "peer", "nut", "relay" };
57
58 static black_box_state_t test_case_channel_conn_01_state = {
59         .test_case_name = "test_case_channel_conn_01",
60         .node_names = test_channel_conn_2_nodes,
61         .num_nodes = 2,
62 };
63 static black_box_state_t test_case_channel_conn_02_state = {
64         .test_case_name = "test_case_channel_conn_02",
65         .node_names = test_channel_conn_2_nodes,
66         .num_nodes = 2,
67 };
68 static black_box_state_t test_case_channel_conn_03_state = {
69         .test_case_name = "test_case_channel_conn_03",
70         .node_names = test_channel_conn_2_nodes,
71         .num_nodes = 2,
72 };
73 static black_box_state_t test_case_channel_conn_04_state = {
74         .test_case_name = "test_case_channel_conn_04",
75         .node_names = test_channel_conn_2_nodes,
76         .num_nodes = 2,
77 };
78 static black_box_state_t test_case_channel_conn_05_state = {
79         .test_case_name = "test_case_channel_conn_05",
80         .node_names = test_channel_conn_3_nodes,
81         .num_nodes = 3,
82 };
83 static black_box_state_t test_case_channel_conn_06_state = {
84         .test_case_name = "test_case_channel_conn_06",
85         .node_names = test_channel_conn_3_nodes,
86         .num_nodes = 3,
87 };
88 static black_box_state_t test_case_channel_conn_07_state = {
89         .test_case_name = "test_case_channel_conn_07",
90         .node_names = test_channel_conn_3_nodes,
91         .num_nodes = 3,
92 };
93 static black_box_state_t test_case_channel_conn_08_state = {
94         .test_case_name = "test_case_channel_conn_08",
95         .node_names = test_channel_conn_3_nodes,
96         .num_nodes = 3,
97 };
98
99 static bool joined;
100 static bool channel_opened;
101 static bool node_restarted;
102 static bool received_error;
103 static bool channel_received;
104 static bool node_reachable;
105 static bool node_unreachable;
106
107 /* Callback function for handling channel connection test cases mesh events */
108 static bool channel_conn_cb(mesh_event_payload_t payload) {
109         switch(payload.mesh_event) {
110         case NODE_JOINED            :
111                 joined = true;
112                 break;
113
114         case CHANNEL_OPENED         :
115                 channel_opened = true;
116                 break;
117
118         case NODE_RESTARTED         :
119                 node_restarted = true;
120                 break;
121
122         case ERR_NETWORK            :
123                 received_error = true;
124                 break;
125
126         case CHANNEL_DATA_RECIEVED  :
127                 channel_received = true;
128                 break;
129
130         case NODE_UNREACHABLE       :
131                 node_unreachable = true;
132                 break;
133
134         case NODE_REACHABLE         :
135                 node_reachable = true;
136                 break;
137
138         default                     :
139                 PRINT_TEST_CASE_MSG("Undefined event occurred\n");
140         }
141
142         return true;
143 }
144
145 /* Execute channel connections Test Case # 1 - simulate a temporary network
146     failure of about 30 seconds, messages sent while the network was down
147     should be received by the other side after the network comes up again. */
148 static void test_case_channel_conn_01(void **state) {
149         execute_test(test_steps_channel_conn_01, state);
150         return;
151 }
152
153 /* Test Steps for channel connections Test Case # 1
154
155     Test Steps:
156     1. Run NUT & peer node instances and open a channel between them
157     2. Simulate a network failure in NUT's container for about 30 secs,
158         meanwhile send data via channel from NUT to peer.
159     3. After restoring network, peer node receive's data via channel.
160
161     Expected Result:
162     Peer node receives data via channel without any error after restoring network.
163 */
164 static bool test_steps_channel_conn_01(void) {
165         char *invite_nut;
166         char *import;
167
168         joined = false;
169         channel_opened = false;
170         channel_received = false;
171
172         // Setup Containers
173
174         install_in_container("nut", "iptables");
175         accept_port_rule("nut", "OUTPUT", "udp", 9000);
176         import = mesh_event_sock_create(eth_if_name);
177         invite_nut = invite_in_container("peer", "nut");
178         assert(invite_nut);
179
180         // Run node instances in containers & open a channel
181
182         node_sim_in_container_event("peer", "1", NULL, PEER_ID, import);
183         node_sim_in_container_event("nut", "1", invite_nut, NUT_ID, import);
184
185         wait_for_event(channel_conn_cb, 30);
186         assert_int_equal(joined, true);
187
188         wait_for_event(channel_conn_cb, 30);
189         assert_int_equal(channel_opened, true);
190
191         // Simulate network failure in NUT's LXC container with it's IP address as NAT rule
192
193         block_node_ip("nut");
194         sleep(2);
195
196         // Sending SIGUSR1 signal to node-under-test indicating the network failure
197
198         node_step_in_container("nut", "SIGUSR1");
199         sleep(30);
200
201         // Restore NUT's network
202
203         unblock_node_ip("nut");
204
205         // Wait for peer node to receive data via channel from NUT
206
207         wait_for_event(channel_conn_cb, 60);
208
209         mesh_event_destroy();
210         free(invite_nut);
211         free(import);
212
213         assert_int_equal(channel_received, true);
214
215         return true;
216 }
217
218 /* Execute channel connections Test Case # 2 - a simulated network failure
219     of more than 1 minute, and sending messages over the channel during the
220     failure. Then after about 1 minute, the channel should receive an error */
221 static void test_case_channel_conn_02(void **state) {
222         execute_test(test_steps_channel_conn_02, state);
223         return;
224 }
225
226 /* Test Steps for channel connections Test Case # 2
227
228     Test Steps:
229     1. Run NUT and peer node instances in containers and open a channel between them.
230     2. Create a network failure for about 90 secs in NUT container
231         and signal NUT node about the network failure.
232     3. Meanwhile NUT sends data to peer via channel and restore the network after
233         90 secs.
234
235     Expected Result:
236       Peer node should receive error closing the channel after channel timeout(60 secs).
237 */
238 static bool test_steps_channel_conn_02(void) {
239         char *invite_nut;
240         char *import;
241
242         joined = false;
243         channel_opened = false;
244         received_error = false;
245
246         // Setup containers
247
248         install_in_container("nut", "iptables");
249         accept_port_rule("nut", "OUTPUT", "udp", 9000);
250         import = mesh_event_sock_create(eth_if_name);
251         invite_nut = invite_in_container("peer", "nut");
252         assert(invite_nut);
253
254         // Run NUT and peer node instances in containers & open a channel
255
256         node_sim_in_container_event("peer", "1", NULL, PEER_ID, import);
257         node_sim_in_container_event("nut", "1", invite_nut, NUT_ID, import);
258
259         wait_for_event(channel_conn_cb, 30);
260         assert_int_equal(joined, true);
261
262         wait_for_event(channel_conn_cb, 10);
263         assert_int_equal(channel_opened, true);
264
265         // Simulate network failure in NUT's LXC container with it's IP address as NAT rule
266
267         block_node_ip("nut");
268
269         // Sending SIGUSR1 signal to node-under-test indicating the network failure
270
271         node_step_in_container("nut", "SIGUSR1");
272         sleep(90);
273
274         // Restore NUT containers network after 90 secs
275
276         unblock_node_ip("nut");
277
278         // Wait for peer node to send the event about the channel error occurred with length = 0
279
280         wait_for_event(channel_conn_cb, 90);
281
282         mesh_event_destroy();
283         free(invite_nut);
284         free(import);
285
286         assert_int_equal(received_error, true);
287
288         return true;
289 }
290
291 /* Execute channel connections Test Case # 3 - a simulated network failure
292     once node instance is made offline restore the network and send data via
293     channel  */
294 static void test_case_channel_conn_03(void **state) {
295         execute_test(test_steps_channel_conn_03, state);
296         return;
297 }
298
299 /* Test Steps for channel connections Test Case # 3
300
301     Test Steps:
302     1. Run NUT and peer node instances and open a channel between them.
303     2. Create a network failure in NUT container, bring NUT node offline
304         and receive the status at test driver and restore the network
305     3. After peer node instance is reachable to NUT node send data via channel
306
307     Expected Result:
308     Peer node should receive data from NUT without any error.
309 */
310 static bool test_steps_channel_conn_03(void) {
311         char *invite_nut;
312         char *import;
313
314         joined = false;
315         channel_opened = false;
316         node_unreachable = false;
317         node_reachable = false;
318         channel_received = false;
319
320         // Setup containers
321
322         install_in_container("nut", "iptables");
323         accept_port_rule("nut", "OUTPUT", "udp", 9000);
324         import = mesh_event_sock_create(eth_if_name);
325         invite_nut = invite_in_container("peer", "nut");
326         assert(invite_nut);
327
328         // Run NUT and peer node instances in containers & open a channel
329
330         node_sim_in_container_event("peer", "1", NULL, PEER_ID, import);
331         node_sim_in_container_event("nut", "1", invite_nut, NUT_ID, import);
332
333         wait_for_event(channel_conn_cb, 30);
334         assert_int_equal(joined, true);
335
336         wait_for_event(channel_conn_cb, 10);
337         assert_int_equal(channel_opened, true);
338
339         // Simulate network failure in NUT's LXC container with it's IP address as NAT rule
340
341         node_reachable = false;
342         block_node_ip("nut");
343
344         // Sending SIGUSR1 signal to node-under-test indicating the network failure
345
346         node_step_in_container("nut", "SIGUSR1");
347
348         // Wait for the node status to become unreachable
349
350         wait_for_event(channel_conn_cb, 100);
351         assert_int_equal(node_unreachable, true);
352
353         // Restore NUT container's network
354
355         unblock_node_ip("nut");
356
357         // Wait for the node status to become reachable
358
359         wait_for_event(channel_conn_cb, 100);
360         assert_int_equal(node_reachable, true);
361
362         // Wait for data to be received at peer via channel from NUT after restoring n/w
363
364         wait_for_event(channel_conn_cb, 90);
365
366         mesh_event_destroy();
367         free(invite_nut);
368         free(import);
369
370         assert_int_equal(channel_received, true);
371
372         return true;
373 }
374
375 /* Execute channel connections Test Case # 4 - receiving an error when node-under-test
376     tries to send data on channel to peer node after peer node stops and starts the
377     node instance */
378 static void test_case_channel_conn_04(void **state) {
379         execute_test(test_steps_channel_conn_04, state);
380         return;
381 }
382
383 /* Test Steps for Meta-connections Test Case # 4
384
385     Test Steps:
386     1. Run peer and NUT node instances in containers and open a channel between them.
387     2. Stop and start the NUT node instance and wait for about > 60 secs.
388     3. Send data via channel from Peer node and wait for event in test driver.
389
390     Expected Result:
391     Peer node should receive error(as length = 0) in receive callback of peer node's instance.
392 */
393 static bool test_steps_channel_conn_04(void) {
394         char *invite_nut;
395         char *import;
396
397         joined = false;
398         channel_opened = false;
399         node_restarted = false;
400         received_error = false;
401         import = mesh_event_sock_create(eth_if_name);
402         invite_nut = invite_in_container("peer", "nut");
403         assert(invite_nut);
404
405         // Run NUT and peer node instances in containers and open a channel
406
407         node_sim_in_container_event("peer", "1", NULL, PEER_ID, import);
408         node_sim_in_container_event("nut", "1", invite_nut, NUT_ID, import);
409
410         wait_for_event(channel_conn_cb, 10);
411         assert_int_equal(joined, true);
412
413         wait_for_event(channel_conn_cb, 10);
414         assert_int_equal(channel_opened, true);
415
416         // Wait for NUT node instance to stop and start
417
418         wait_for_event(channel_conn_cb, 60);
419         assert_int_equal(node_restarted, true);
420
421         sleep(60);
422
423         // After 1 min the channel between NUT and peer should result in error
424
425         wait_for_event(channel_conn_cb, 10);
426
427
428         mesh_event_destroy();
429         free(invite_nut);
430         free(import);
431
432         assert_int_equal(received_error, true);
433
434         return true;
435 }
436
437 /* Execute channel connections Test Case # 5 - simulate a temporary network
438     failure of about 30 seconds, messages sent while the network was down
439     should be received by the other side after the network comes up again. */
440 static void test_case_channel_conn_05(void **state) {
441         execute_test(test_steps_channel_conn_05, state);
442         return;
443 }
444
445 /* Test Steps for channel connections Test Case # 5
446
447     Test Steps:
448     1. Run NUT, relay & peer node instances with relay inviting NUT and peer
449         and open a channel between them
450     2. Simulate a network failure in NUT's container for about 30 secs,
451         meanwhile send data via channel from NUT to peer.
452     3. After restoring network, peer node receive's data via channel.
453
454     Expected Result:
455     Peer node receives data via channel without any error after restoring network.
456 */
457 static bool test_steps_channel_conn_05(void) {
458         char *invite_nut, *invite_peer;
459         char *import;
460
461         joined = false;
462         channel_opened = false;
463         channel_received = false;
464
465         // Setup containers
466
467         install_in_container("nut", "iptables");
468         accept_port_rule("nut", "OUTPUT", "udp", 9000);
469         import = mesh_event_sock_create(eth_if_name);
470         invite_peer = invite_in_container("relay", "peer");
471         invite_nut = invite_in_container("relay", "nut");
472         assert(invite_nut);
473         assert(invite_peer);
474
475         // Run node instances and open a channel between NUT and peer nodes
476
477         node_sim_in_container_event("relay", "1", NULL, RELAY_ID, import);
478         node_sim_in_container_event("peer", "1", invite_peer, PEER_ID, import);
479         node_sim_in_container_event("nut", "1", invite_nut, NUT_ID, import);
480
481         wait_for_event(channel_conn_cb, 30);
482         assert_int_equal(joined, true);
483
484         wait_for_event(channel_conn_cb, 30);
485         assert_int_equal(channel_opened, true);
486
487         // Create a network failure in NUT node's container with it's IP address
488
489         block_node_ip("nut");
490
491         // Sending SIGUSR1 signal to node-under-test indicating the network failure
492
493         node_step_in_container("nut", "SIGUSR1");
494         sleep(30);
495
496         // Restore the network
497
498         unblock_node_ip("nut");
499
500         // Wait for peer to get data from NUT node via channel after restoring network in < 60 secs
501
502         wait_for_event(channel_conn_cb, 60);
503
504         mesh_event_destroy();
505         free(invite_peer);
506         free(invite_nut);
507         free(import);
508
509         assert_int_equal(channel_received, true);
510
511         return true;
512 }
513
514 /* Execute channel connections Test Case # 6 - a simulated network failure
515     of more than 1 minute, and sending messages over the channel during the
516     failure. Then after about 1 minute, the channel should receive an error */
517 static void test_case_channel_conn_06(void **state) {
518         execute_test(test_steps_channel_conn_06, state);
519         return;
520 }
521
522 /* Test Steps for channel connections Test Case # 6
523
524     Test Steps:
525     1. Run NUT, relay & peer node instances with relay inviting NUT and peer
526         and open a channel between them
527     2. Create a network failure for about 90 secs in NUT container
528         and signal NUT node about the network failure.
529     3. Meanwhile NUT sends data to peer via channel and restore the network after
530         90 secs.
531
532     Expected Result:
533       Peer node should receive error closing the channel after channel timeout(60 secs).
534 */
535 static bool test_steps_channel_conn_06(void) {
536         char *invite_nut, *invite_peer;
537         char *import;
538
539         joined = false;
540         channel_opened = false;
541         received_error = false;
542
543         // Setup containers
544
545         install_in_container("nut", "iptables");
546         accept_port_rule("nut", "OUTPUT", "udp", 9000);
547         import = mesh_event_sock_create(eth_if_name);
548         invite_peer = invite_in_container("relay", "peer");
549         assert(invite_peer);
550         invite_nut = invite_in_container("relay", "nut");
551         assert(invite_nut);
552
553         // Run nodes in containers and open a channel between NUt and peer
554
555         node_sim_in_container_event("relay", "1", NULL, RELAY_ID, import);
556         node_sim_in_container_event("peer", "1", invite_peer, PEER_ID, import);
557         node_sim_in_container_event("nut", "1", invite_nut, NUT_ID, import);
558
559         wait_for_event(channel_conn_cb, 30);
560         assert_int_equal(joined, true);
561
562         wait_for_event(channel_conn_cb, 10);
563         assert_int_equal(channel_opened, true);
564
565         // Simulate a network failure in NUT's container for > 60 secs
566
567         block_node_ip("nut");
568
569         // Sending SIGUSR1 signal to node-under-test indicating the network failure
570
571         node_step_in_container("nut", "SIGUSR1");
572         sleep(90);
573
574         // Restore the network after 90 secs
575
576         unblock_node_ip("nut");
577
578         // Wait for channel to receive error and receive the event
579
580         wait_for_event(channel_conn_cb, 90);
581
582         mesh_event_destroy();
583         free(invite_peer);
584         free(invite_nut);
585         free(import);
586
587         assert_int_equal(received_error, true);
588
589         return true;
590 }
591
592 /* Execute channel connections Test Case # 7 - a simulated network failure
593     once node instance is made offline restore the network and send data via
594     channel  */
595 static void test_case_channel_conn_07(void **state) {
596         execute_test(test_steps_channel_conn_07, state);
597         return;
598 }
599
600 /* Test Steps for channel connections Test Case # 7
601
602     Test Steps:
603     1. Run NUT, relay & peer node instances with relay inviting NUT and peer
604         and open a channel between them
605     2. Create a network failure in NUT container, bring NUT node offline
606         and receive the status at test driver and restore the network
607     3. After peer node instance is reachable to NUT node send data via channel
608
609     Expected Result:
610     Peer node should receive data from NUT without any error.
611 */
612 static bool test_steps_channel_conn_07(void) {
613         char *invite_nut, *invite_peer;
614         char *import;
615
616         joined = false;
617         channel_opened = false;
618         node_unreachable = false;
619         node_reachable = false;
620         channel_received = false;
621
622         // Setup containers
623
624         install_in_container("nut", "iptables");
625         accept_port_rule("nut", "OUTPUT", "udp", 9000);
626         import = mesh_event_sock_create(eth_if_name);
627         invite_peer = invite_in_container("relay", "peer");
628         invite_nut = invite_in_container("relay", "nut");
629         assert(invite_nut);
630         assert(invite_peer);
631
632         // Run nodes and open a channel
633
634         node_sim_in_container_event("relay", "1", NULL, RELAY_ID, import);
635         node_sim_in_container_event("peer", "1", invite_peer, PEER_ID, import);
636         node_sim_in_container_event("nut", "1", invite_nut, NUT_ID, import);
637
638         wait_for_event(channel_conn_cb, 30);
639         assert_int_equal(joined, true);
640
641         wait_for_event(channel_conn_cb, 15);
642         assert_int_equal(channel_opened, true);
643
644         // Simulate a network failure
645
646         node_reachable = false;
647         block_node_ip("nut");
648
649         // Sending SIGUSR1 signal to node-under-test indicating the network failure
650
651         node_step_in_container("nut", "SIGUSR1");
652
653         // Wait for node to become unreachable
654
655         wait_for_event(channel_conn_cb, 100);
656         assert_int_equal(node_unreachable, true);
657
658         // Restore the network
659
660         unblock_node_ip("nut");
661
662         // Wait for node to become reachable after restoring n/w
663
664         wait_for_event(channel_conn_cb, 100);
665         assert_int_equal(node_reachable, true);
666
667         // Wait for peer node to receive data via channel without any error
668
669         wait_for_event(channel_conn_cb, 90);
670
671         mesh_event_destroy();
672         free(invite_peer);
673         free(invite_nut);
674         free(import);
675
676         assert_int_equal(channel_received, true);
677
678         return true;
679 }
680
681 /* Execute channel connections Test Case # 8 - receiving an error when node-under-test
682     tries to send data on channel to peer node after peer node stops and starts the
683     node instance */
684 static void test_case_channel_conn_08(void **state) {
685         execute_test(test_steps_channel_conn_08, state);
686         return;
687 }
688
689 /* Test Steps for Meta-connections Test Case # 8
690
691     Test Steps:
692     1. Run NUT, relay & peer node instances with relay inviting NUT and peer
693         and open a channel between them
694     2. Stop and start the NUT node instance and wait for about > 60 secs.
695     3. Send data via channel from Peer node and wait for event in test driver.
696
697     Expected Result:
698     Peer node should receive error(as length = 0) in receive callback of peer node's instance.
699 */
700 static bool test_steps_channel_conn_08(void) {
701         char *invite_nut, *invite_peer;
702         char *import;
703
704         joined = false;
705         channel_opened = false;
706         node_restarted = false;
707         received_error = false;
708
709         // Setup containers
710
711         import = mesh_event_sock_create(eth_if_name);
712         invite_peer = invite_in_container("relay", "peer");
713         invite_nut = invite_in_container("relay", "nut");
714         assert(invite_nut);
715         assert(invite_peer);
716
717         // Run nodes and open a channel between NUT and peer
718
719         node_sim_in_container_event("relay", "1", NULL, RELAY_ID, import);
720         node_sim_in_container_event("peer", "1", invite_peer, PEER_ID, import);
721         node_sim_in_container_event("nut", "1", invite_nut, NUT_ID, import);
722
723         wait_for_event(channel_conn_cb, 10);
724         assert_int_equal(joined, true);
725
726         wait_for_event(channel_conn_cb, 10);
727         assert_int_equal(channel_opened, true);
728
729         // Wait for NUT node to restart it's instance
730
731         wait_for_event(channel_conn_cb, 60);
732         assert_int_equal(node_restarted, true);
733
734         sleep(60);
735
736         // Signal peer to send data to NUT node via channel
737
738         node_step_in_container("peer", "SIGUSR1");
739
740         // Wait for peer to receive channel error
741
742         wait_for_event(channel_conn_cb, 10);
743
744         mesh_event_destroy();
745         free(invite_peer);
746         free(invite_nut);
747         free(import);
748
749         assert_int_equal(received_error, true);
750
751         return true;
752 }
753
754 static int black_box_group_setup(void **state) {
755         const char *nodes[] = { "peer", "nut", "relay" };
756         int num_nodes = sizeof(nodes) / sizeof(nodes[0]);
757
758         printf("Creating Containers\n");
759         destroy_containers();
760         create_containers(nodes, num_nodes);
761
762         return 0;
763 }
764
765 static int black_box_group_teardown(void **state) {
766         printf("Destroying Containers\n");
767         destroy_containers();
768
769         return 0;
770 }
771
772 int test_meshlink_channel_conn(void) {
773         const struct CMUnitTest blackbox_group0_tests[] = {
774                 cmocka_unit_test_prestate_setup_teardown(test_case_channel_conn_01, setup_test, teardown_test,
775                                 (void *)&test_case_channel_conn_01_state),/*
776                 cmocka_unit_test_prestate_setup_teardown(test_case_channel_conn_02, setup_test, teardown_test,
777                                 (void *)&test_case_channel_conn_02_state),
778                 cmocka_unit_test_prestate_setup_teardown(test_case_channel_conn_03, setup_test, teardown_test,
779                                 (void *)&test_case_channel_conn_03_state),
780                 cmocka_unit_test_prestate_setup_teardown(test_case_channel_conn_04, setup_test, teardown_test,
781                                 (void *)&test_case_channel_conn_04_state),
782                 cmocka_unit_test_prestate_setup_teardown(test_case_channel_conn_05, setup_test, teardown_test,
783                                 (void *)&test_case_channel_conn_05_state),
784                 cmocka_unit_test_prestate_setup_teardown(test_case_channel_conn_06, setup_test, teardown_test,
785                                 (void *)&test_case_channel_conn_06_state),
786                 cmocka_unit_test_prestate_setup_teardown(test_case_channel_conn_07, setup_test, teardown_test,
787                                 (void *)&test_case_channel_conn_07_state),
788                 cmocka_unit_test_prestate_setup_teardown(test_case_channel_conn_08, setup_test, teardown_test,
789                                 (void *)&test_case_channel_conn_08_state)*/
790         };
791         total_tests += sizeof(blackbox_group0_tests) / sizeof(blackbox_group0_tests[0]);
792
793         return cmocka_run_group_tests(blackbox_group0_tests, black_box_group_setup, black_box_group_teardown);
794 }