summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'unittests')
-rw-r--r--unittests/lib/memalign.c3
-rw-r--r--unittests/unittest.c11
-rw-r--r--unittests/unittest.h4
3 files changed, 2 insertions, 16 deletions
diff --git a/unittests/lib/memalign.c b/unittests/lib/memalign.c
index 854c2744..42a2e31a 100644
--- a/unittests/lib/memalign.c
+++ b/unittests/lib/memalign.c
@@ -1,3 +1,4 @@
+#include <stdlib.h>
#include "../unittest.h"
#include "../../lib/memalign.h"
@@ -5,7 +6,7 @@
static void test_memalign_1(void)
{
size_t align = 4096;
- void *p = fio_memalign(align, 1234, false);
+ void *p = __fio_memalign(align, 1234, malloc);
if (p)
CU_ASSERT_EQUAL(((int)(uintptr_t)p) & (align - 1), 0);
diff --git a/unittests/unittest.c b/unittests/unittest.c
index 66789e4f..c37e1971 100644
--- a/unittests/unittest.c
+++ b/unittests/unittest.c
@@ -8,17 +8,6 @@
#include "./unittest.h"
-/* XXX workaround lib/memalign.c's dependency on smalloc.c */
-void *smalloc(size_t size)
-{
- return malloc(size);
-}
-
-void sfree(void *ptr)
-{
- free(ptr);
-}
-
CU_ErrorCode fio_unittest_add_suite(const char *name, CU_InitializeFunc initfn,
CU_CleanupFunc cleanfn, struct fio_unittest_entry *tvec)
{
diff --git a/unittests/unittest.h b/unittests/unittest.h
index bbc49613..786c1c97 100644
--- a/unittests/unittest.h
+++ b/unittests/unittest.h
@@ -11,10 +11,6 @@ struct fio_unittest_entry {
CU_TestFunc fn;
};
-/* XXX workaround lib/memalign.c's dependency on smalloc.c */
-void *smalloc(size_t);
-void sfree(void*);
-
CU_ErrorCode fio_unittest_add_suite(const char*, CU_InitializeFunc,
CU_CleanupFunc, struct fio_unittest_entry*);