X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fblackbox%2Frun_blackbox_tests%2Ftest_cases_channel_shutdown.c;h=c8f6ef43de94f1c1c2e7ce9d4330907912508706;hb=63b8edd005fe729ee6cc0550099e03d17e4646a7;hp=b344df52d2b68b5ec0518aa05bc32949b9040a90;hpb=cdb3dada645394bb1e0d0bf7816291fbd9a2a4a0;p=meshlink diff --git a/test/blackbox/run_blackbox_tests/test_cases_channel_shutdown.c b/test/blackbox/run_blackbox_tests/test_cases_channel_shutdown.c index b344df52..c8f6ef43 100644 --- a/test/blackbox/run_blackbox_tests/test_cases_channel_shutdown.c +++ b/test/blackbox/run_blackbox_tests/test_cases_channel_shutdown.c @@ -17,6 +17,10 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifdef NDEBUG +#undef NDEBUG +#endif + #include "execute_tests.h" #include "test_cases_channel_shutdown.h" #include "../common/containers.h" @@ -142,8 +146,8 @@ static void test_case_mesh_channel_shutdown_01(void **state) { */ static bool test_steps_mesh_channel_shutdown_01(void) { struct timespec timeout = {0}; - meshlink_destroy("chan_shutdown_conf.1"); - meshlink_destroy("chan_shutdown_conf.2"); + assert(meshlink_destroy("chan_shutdown_conf.1")); + assert(meshlink_destroy("chan_shutdown_conf.2")); // Open two new meshlink instance. meshlink_handle_t *mesh1 = meshlink_open("chan_shutdown_conf.1", "foo", "channels", DEV_CLASS_BACKBONE); @@ -241,8 +245,8 @@ static bool test_steps_mesh_channel_shutdown_01(void) { meshlink_close(mesh2); meshlink_close(mesh1); - meshlink_destroy("chan_shutdown_conf.1"); - meshlink_destroy("chan_shutdown_conf.2"); + assert(meshlink_destroy("chan_shutdown_conf.1")); + assert(meshlink_destroy("chan_shutdown_conf.2")); return true; } @@ -262,7 +266,7 @@ static void test_case_mesh_channel_shutdown_02(void **state) { meshlink_channel_shutdown API should report proper error handling */ static bool test_steps_mesh_channel_shutdown_02(void) { - meshlink_destroy("channelshutdownconf.3"); + assert(meshlink_destroy("channelshutdownconf.3")); meshlink_set_log_cb(NULL, TEST_MESHLINK_LOG_LEVEL, meshlink_callback_logger); /* Create meshlink instance */ @@ -286,7 +290,7 @@ static bool test_steps_mesh_channel_shutdown_02(void) { assert_int_equal(meshlink_errno, MESHLINK_EINVAL); meshlink_close(mesh_handle); - meshlink_destroy("channelshutdownconf.3"); + assert(meshlink_destroy("channelshutdownconf.3")); return true; } @@ -306,7 +310,7 @@ static void test_case_mesh_channel_shutdown_03(void **state) { meshlink_channel_shutdown API should report proper error handling */ static bool test_steps_mesh_channel_shutdown_03(void) { - meshlink_destroy("channelshutdownconf.4"); + assert(meshlink_destroy("channelshutdownconf.4")); meshlink_set_log_cb(NULL, TEST_MESHLINK_LOG_LEVEL, meshlink_callback_logger); /* Create meshlink instance */ @@ -323,7 +327,7 @@ static bool test_steps_mesh_channel_shutdown_03(void) { assert_int_equal(meshlink_errno, MESHLINK_EINVAL); meshlink_close(mesh_handle); - meshlink_destroy("channelshutdownconf.4"); + assert(meshlink_destroy("channelshutdownconf.4")); return true; }