Commit fe5061e1 authored by Anton Nayshtut's avatar Anton Nayshtut Committed by Jim Harris
Browse files

test/unit/lib/fsdev introduced



Change-Id: Ib4b93cb771b65d53ce3416b8b00cabe95c10d7e4
Signed-off-by: default avatarAnton Nayshtut <anayshtut@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22537


Reviewed-by: default avatarBen Walker <ben@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 4ed98d54
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ DIRS-$(CONFIG_IDXD) += idxd
DIRS-$(CONFIG_VBDEV_COMPRESS) += reduce
DIRS-$(CONFIG_VHOST) += vhost
DIRS-$(CONFIG_RDMA) += rdma
DIRS-$(CONFIG_FSDEV) += fsdev
ifeq ($(OS),Linux)
DIRS-y += ftl
endif
+16 −0
Original line number Diff line number Diff line
#  SPDX-License-Identifier: BSD-3-Clause
#  Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#  All rights reserved.
#

SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

DIRS-y = fsdev.c

.PHONY: all clean $(DIRS-y)

all: $(DIRS-y)
clean: $(DIRS-y)

include $(SPDK_ROOT_DIR)/mk/spdk.subdirs.mk
+11 −0
Original line number Diff line number Diff line
#  SPDX-License-Identifier: BSD-3-Clause
#  Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#

SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)

TEST_FILE = fsdev_ut.c

SPDK_LIB_LIST = fsdev notify

include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk
+2095 −0

File added.

Preview size limit exceeded, changes collapsed.

+8 −2
Original line number Diff line number Diff line
@@ -146,6 +146,10 @@ function unittest_util() {
	$valgrind $testdir/lib/util/xor.c/xor_ut
}

function unittest_fsdev() {
	$valgrind $testdir/lib/fsdev/fsdev.c/fsdev_ut
}

function unittest_init() {
	$valgrind $testdir/lib/init/subsystem.c/subsystem_ut
}
@@ -273,10 +277,12 @@ if grep -q '#define SPDK_CONFIG_VFIO_USER 1' $rootdir/include/spdk/config.h; the
fi

run_test "unittest_scsi" unittest_scsi
if [ $(uname -s) = Linux ]; then
	# There are several intermittent sock_ut failures on FreeBSD that need to be debugged.
	# So just disable running it on FreeBSD for now.  See issue #2943.
if [ $(uname -s) = Linux ]; then
	run_test "unittest_sock" unittest_sock
	# fsdev are only avaliable on Linux
	run_test "unittest_fsdev" unittest_fsdev
fi
run_test "unittest_thread" $valgrind $testdir/lib/thread/thread.c/thread_ut
run_test "unittest_iobuf" $valgrind $testdir/lib/thread/iobuf.c/iobuf_ut