From 728d001395b3c20108183963f498a1b51b877ab5 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 21 Jun 2017 14:31:29 -0700 Subject: [PATCH] test: move blob library unit tests to test/unit Change-Id: I151672e49c442dc1420b5ef6b5a6a47eb78e7464 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/366517 Reviewed-by: Jim Harris Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker --- test/lib/Makefile | 2 +- test/lib/blobfs/blobfs_async_ut/blobfs_async_ut.c | 2 +- test/lib/blobfs/blobfs_sync_ut/blobfs_sync_ut.c | 2 +- test/unit/lib/Makefile | 2 +- test/{ => unit}/lib/blob/Makefile | 5 +++-- test/{lib/blob/blob_ut => unit/lib/blob/blob.c}/.gitignore | 0 test/{lib/blob/blob_ut => unit/lib/blob/blob.c}/Makefile | 2 +- test/{lib/blob/blob_ut => unit/lib/blob/blob.c}/blob_ut.c | 0 test/{ => unit}/lib/blob/bs_dev_common.c | 0 unittest.sh | 2 +- 10 files changed, 9 insertions(+), 8 deletions(-) rename test/{ => unit}/lib/blob/Makefile (96%) rename test/{lib/blob/blob_ut => unit/lib/blob/blob.c}/.gitignore (100%) rename test/{lib/blob/blob_ut => unit/lib/blob/blob.c}/Makefile (97%) rename test/{lib/blob/blob_ut => unit/lib/blob/blob.c}/blob_ut.c (100%) rename test/{ => unit}/lib/blob/bs_dev_common.c (100%) diff --git a/test/lib/Makefile b/test/lib/Makefile index 2458dd0fc..fa76b2aec 100644 --- a/test/lib/Makefile +++ b/test/lib/Makefile @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y = bdev blob blobfs env event iscsi json log nvme +DIRS-y = bdev blobfs env event iscsi json log nvme .PHONY: all clean $(DIRS-y) diff --git a/test/lib/blobfs/blobfs_async_ut/blobfs_async_ut.c b/test/lib/blobfs/blobfs_async_ut/blobfs_async_ut.c index c678bfb09..5778b99ac 100644 --- a/test/lib/blobfs/blobfs_async_ut/blobfs_async_ut.c +++ b/test/lib/blobfs/blobfs_async_ut/blobfs_async_ut.c @@ -41,7 +41,7 @@ #include "blobfs.c" #include "tree.c" -#include "lib/blob/bs_dev_common.c" +#include "unit/lib/blob/bs_dev_common.c" struct spdk_filesystem *g_fs; struct spdk_file *g_file; diff --git a/test/lib/blobfs/blobfs_sync_ut/blobfs_sync_ut.c b/test/lib/blobfs/blobfs_sync_ut/blobfs_sync_ut.c index 4db49e2be..43832d13f 100644 --- a/test/lib/blobfs/blobfs_sync_ut/blobfs_sync_ut.c +++ b/test/lib/blobfs/blobfs_sync_ut/blobfs_sync_ut.c @@ -40,7 +40,7 @@ #include "spdk/barrier.h" #include "spdk_cunit.h" -#include "lib/blob/bs_dev_common.c" +#include "unit/lib/blob/bs_dev_common.c" #include "lib/test_env.c" #include "blobfs.c" #include "tree.c" diff --git a/test/unit/lib/Makefile b/test/unit/lib/Makefile index 08da133c8..61a799460 100644 --- a/test/unit/lib/Makefile +++ b/test/unit/lib/Makefile @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y = bdev ioat json jsonrpc nvme nvmf scsi util +DIRS-y = bdev blob ioat json jsonrpc nvme nvmf scsi util .PHONY: all clean $(DIRS-y) diff --git a/test/lib/blob/Makefile b/test/unit/lib/blob/Makefile similarity index 96% rename from test/lib/blob/Makefile rename to test/unit/lib/blob/Makefile index 04d80e531..c57d0b1cc 100644 --- a/test/lib/blob/Makefile +++ b/test/unit/lib/blob/Makefile @@ -31,10 +31,11 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..) +SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y = blob_ut +DIRS-y = blob.c + .PHONY: all clean $(DIRS-y) all: $(DIRS-y) diff --git a/test/lib/blob/blob_ut/.gitignore b/test/unit/lib/blob/blob.c/.gitignore similarity index 100% rename from test/lib/blob/blob_ut/.gitignore rename to test/unit/lib/blob/blob.c/.gitignore diff --git a/test/lib/blob/blob_ut/Makefile b/test/unit/lib/blob/blob.c/Makefile similarity index 97% rename from test/lib/blob/blob_ut/Makefile rename to test/unit/lib/blob/blob.c/Makefile index 26529ad88..6cae88762 100644 --- a/test/lib/blob/blob_ut/Makefile +++ b/test/unit/lib/blob/blob.c/Makefile @@ -31,7 +31,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) +SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/test/lib/blob/blob_ut/blob_ut.c b/test/unit/lib/blob/blob.c/blob_ut.c similarity index 100% rename from test/lib/blob/blob_ut/blob_ut.c rename to test/unit/lib/blob/blob.c/blob_ut.c diff --git a/test/lib/blob/bs_dev_common.c b/test/unit/lib/blob/bs_dev_common.c similarity index 100% rename from test/lib/blob/bs_dev_common.c rename to test/unit/lib/blob/bs_dev_common.c diff --git a/unittest.sh b/unittest.sh index cf80edfa7..1c58750a1 100755 --- a/unittest.sh +++ b/unittest.sh @@ -32,7 +32,7 @@ fi $valgrind test/unit/lib/bdev/scsi_nvme.c/scsi_nvme_ut -$valgrind test/lib/blob/blob_ut/blob_ut +$valgrind test/unit/lib/blob/blob.c/blob_ut $valgrind test/lib/blobfs/blobfs_async_ut/blobfs_async_ut # blobfs_sync_ut hangs when run under valgrind, so don't use $valgrind