Spdk/test/thread/lock/Makefile
Mike Gerdts 0f73e7664d thread: test SPDK spinlocks in an application
This exercises the parts of spdk_spin_*() that are difficult to test in
unit tests. In particular, it tests multiple SPDK threads running on
different pthreads contending for a lock and it tests pollers and
messages going off CPU with a lock held.

Change-Id: I5cd6ce29c92c44ba63f47332fe339e59eed81553
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15534
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-12-06 21:20:17 +00:00

20 lines
647 B
Makefile

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
APP = spdk_lock
C_SRCS := spdk_lock.c
CFLAGS += -I$(SPDK_ROOT_DIR)/lib
SPDK_LIB_LIST = event
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
# To test error paths and some state related to spinlocks spdk_lock.c includes thread/thread.c.
# To prevent redefined symbol errors, this test program needs to not link with libspdk_thread.
DEPDIRS-event := $(filter-out thread,$(DEPDIRS-event))
DEPDIRS-init := $(filter-out thread,$(DEPDIRS-init))