From 577b667ac364701f222025309e6c6d9df2dc7aef Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 27 Feb 2019 11:18:31 -0700 Subject: [PATCH] test/env: add UNIT_TEST_NO_PCI_ADDR Similar to UNIT_TEST_NO_VTOPHYS, we need this since a future patch will result in some of the pci_addr functions getting linked in via a new dependency between memory.c and init.c. Signed-off-by: Jim Harris Change-Id: I61bd4e172ee70a5dcb99c8c6fc1fb19070a2a7cd Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446460 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Shuhei Matsumoto Reviewed-by: Changpeng Liu --- test/common/lib/test_env.c | 2 ++ test/env/memory/memory_ut.c | 1 + 2 files changed, 3 insertions(+) diff --git a/test/common/lib/test_env.c b/test/common/lib/test_env.c index f4776aa11..52fb23d15 100644 --- a/test/common/lib/test_env.c +++ b/test/common/lib/test_env.c @@ -436,6 +436,7 @@ spdk_delay_us(unsigned int us) ut_spdk_get_ticks += us; } +#ifndef UNIT_TEST_NO_PCI_ADDR DEFINE_RETURN_MOCK(spdk_pci_addr_parse, int); int spdk_pci_addr_parse(struct spdk_pci_addr *addr, const char *bdf) @@ -521,3 +522,4 @@ spdk_pci_addr_compare(const struct spdk_pci_addr *a1, const struct spdk_pci_addr return 0; } +#endif diff --git a/test/env/memory/memory_ut.c b/test/env/memory/memory_ut.c index 619e91932..80ec2ef09 100644 --- a/test/env/memory/memory_ut.c +++ b/test/env/memory/memory_ut.c @@ -34,6 +34,7 @@ #include "env_dpdk/memory.c" #define UNIT_TEST_NO_VTOPHYS +#define UNIT_TEST_NO_PCI_ADDR #include "common/lib/test_env.c" #include "spdk_cunit.h"