diff --git a/test/env/memory/Makefile b/test/env/memory/Makefile index 7662fd8ff..623a81cb9 100644 --- a/test/env/memory/Makefile +++ b/test/env/memory/Makefile @@ -35,7 +35,6 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..) CFLAGS += $(ENV_CFLAGS) CFLAGS += -I$(SPDK_ROOT_DIR)/test/lib -UNIT_TEST_LINK_ENV = 1 TEST_FILE = memory_ut.c include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk diff --git a/test/env/memory/memory_ut.c b/test/env/memory/memory_ut.c index f3559fb72..0f7e036df 100644 --- a/test/env/memory/memory_ut.c +++ b/test/env/memory/memory_ut.c @@ -44,6 +44,14 @@ static struct spdk_bit_array *g_page_array; static void *g_vaddr_to_fail = (void *)UINT64_MAX; +DEFINE_STUB(rte_memseg_contig_walk, int, (rte_memseg_contig_walk_t func, void *arg), 0); +DEFINE_STUB(rte_mem_virt2memseg, struct rte_memseg *, + (const void *virt, const struct rte_memseg_list *msl), NULL); +DEFINE_STUB(spdk_env_dpdk_external_init, bool, (void), true); +DEFINE_STUB(rte_mem_event_callback_register, int, + (const char *name, rte_mem_event_callback_t clb, void *arg), 0); +DEFINE_STUB(rte_mem_virt2iova, rte_iova_t, (const void *virtaddr), 0); + static int test_mem_map_notify(void *cb_ctx, struct spdk_mem_map *map, enum spdk_mem_map_notify_action action,