ut/iscsi: Replace trace library link by stubs
Subsequent patches will change trace functions to be called in unit tests. Using stubs is enough as done in other libraries and do the change in this patch. For iscsi_ut.c, add stubs to not iscsi_ut.c but common.c to cover other files. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ia14bc932f451b14bdb0ba6e0cb949463490a879e Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477414 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
d4914dee06
commit
ff7e7c83e6
@ -14,6 +14,16 @@
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("iscsi", SPDK_LOG_ISCSI)
|
||||
|
||||
struct spdk_trace_histories *g_trace_histories;
|
||||
DEFINE_STUB_V(spdk_trace_add_register_fn, (struct spdk_trace_register_fn *reg_fn));
|
||||
DEFINE_STUB_V(spdk_trace_register_owner, (uint8_t type, char id_prefix));
|
||||
DEFINE_STUB_V(spdk_trace_register_object, (uint8_t type, char id_prefix));
|
||||
DEFINE_STUB_V(spdk_trace_register_description, (const char *name,
|
||||
uint16_t tpoint_id, uint8_t owner_type, uint8_t object_type, uint8_t new_object,
|
||||
uint8_t arg1_type, const char *arg1_name));
|
||||
DEFINE_STUB_V(_spdk_trace_record, (uint64_t tsc, uint16_t tpoint_id, uint16_t poller_id,
|
||||
uint32_t size, uint64_t object_id, uint64_t arg1));
|
||||
|
||||
TAILQ_HEAD(, spdk_iscsi_pdu) g_write_pdu_list = TAILQ_HEAD_INITIALIZER(g_write_pdu_list);
|
||||
|
||||
static bool g_task_pool_is_empty = false;
|
||||
|
@ -33,8 +33,6 @@
|
||||
|
||||
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
|
||||
|
||||
SPDK_LIB_LIST = trace
|
||||
|
||||
TEST_FILE = conn_ut.c
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk
|
||||
|
@ -42,6 +42,16 @@
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("iscsi", SPDK_LOG_ISCSI)
|
||||
|
||||
struct spdk_trace_histories *g_trace_histories;
|
||||
DEFINE_STUB_V(spdk_trace_add_register_fn, (struct spdk_trace_register_fn *reg_fn));
|
||||
DEFINE_STUB_V(spdk_trace_register_owner, (uint8_t type, char id_prefix));
|
||||
DEFINE_STUB_V(spdk_trace_register_object, (uint8_t type, char id_prefix));
|
||||
DEFINE_STUB_V(spdk_trace_register_description, (const char *name,
|
||||
uint16_t tpoint_id, uint8_t owner_type, uint8_t object_type, uint8_t new_object,
|
||||
uint8_t arg1_type, const char *arg1_name));
|
||||
DEFINE_STUB_V(_spdk_trace_record, (uint64_t tsc, uint16_t tpoint_id, uint16_t poller_id,
|
||||
uint32_t size, uint64_t object_id, uint64_t arg1));
|
||||
|
||||
struct spdk_scsi_lun {
|
||||
uint8_t reserved;
|
||||
};
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
|
||||
|
||||
SPDK_LIB_LIST = trace conf util
|
||||
SPDK_LIB_LIST = conf util
|
||||
|
||||
SCSI_OBJS = port
|
||||
ISCSI_OBJS = md5 param
|
||||
|
Loading…
Reference in New Issue
Block a user