From 9e132fbc90b0b12cf0fb0f6f7ce32d853cee6751 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Wed, 22 Aug 2018 17:01:28 -0700 Subject: [PATCH] test: Include test_env.c in several unit tests These tests don't currently require the env mockup, but they will in a future patch. Change-Id: Ibf311f198a291f825a83e7b89708cd2442f35f7a Signed-off-by: Ben Walker Reviewed-on: https://review.gerrithub.io/423183 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris --- test/unit/lib/iscsi/conn.c/conn_ut.c | 11 +---------- .../lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut.c | 1 + test/unit/lib/nvmf/subsystem.c/subsystem_ut.c | 1 + 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/test/unit/lib/iscsi/conn.c/conn_ut.c b/test/unit/lib/iscsi/conn.c/conn_ut.c index 8fd1dd00a..f6b0b40ff 100644 --- a/test/unit/lib/iscsi/conn.c/conn_ut.c +++ b/test/unit/lib/iscsi/conn.c/conn_ut.c @@ -33,6 +33,7 @@ #include "spdk/stdinc.h" +#include "common/lib/test_env.c" #include "spdk_cunit.h" #include "iscsi/conn.c" @@ -74,16 +75,6 @@ spdk_env_get_next_core(uint32_t prev_core) return 0; } -uint64_t spdk_get_ticks(void) -{ - return 0; -} - -uint64_t spdk_get_ticks_hz(void) -{ - return 0; -} - struct spdk_event * spdk_event_allocate(uint32_t lcore, spdk_event_fn fn, void *arg1, void *arg2) { diff --git a/test/unit/lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut.c b/test/unit/lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut.c index 8d51c8ae0..56481aa72 100644 --- a/test/unit/lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut.c +++ b/test/unit/lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut.c @@ -36,6 +36,7 @@ #include "spdk_cunit.h" #include "spdk_internal/mock.h" +#include "common/lib/test_env.c" #include "nvmf/ctrlr_discovery.c" #include "nvmf/subsystem.c" diff --git a/test/unit/lib/nvmf/subsystem.c/subsystem_ut.c b/test/unit/lib/nvmf/subsystem.c/subsystem_ut.c index 6de943c30..8f97f764f 100644 --- a/test/unit/lib/nvmf/subsystem.c/subsystem_ut.c +++ b/test/unit/lib/nvmf/subsystem.c/subsystem_ut.c @@ -33,6 +33,7 @@ #include "spdk/stdinc.h" +#include "common/lib/test_env.c" #include "spdk_cunit.h" #include "spdk_internal/mock.h"