X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fblackbox%2Frun_blackbox_tests%2Ftest_cases_submesh01.c;h=9c1b43299ad0a38f002d80333075046a213d450a;hb=0b6635bd9460ba2f9aeafddd2aef79929cd417a1;hp=c9854a1257244408dc0be0206a7d65054ae050c8;hpb=1d7554c7b8c632adf86492be9dc7afecb49bca5d;p=meshlink diff --git a/test/blackbox/run_blackbox_tests/test_cases_submesh01.c b/test/blackbox/run_blackbox_tests/test_cases_submesh01.c index c9854a12..9c1b4329 100644 --- a/test/blackbox/run_blackbox_tests/test_cases_submesh01.c +++ b/test/blackbox/run_blackbox_tests/test_cases_submesh01.c @@ -16,6 +16,11 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifdef NDEBUG +#undef NDEBUG +#endif + #include #include #include @@ -71,6 +76,8 @@ static black_box_state_t test_case_submesh_1_state = { }; static int black_box_group0_setup(void **state) { + (void)state; + const char *nodes[] = { "corenode1", "app1node1", "app2node1", "corenode2", "app1node2", "app2node2" }; int num_nodes = sizeof(nodes) / sizeof(nodes[0]); @@ -82,31 +89,22 @@ static int black_box_group0_setup(void **state) { } static int black_box_group0_teardown(void **state) { + (void)state; + PRINT_TEST_CASE_MSG("Destroying Containers\n"); destroy_containers(); return 0; } -static int black_box_all_nodes_setup(void **state) { - const char *nodes[] = { "corenode1" }; - int num_nodes = sizeof(nodes) / sizeof(nodes[0]); - - PRINT_TEST_CASE_MSG("Creating Containers\n"); - destroy_containers(); - create_containers(nodes, num_nodes); - PRINT_TEST_CASE_MSG("Created Containers\n"); - return 0; -} - static bool event_cb(mesh_event_payload_t payload) { static node_status_t node_status[6] = { - {core_node1, 0, 3, false}, - {app1_node1, 0, 4, false}, - {app2_node1, 0, 4, false}, - {core_node2, 0, 4, false}, - {app1_node2, 0, 7, false}, - {app2_node2, 0, 7, false} + {core_node1, 0, 3}, + {app1_node1, 0, 4}, + {app2_node1, 0, 4}, + {core_node2, 0, 4}, + {app1_node2, 0, 7}, + {app2_node2, 0, 7}, }; fprintf(stderr, "%s(%lu) : %s\n", event_node_name[payload.client_id], time(NULL), event_status[payload.mesh_event]); @@ -145,10 +143,7 @@ static void test_case_submesh_01(void **state) { */ static bool test_steps_submesh_01(void) { char *invite_corenode2, *invite_app1node1, *invite_app2node1, *invite_app1node2, *invite_app2node2; - bool result = false; - int i; char *import; - pthread_t thread1, thread2; import = mesh_event_sock_create(eth_if_name); invite_corenode2 = invite_in_container("corenode1", "corenode2");