tests: undef NDEBUG in tests
So we can run tests even when compiled with -DNDEBUG
Change-Id: Iebb8399409e2b0a5172529e08bcac188956fd925
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
diff --git a/tests/test-utils.c b/tests/test-utils.c
index fca1910..cbb931b 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -1,5 +1,9 @@
/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
#include <string.h>
#include <assert.h>
@@ -23,7 +27,6 @@
struct mctp_binding_test *mctp_binding_test_init(void)
{
struct mctp_binding_test *test;
-
test = __mctp_alloc(sizeof(*test));
memset(test, '\0', sizeof(*test));
test->binding.name = "test";
diff --git a/tests/test_bridge.c b/tests/test_bridge.c
index c710617..35625ca 100644
--- a/tests/test_bridge.c
+++ b/tests/test_bridge.c
@@ -1,5 +1,9 @@
/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
@@ -77,7 +81,6 @@
int main(void)
{
struct test_ctx _ctx, *ctx = &_ctx;
-
ctx->mctp = mctp_init();
ctx->bindings[0] = mctp_binding_bridge_init("binding0");
diff --git a/tests/test_eid.c b/tests/test_eid.c
index 2fbbd5a..4687cb8 100644
--- a/tests/test_eid.c
+++ b/tests/test_eid.c
@@ -1,5 +1,9 @@
/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/tests/test_seq.c b/tests/test_seq.c
index 22242ba..0e3dd15 100644
--- a/tests/test_seq.c
+++ b/tests/test_seq.c
@@ -1,5 +1,9 @@
/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>