]> git.meshlink.io Git - meshlink/blobdiff - test/blackbox/run_blackbox_tests/test_cases_rec_cb.c
Updated test vectors for get node reachability
[meshlink] / test / blackbox / run_blackbox_tests / test_cases_rec_cb.c
index 2f22d7e6859c6355e19af8c476108b0c0adacc65..e659ead8b2d0c01c2278199934cf134d5882ce46 100644 (file)
     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 "execute_tests.h"
 #include "test_cases.h"
 #include "../common/containers.h"
@@ -59,7 +64,7 @@ static black_box_state_t test_case_set_rec_cb_03_state = {
 static bool received;
 
 /* mutex for the common variable */
-pthread_mutex_t lock;
+static pthread_mutex_t lock;
 
 /* receive callback function */
 static void rec_cb(meshlink_handle_t *mesh, meshlink_node_t *source, const void *data, size_t len) {
@@ -116,7 +121,7 @@ static bool test_set_rec_cb_01(void) {
        pthread_mutex_unlock(&lock);
 
        meshlink_close(mesh_handle);
-       meshlink_destroy("set_receive_cb_conf");
+       assert(meshlink_destroy("set_receive_cb_conf"));
        return true;
 }
 
@@ -184,7 +189,7 @@ static bool test_set_rec_cb_03(void) {
        pthread_mutex_unlock(&lock);
 
        meshlink_close(mesh_handle);
-       meshlink_destroy("set_receive_cb_conf");
+       assert(meshlink_destroy("set_receive_cb_conf"));
        return true;
 }