From 6b9b448e5353da0ecec7fe9b3ab09a46eaf73057 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Mon, 11 May 2020 14:15:03 -0700 Subject: [PATCH] build: Output executables from the app directory to build/bin Automatically place binaries produced from the app directory into build/bin. This matches with the output in build/lib that already exists. Change-Id: I13cd2da71d2f88592e22308fe8a907bf458458b5 Signed-off-by: Ben Walker Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2379 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Darek Stojaczyk --- .gitignore | 1 + Makefile | 7 ++++++- README.md | 2 +- autobuild.sh | 4 ++-- doc/iscsi.md | 6 +++--- doc/nvmf.md | 6 +++--- doc/nvmf_tracing.md | 12 ++++++------ doc/spdkcli.md | 2 +- doc/vhost.md | 6 +++--- doc/vmd.md | 4 ++-- mk/spdk.app.mk | 16 ++++++++++++---- mk/spdk.app_cxx.mk | 16 ++++++++++++---- mk/spdk.common.mk | 8 ++++---- scripts/perf/nvmf/run_nvmf.py | 2 +- test/bdev/blockdev.sh | 2 +- test/common/applications.sh | 8 ++++---- test/common/autotest_common.sh | 5 ++++- test/dpdk_memory_utility/test_dpdk_mem_info.sh | 2 +- test/ftl/dirty_shutdown.sh | 4 ++-- test/ftl/fio.sh | 2 +- test/ftl/ftl.sh | 2 +- test/ftl/json.sh | 2 +- test/ftl/restore.sh | 4 ++-- test/iscsi_tgt/perf/iscsi_target.sh | 2 +- test/iscsi_tgt/trace_record/trace_record.sh | 4 ++-- test/json_config/alias_rpc/alias_rpc.sh | 2 +- test/json_config/json_config.sh | 2 +- test/lvol/basic.sh | 2 +- test/lvol/hotremove.sh | 2 +- test/lvol/rename.sh | 2 +- test/lvol/resize.sh | 2 +- test/lvol/snapshot_clone.sh | 2 +- test/lvol/tasting.sh | 4 ++-- test/lvol/thin_provisioning.sh | 2 +- test/nvme/cuse/nvme_cuse.sh | 2 +- test/nvme/nvme_ns_manage_cuse.sh | 2 +- test/nvme/nvme_opal.sh | 2 +- test/nvme/nvme_rpc.sh | 2 +- test/nvme/spdk_nvme_cli_cuse.sh | 2 +- test/nvme/spdk_smartctl_cuse.sh | 2 +- test/ocf/management/create-destruct.sh | 2 +- test/ocf/management/multicore.sh | 2 +- test/ocf/management/persistent-metadata.sh | 4 ++-- test/ocf/management/remove.sh | 4 ++-- test/pmem/common.sh | 2 +- test/rpc/rpc.sh | 2 +- test/spdkcli/common.sh | 6 +++--- test/spdkcli/iscsi.sh | 2 +- test/spdkcli/tcp.sh | 2 +- test/spdkcli/virtio.sh | 2 +- test/vhost/common.sh | 2 +- test/vhost/initiator/blockdev.sh | 4 ++-- test/vhost/migration/migration-tc2.sh | 2 +- test/vhost/migration/migration-tc3a.sh | 2 +- test/vmd/vmd.sh | 2 +- 55 files changed, 113 insertions(+), 88 deletions(-) diff --git a/.gitignore b/.gitignore index 563afa687..4e149805a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ *.so.* *.swp *.DS_Store +build/ ut_coverage/ tags cscope.out diff --git a/Makefile b/Makefile index 47e62c6f9..b81074766 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,7 @@ endif all: mk/cc.mk $(DIRS-y) clean: $(DIRS-y) $(Q)rm -f include/spdk/config.h + $(Q)rm -rf build/bin install: all $(Q)echo "Installed to $(DESTDIR)$(CONFIG_PREFIX)" @@ -97,12 +98,16 @@ examples: $(LIB) pkgdep: sh ./scripts/pkgdep.sh -$(DIRS-y): mk/cc.mk include/spdk/config.h +$(DIRS-y): mk/cc.mk build_dir include/spdk/config.h mk/cc.mk: $(Q)echo "Please run configure prior to make" false +build_dir: mk/cc.mk + $(Q)mkdir -p build/lib + $(Q)mkdir -p build/bin + include/spdk/config.h: mk/config.mk scripts/genconfig.py $(Q)echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \ echo "#define SPDK_CONFIG_H" >> $@.tmp; \ diff --git a/README.md b/README.md index 2250f3f4b..62006e1f9 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,7 @@ Linux: ./configure --with-shared make ldconfig -v -n ./build/lib -LD_LIBRARY_PATH=./build/lib/ ./app/spdk_tgt/spdk_tgt +LD_LIBRARY_PATH=./build/lib/ ./build/bin/spdk_tgt ~~~ diff --git a/autobuild.sh b/autobuild.sh index c64303387..3613ed56f 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -104,11 +104,11 @@ function porcelain_check() { # capturing a binary's stat data before and after touching a # header file and re-making. function header_dependency_check() { - STAT1=$(stat app/spdk_tgt/spdk_tgt) + STAT1=$(stat $SPDK_BIN_DIR/spdk_tgt) sleep 1 touch lib/nvme/nvme_internal.h $MAKE $MAKEFLAGS - STAT2=$(stat app/spdk_tgt/spdk_tgt) + STAT2=$(stat $SPDK_BIN_DIR/spdk_tgt) if [ "$STAT1" == "$STAT2" ]; then echo "Header dependency check failed" diff --git a/doc/iscsi.md b/doc/iscsi.md index 08fb1319f..7d81623d4 100644 --- a/doc/iscsi.md +++ b/doc/iscsi.md @@ -10,7 +10,7 @@ This following section describes how to run iscsi from your cloned package. This guide starts by assuming that you can already build the standard SPDK distribution on your platform. -Once built, the binary will be in `app/iscsi_tgt`. +Once built, the binary will be in `build/bin`. If you want to kill the application by using signal, make sure use the SIGTERM, then the application will release all the shared memory resource before exit, the SIGKILL will make the shared memory @@ -38,7 +38,7 @@ then run the iscsi_tgt application and pass it the configuration file using the the target requires elevated privileges (root) to run. ~~~ -app/iscsi_tgt/iscsi_tgt -c /path/to/iscsi.conf +build/bin/iscsi_tgt -c /path/to/iscsi.conf ~~~ ### Assigning CPU Cores to the iSCSI Target {#iscsi_config_lcore} @@ -227,7 +227,7 @@ Assuming we have one iSCSI Target server with portal at 10.0.0.1:3200, two LUNs Start iscsi_tgt application: ``` -./app/iscsi_tgt/iscsi_tgt +./build/bin/iscsi_tgt ``` Construct two 64MB Malloc block devices with 512B sector size "Malloc0" and "Malloc1": diff --git a/doc/nvmf.md b/doc/nvmf.md index f2fae487a..34a69b66f 100644 --- a/doc/nvmf.md +++ b/doc/nvmf.md @@ -43,7 +43,7 @@ Then build SPDK with RDMA enabled: make ~~~ -Once built, the binary will be in `app/nvmf_tgt`. +Once built, the binary will be in `build/bin`. ### Prerequisites for InfiniBand/RDMA Verbs {#nvmf_prereqs_verbs} @@ -157,7 +157,7 @@ and an in capsule data size of 0 bytes. The TCP transport is configured with an 16384 bytes, 8 max qpairs per controller, and an in capsule data size of 8192 bytes. ~~~{.sh} -app/nvmf_tgt/nvmf_tgt +build/bin/nvmf_tgt scripts/rpc.py nvmf_create_transport -t RDMA -u 8192 -p 4 -c 0 scripts/rpc.py nvmf_create_transport -t TCP -u 16384 -p 8 -c 8192 ~~~ @@ -231,7 +231,7 @@ The `-m` core mask option specifies a bit mask of the CPU cores that SPDK is allowed to execute work items on. For example, to allow SPDK to use cores 24, 25, 26 and 27: ~~~{.sh} -app/nvmf_tgt/nvmf_tgt -m 0xF000000 +build/bin/nvmf_tgt -m 0xF000000 ~~~ ## Configuring the Linux NVMe over Fabrics Host {#nvmf_host} diff --git a/doc/nvmf_tracing.md b/doc/nvmf_tracing.md index bd10a867d..a5a5d86cd 100644 --- a/doc/nvmf_tracing.md +++ b/doc/nvmf_tracing.md @@ -16,14 +16,14 @@ the instrumentation of all the tracepoints group in an SPDK target application, target with -e parameter set to 0xFFFF: ~~~ -app/nvmf_tgt/nvmf_tgt -e 0xFFFF +build/bin/nvmf_tgt -e 0xFFFF ~~~ To enable the instrumentation of just the NVMe-oF RDMA tracepoints in an SPDK target application, start the target with the -e parameter set to 0x10: ~~~ -app/nvmf_tgt/nvmf_tgt -e 0x10 +build/bin/nvmf_tgt -e 0x10 ~~~ When the target starts, a message is logged with the information you need to view @@ -55,7 +55,7 @@ The spdk_trace program can be found in the app/trace directory. To analyze the system running the NVMe-oF target, simply execute the command line shown in the log: ~~~{.sh} -app/trace/spdk_trace -s nvmf -p 24147 +build/bin/spdk_trace -s nvmf -p 24147 ~~~ To analyze the tracepoints on a different system, first prepare the tracepoint file for transfer. The @@ -70,7 +70,7 @@ After transferring the /tmp/trace.bz2 tracepoint file to a different system: ~~~{.sh} bunzip2 /tmp/trace.bz2 -app/trace/spdk_trace -f /tmp/trace +build/bin/spdk_trace -f /tmp/trace ~~~ The following is sample trace capture showing the cumulative time that each @@ -134,7 +134,7 @@ and store all entries into specified output file at its shutdown on SIGINT or SI After SPDK nvmf target is launched, simply execute the command line shown in the log: ~~~{.sh} -app/trace_record/spdk_trace_record -q -s nvmf -p 24147 -f /tmp/spdk_nvmf_record.trace +build/bin/spdk_trace_record -q -s nvmf -p 24147 -f /tmp/spdk_nvmf_record.trace ~~~ Also send I/Os to the SPDK target application to generate events by previous perf example for 10 minutes. @@ -147,7 +147,7 @@ After the completion of perf example, shut down spdk_trace_record by signal SIGI To analyze the tracepoints output file from spdk_trace_record, simply run spdk_trace program by: ~~~{.sh} -app/trace/spdk_trace -f /tmp/spdk_nvmf_record.trace +build/bin/spdk_trace -f /tmp/spdk_nvmf_record.trace ~~~ # Adding New Tracepoints {#add_tracepoints} diff --git a/doc/spdkcli.md b/doc/spdkcli.md index 1b35e1eea..74994fc4a 100644 --- a/doc/spdkcli.md +++ b/doc/spdkcli.md @@ -18,7 +18,7 @@ Package dependencies at the moment include: ~~~{.sh} ./scripts/setup.sh -./app/vhost/vhost -c vhost.conf +./build/bin/vhost -c vhost.conf ~~~ ### Run SPDK CLI diff --git a/doc/vhost.md b/doc/vhost.md index 96910509b..71710441d 100644 --- a/doc/vhost.md +++ b/doc/vhost.md @@ -91,13 +91,13 @@ be restricted to run on a subset of these CPU cores. See @ref vhost_vdev_create details. ~~~{.sh} -app/vhost/vhost -S /var/tmp -m 0x3 +build/bin/vhost -S /var/tmp -m 0x3 ~~~ To list all available vhost options use the following command. ~~~{.sh} -app/vhost/vhost -h +build/bin/vhost -h ~~~ # SPDK Configuration {#vhost_config} @@ -247,7 +247,7 @@ host:~# HUGEMEM=2048 ./scripts/setup.sh ~~~ ~~~{.sh} -host:~# ./app/vhost/vhost -S /var/tmp -s 1024 -m 0x3 & +host:~# ./build/bin/vhost -S /var/tmp -s 1024 -m 0x3 & Starting DPDK 17.11.0 initialization... [ DPDK EAL parameters: vhost -c 3 -m 1024 --master-lcore=1 --file-prefix=spdk_pid156014 ] EAL: Detected 48 lcore(s) diff --git a/doc/vmd.md b/doc/vmd.md index 3b1f9a970..a9572c5b8 100644 --- a/doc/vmd.md +++ b/doc/vmd.md @@ -58,7 +58,7 @@ Check for available devices behind the VMD with spdk_lspci. Example: ``` -$ ./app/spdk_lspci/spdk_lspci +$ ./build/bin/spdk_lspci 5d0505:01:00.0 (8086 a54) (NVMe disk behind VMD) 5d0505:03:00.0 (8086 a54) (NVMe disk behind VMD) @@ -100,7 +100,7 @@ JSON config: or use RPC call before framework starts e.g. ``` -$ ./app/spdk_tgt/spdk_tgt --wait_for_rpc +$ ./build/bin/spdk_tgt --wait_for_rpc $ ./scripts/rpc.py enable_vmd $ ./scripts/rpc.py framework_start_init ``` diff --git a/mk/spdk.app.mk b/mk/spdk.app.mk index 9b8e8a00e..e7223c5db 100644 --- a/mk/spdk.app.mk +++ b/mk/spdk.app.mk @@ -33,6 +33,14 @@ include $(SPDK_ROOT_DIR)/mk/spdk.app_vars.mk +# Applications in app/ go into build/bin/. +# Use findstring to identify if the current directory is in the app +# directory. If it is, change the APP location to build. +APP_NAME := $(notdir $(APP)) +ifneq (,$(findstring $(SPDK_ROOT_DIR)/app,$(CURDIR))) + APP := $(APP_NAME:%=$(SPDK_ROOT_DIR)/build/bin/%) +endif + LIBS += $(SPDK_LIB_LINKER_ARGS) CLEAN_FILES = $(APP) @@ -40,14 +48,14 @@ CLEAN_FILES = $(APP) all : $(APP) @: -install: all +install: empty_rule + +uninstall: empty_rule # To avoid overwriting warning -empty_uninstall_rule: +empty_rule: @: -uninstall: empty_uninstall_rule - $(APP) : $(OBJS) $(SPDK_LIB_FILES) $(ENV_LIBS) $(LINK_C) diff --git a/mk/spdk.app_cxx.mk b/mk/spdk.app_cxx.mk index 1222c6998..297e7a58c 100644 --- a/mk/spdk.app_cxx.mk +++ b/mk/spdk.app_cxx.mk @@ -32,6 +32,14 @@ # include $(SPDK_ROOT_DIR)/mk/spdk.app_vars.mk +# Applications in app/ go into build/bin/. +# Use findstring to identify if the current directory is in the app +# directory. If it is, change the APP location to build. +APP_NAME := $(notdir $(APP)) +ifneq (,$(findstring $(SPDK_ROOT_DIR)/app,$(CURDIR))) + APP := $(APP_NAME:%=$(SPDK_ROOT_DIR)/build/bin/%) +endif + LIBS += $(SPDK_LIB_LINKER_ARGS) CLEAN_FILES = $(APP) @@ -39,14 +47,14 @@ CLEAN_FILES = $(APP) all : $(APP) @: -install: all +install: empty_rule + +uninstall: empty_rule # To avoid overwriting warning -empty_uninstall_rule: +empty_rule: @: -uninstall: empty_uninstall_rule - $(APP) : $(OBJS) $(SPDK_LIB_FILES) $(ENV_LIBS) $(LINK_CXX) diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk index e4efb6d04..8dc3c5df9 100644 --- a/mk/spdk.common.mk +++ b/mk/spdk.common.mk @@ -253,11 +253,11 @@ COMPILE_CXX=\ # Link $(OBJS) and $(LIBS) into $@ (app) LINK_C=\ - $(Q)echo " LINK $S/$@"; \ + $(Q)echo " LINK $(notdir $@)"; \ $(CC) -o $@ $(CPPFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) $(ENV_LINKER_ARGS) $(SYS_LIBS) LINK_CXX=\ - $(Q)echo " LINK $S/$@"; \ + $(Q)echo " LINK $(notdir $@)"; \ $(CXX) -o $@ $(CPPFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) $(ENV_LINKER_ARGS) $(SYS_LIBS) # Provide function to ease build of a shared lib @@ -325,9 +325,9 @@ UNINSTALL_SHARED_LIB=\ # Install an app binary INSTALL_APP=\ - $(Q)echo " INSTALL $(DESTDIR)$(bindir)/$(APP)"; \ + $(Q)echo " INSTALL $(DESTDIR)$(bindir)/$(notdir $<)"; \ install -d -m 755 "$(DESTDIR)$(bindir)"; \ - install -m 755 "$(APP)" "$(DESTDIR)$(bindir)/" + install -m 755 "$<" "$(DESTDIR)$(bindir)/" # Uninstall an app binary UNINSTALL_APP=\ diff --git a/scripts/perf/nvmf/run_nvmf.py b/scripts/perf/nvmf/run_nvmf.py index 4ec1207a0..447b33ae9 100755 --- a/scripts/perf/nvmf/run_nvmf.py +++ b/scripts/perf/nvmf/run_nvmf.py @@ -631,7 +631,7 @@ class SPDKTarget(Target): def tgt_start(self): self.subsys_no = get_nvme_devices_count() self.log_print("Starting SPDK NVMeOF Target process") - nvmf_app_path = os.path.join(self.spdk_dir, "app/nvmf_tgt/nvmf_tgt") + nvmf_app_path = os.path.join(self.spdk_dir, "build/bin/nvmf_tgt") command = " ".join([nvmf_app_path, "-m", self.num_cores]) proc = subprocess.Popen(command, shell=True) self.pid = os.path.join(self.spdk_dir, "nvmf.pid") diff --git a/test/bdev/blockdev.sh b/test/bdev/blockdev.sh index ea0ea5e43..42cf95742 100755 --- a/test/bdev/blockdev.sh +++ b/test/bdev/blockdev.sh @@ -21,7 +21,7 @@ function cleanup() { } function start_spdk_tgt() { - "$rootdir/app/spdk_tgt/spdk_tgt" & + "$SPDK_BIN_DIR/spdk_tgt" & spdk_tgt_pid=$! trap 'killprocess "$spdk_tgt_pid"; exit 1' SIGINT SIGTERM EXIT waitforlisten "$spdk_tgt_pid" diff --git a/test/common/applications.sh b/test/common/applications.sh index 837df0a8f..2800600cf 100644 --- a/test/common/applications.sh +++ b/test/common/applications.sh @@ -2,13 +2,13 @@ _root=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")") _root=${_root%/test/common} -_app_dir=$_root/app +_app_dir=$_root/build/bin _test_app_dir=$_root/test/app VHOST_FUZZ_APP=("$_test_app_dir/fuzz/vhost_fuzz/vhost_fuzz") -ISCSI_APP=("$_app_dir/iscsi_tgt/iscsi_tgt") -NVMF_APP=("$_app_dir/nvmf_tgt/nvmf_tgt") -VHOST_APP=("$_app_dir/vhost/vhost") +ISCSI_APP=("$_app_dir/iscsi_tgt") +NVMF_APP=("$_app_dir/nvmf_tgt") +VHOST_APP=("$_app_dir/vhost") # Check if apps should execute under debug flags if [[ -e $_root/include/spdk/config.h ]]; then diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 118f5f846..ea48051da 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -176,6 +176,9 @@ else export DEPENDENCY_DIR fi +# Export location of where all the SPDK binaries are +export SPDK_BIN_DIR="$rootdir/build/bin" + # pass our valgrind desire on to unittest.sh if [ $SPDK_RUN_VALGRIND -eq 0 ]; then export valgrind='' @@ -1172,7 +1175,7 @@ function get_nvme_name_from_bdf() { } function opal_revert_cleanup() { - $rootdir/app/spdk_tgt/spdk_tgt & + $SPDK_BIN_DIR/spdk_tgt & spdk_tgt_pid=$! waitforlisten $spdk_tgt_pid diff --git a/test/dpdk_memory_utility/test_dpdk_mem_info.sh b/test/dpdk_memory_utility/test_dpdk_mem_info.sh index bc16ffc80..e49094635 100755 --- a/test/dpdk_memory_utility/test_dpdk_mem_info.sh +++ b/test/dpdk_memory_utility/test_dpdk_mem_info.sh @@ -5,7 +5,7 @@ rootdir=$(readlink -f $testdir/../..) source $rootdir/test/common/autotest_common.sh rpc_py="$rootdir/scripts/rpc.py" -SPDK_APP="$rootdir/app/spdk_tgt/spdk_tgt" +SPDK_APP="$SPDK_BIN_DIR/spdk_tgt" MEM_SCRIPT="$rootdir/scripts/dpdk_mem_info.py" $SPDK_APP & diff --git a/test/ftl/dirty_shutdown.sh b/test/ftl/dirty_shutdown.sh index e5b6816f7..c0e1f3115 100755 --- a/test/ftl/dirty_shutdown.sh +++ b/test/ftl/dirty_shutdown.sh @@ -37,7 +37,7 @@ pu_count=$((num_group * num_pu)) # Write one band worth of data + one extra chunk data_size=$((chunk_size * (pu_count + 1))) -"$rootdir/app/spdk_tgt/spdk_tgt" --json <(gen_ftl_nvme_conf) & +"$SPDK_BIN_DIR/spdk_tgt" --json <(gen_ftl_nvme_conf) & svcpid=$! waitforlisten $svcpid @@ -70,7 +70,7 @@ $rpc_py nbd_stop_disk /dev/nbd0 kill -9 $svcpid rm -f /dev/shm/spdk_tgt_trace.pid$svcpid -"$rootdir/app/spdk_tgt/spdk_tgt" --json <(gen_ftl_nvme_conf) -L ftl_init & +"$SPDK_BIN_DIR/spdk_tgt" --json <(gen_ftl_nvme_conf) -L ftl_init & svcpid=$! waitforlisten $svcpid diff --git a/test/ftl/fio.sh b/test/ftl/fio.sh index f7b4f5df9..3ad2a085a 100755 --- a/test/ftl/fio.sh +++ b/test/ftl/fio.sh @@ -35,7 +35,7 @@ export FTL_JSON_CONF=$testdir/config/ftl.json trap "fio_kill; exit 1" SIGINT SIGTERM EXIT -"$rootdir/app/spdk_tgt/spdk_tgt" --json <(gen_ftl_nvme_conf) & +"$SPDK_BIN_DIR/spdk_tgt" --json <(gen_ftl_nvme_conf) & svcpid=$! waitforlisten $svcpid diff --git a/test/ftl/ftl.sh b/test/ftl/ftl.sh index bc2576b3a..e0c08bbeb 100755 --- a/test/ftl/ftl.sh +++ b/test/ftl/ftl.sh @@ -62,7 +62,7 @@ run_test "ftl_json" $testdir/json.sh $device if [ $SPDK_TEST_FTL_EXTENDED -eq 1 ]; then run_test "ftl_fio_basic" $testdir/fio.sh $device basic - "$rootdir/app/spdk_tgt/spdk_tgt" --json <(gen_ftl_nvme_conf) & + "$SPDK_BIN_DIR/spdk_tgt" --json <(gen_ftl_nvme_conf) & svcpid=$! trap 'killprocess $svcpid; exit 1' SIGINT SIGTERM EXIT diff --git a/test/ftl/json.sh b/test/ftl/json.sh index 2e13f2715..0052665f8 100755 --- a/test/ftl/json.sh +++ b/test/ftl/json.sh @@ -15,7 +15,7 @@ json_kill() { trap "json_kill; exit 1" SIGINT SIGTERM EXIT -"$rootdir/app/spdk_tgt/spdk_tgt" --json <(gen_ftl_nvme_conf) & +"$SPDK_BIN_DIR/spdk_tgt" --json <(gen_ftl_nvme_conf) & svcpid=$! waitforlisten $svcpid diff --git a/test/ftl/restore.sh b/test/ftl/restore.sh index e066ff90a..7b6b0ef05 100755 --- a/test/ftl/restore.sh +++ b/test/ftl/restore.sh @@ -37,7 +37,7 @@ restore_kill() { trap "restore_kill; exit 1" SIGINT SIGTERM EXIT -"$rootdir/app/spdk_tgt/spdk_tgt" --json <(gen_ftl_nvme_conf) & +"$SPDK_BIN_DIR/spdk_tgt" --json <(gen_ftl_nvme_conf) & svcpid=$! # Wait until spdk_tgt starts waitforlisten $svcpid @@ -74,7 +74,7 @@ md5sum $mount_dir/testfile > $testdir/testfile.md5 umount $mount_dir killprocess $svcpid -"$rootdir/app/spdk_tgt/spdk_tgt" --json <(gen_ftl_nvme_conf) -L ftl_init & +"$SPDK_BIN_DIR/spdk_tgt" --json <(gen_ftl_nvme_conf) -L ftl_init & svcpid=$! # Wait until spdk_tgt starts waitforlisten $svcpid diff --git a/test/iscsi_tgt/perf/iscsi_target.sh b/test/iscsi_tgt/perf/iscsi_target.sh index 3f90550ce..ec02f9e0c 100755 --- a/test/iscsi_tgt/perf/iscsi_target.sh +++ b/test/iscsi_tgt/perf/iscsi_target.sh @@ -95,7 +95,7 @@ mkdir -p $testdir/perf_output touch $iscsi_fio_results timing_enter run_iscsi_app -$rootdir/app/iscsi_tgt/iscsi_tgt -m $ISCSI_TGT_CM -r $testdir/rpc_iscsi.sock --wait-for-rpc & +$SPDK_BIN_DIR/iscsi_tgt -m $ISCSI_TGT_CM -r $testdir/rpc_iscsi.sock --wait-for-rpc & pid=$! trap 'rm -f $testdir/perf.job; killprocess $pid; print_backtrace; exit 1' ERR SIGTERM SIGABRT waitforlisten "$pid" "$testdir/rpc_iscsi.sock" diff --git a/test/iscsi_tgt/trace_record/trace_record.sh b/test/iscsi_tgt/trace_record/trace_record.sh index d98d58687..baa7f39d4 100755 --- a/test/iscsi_tgt/trace_record/trace_record.sh +++ b/test/iscsi_tgt/trace_record/trace_record.sh @@ -51,7 +51,7 @@ echo "iscsi_tgt is listening. Running tests..." timing_exit start_iscsi_tgt mkdir -p ${TRACE_TMP_FOLDER} -./app/trace_record/spdk_trace_record -s iscsi -p ${iscsi_pid} -f ${TRACE_RECORD_OUTPUT} -q 1> ${TRACE_RECORD_NOTICE_LOG} & +./build/bin/spdk_trace_record -s iscsi -p ${iscsi_pid} -f ${TRACE_RECORD_OUTPUT} -q 1> ${TRACE_RECORD_NOTICE_LOG} & record_pid=$! echo "Trace record pid: $record_pid" @@ -92,7 +92,7 @@ trap 'delete_tmp_files; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT killprocess $iscsi_pid killprocess $record_pid -./app/trace/spdk_trace -f ${TRACE_RECORD_OUTPUT} > ${TRACE_TOOL_LOG} +./build/bin/spdk_trace -f ${TRACE_RECORD_OUTPUT} > ${TRACE_TOOL_LOG} #verify trace record and trace tool #trace entries str in trace-record, like "Trace Size of lcore (0): 4136" diff --git a/test/json_config/alias_rpc/alias_rpc.sh b/test/json_config/alias_rpc/alias_rpc.sh index 5af7f39ca..25e07fae4 100755 --- a/test/json_config/alias_rpc/alias_rpc.sh +++ b/test/json_config/alias_rpc/alias_rpc.sh @@ -6,7 +6,7 @@ source $rootdir/test/common/autotest_common.sh trap 'killprocess $spdk_tgt_pid; exit 1' ERR -$rootdir/app/spdk_tgt/spdk_tgt & +$SPDK_BIN_DIR/spdk_tgt & spdk_tgt_pid=$! waitforlisten $spdk_tgt_pid diff --git a/test/json_config/json_config.sh b/test/json_config/json_config.sh index a3b3ce07f..03d6bd5bd 100755 --- a/test/json_config/json_config.sh +++ b/test/json_config/json_config.sh @@ -110,7 +110,7 @@ function json_config_test_start_app() { app_extra_params='-S /var/tmp' fi - $rootdir/app/spdk_tgt/spdk_tgt ${app_params[$app]} ${app_extra_params} -r ${app_socket[$app]} "$@" & + $SPDK_BIN_DIR/spdk_tgt ${app_params[$app]} ${app_extra_params} -r ${app_socket[$app]} "$@" & app_pid[$app]=$! echo "Waiting for $app to run..." diff --git a/test/lvol/basic.sh b/test/lvol/basic.sh index f8de5c2dc..2e25855f9 100755 --- a/test/lvol/basic.sh +++ b/test/lvol/basic.sh @@ -540,7 +540,7 @@ function test_sigterm() { killprocess $spdk_pid } -$rootdir/app/spdk_tgt/spdk_tgt & +$SPDK_BIN_DIR/spdk_tgt & spdk_pid=$! trap 'killprocess "$spdk_pid"; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_pid diff --git a/test/lvol/hotremove.sh b/test/lvol/hotremove.sh index b451edaf2..8306b301c 100755 --- a/test/lvol/hotremove.sh +++ b/test/lvol/hotremove.sh @@ -200,7 +200,7 @@ function test_unregister_lvol_bdev() { check_leftover_devices } -$rootdir/app/spdk_tgt/spdk_tgt & +$SPDK_BIN_DIR/spdk_tgt & spdk_pid=$! trap 'killprocess "$spdk_pid"; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_pid diff --git a/test/lvol/rename.sh b/test/lvol/rename.sh index 84b1fba92..607073c51 100755 --- a/test/lvol/rename.sh +++ b/test/lvol/rename.sh @@ -206,7 +206,7 @@ function test_lvol_rename_negative() { check_leftover_devices } -$rootdir/app/spdk_tgt/spdk_tgt & +$SPDK_BIN_DIR/spdk_tgt & spdk_pid=$! trap 'killprocess "$spdk_pid"; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_pid diff --git a/test/lvol/resize.sh b/test/lvol/resize.sh index f65d26268..be0410275 100755 --- a/test/lvol/resize.sh +++ b/test/lvol/resize.sh @@ -205,7 +205,7 @@ function test_destroy_after_bdev_lvol_resize_positive() { } modprobe nbd -$rootdir/app/spdk_tgt/spdk_tgt & +$SPDK_BIN_DIR/spdk_tgt & spdk_pid=$! trap 'killprocess "$spdk_pid"; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_pid diff --git a/test/lvol/snapshot_clone.sh b/test/lvol/snapshot_clone.sh index e13af71ed..49a98ca93 100755 --- a/test/lvol/snapshot_clone.sh +++ b/test/lvol/snapshot_clone.sh @@ -596,7 +596,7 @@ function test_bdev_lvol_delete_ordering() { check_leftover_devices } -$rootdir/app/spdk_tgt/spdk_tgt & +$SPDK_BIN_DIR/spdk_tgt & spdk_pid=$! trap 'killprocess "$spdk_pid"; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_pid diff --git a/test/lvol/tasting.sh b/test/lvol/tasting.sh index 606a6c49d..dbb75d241 100755 --- a/test/lvol/tasting.sh +++ b/test/lvol/tasting.sh @@ -65,7 +65,7 @@ function test_tasting() { # Restart spdk app killprocess $spdk_pid - $rootdir/app/spdk_tgt/spdk_tgt & + $SPDK_BIN_DIR/spdk_tgt & spdk_pid=$! waitforlisten $spdk_pid @@ -157,7 +157,7 @@ function test_delete_lvol_store_persistent_positive() { check_leftover_devices } -$rootdir/app/spdk_tgt/spdk_tgt & +$SPDK_BIN_DIR/spdk_tgt & spdk_pid=$! trap 'killprocess "$spdk_pid"; rm -f $testdir/aio_bdev_0 $testdir/aio_bdev_1; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_pid diff --git a/test/lvol/thin_provisioning.sh b/test/lvol/thin_provisioning.sh index 3e99e5e15..cb7bfcb01 100755 --- a/test/lvol/thin_provisioning.sh +++ b/test/lvol/thin_provisioning.sh @@ -221,7 +221,7 @@ function test_thin_overprovisioning() { rpc_cmd bdev_malloc_delete "$malloc_name" } -$rootdir/app/spdk_tgt/spdk_tgt & +$SPDK_BIN_DIR/spdk_tgt & spdk_pid=$! trap 'killprocess "$spdk_pid"; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_pid diff --git a/test/nvme/cuse/nvme_cuse.sh b/test/nvme/cuse/nvme_cuse.sh index 19bc59ce2..2497a3667 100755 --- a/test/nvme/cuse/nvme_cuse.sh +++ b/test/nvme/cuse/nvme_cuse.sh @@ -12,7 +12,7 @@ ctrlr_base="/dev/spdk/nvme" $rootdir/scripts/setup.sh -$rootdir/app/spdk_tgt/spdk_tgt -m 0x3 & +$SPDK_BIN_DIR/spdk_tgt -m 0x3 & spdk_tgt_pid=$! trap 'kill -9 ${spdk_tgt_pid}; exit 1' SIGINT SIGTERM EXIT diff --git a/test/nvme/nvme_ns_manage_cuse.sh b/test/nvme/nvme_ns_manage_cuse.sh index 0bde58715..5974ab80c 100755 --- a/test/nvme/nvme_ns_manage_cuse.sh +++ b/test/nvme/nvme_ns_manage_cuse.sh @@ -83,7 +83,7 @@ sleep 1 PCI_WHITELIST="${bdf}" $rootdir/scripts/setup.sh -$rootdir/app/spdk_tgt/spdk_tgt -m 0x3 & +$SPDK_BIN_DIR/spdk_tgt -m 0x3 & spdk_tgt_pid=$! trap 'kill -9 ${spdk_tgt_pid}; clean_up; exit 1' SIGINT SIGTERM EXIT diff --git a/test/nvme/nvme_opal.sh b/test/nvme/nvme_opal.sh index 71bf8f845..66407ced7 100755 --- a/test/nvme/nvme_opal.sh +++ b/test/nvme/nvme_opal.sh @@ -74,7 +74,7 @@ function revert() { } function opal_spdk_tgt() { - $rootdir/app/spdk_tgt/spdk_tgt & + $SPDK_BIN_DIR/spdk_tgt & spdk_tgt_pid=$! trap 'revert; killprocess $spdk_tgt_pid; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_tgt_pid diff --git a/test/nvme/nvme_rpc.sh b/test/nvme/nvme_rpc.sh index 57f6da6f7..da7cf50d3 100755 --- a/test/nvme/nvme_rpc.sh +++ b/test/nvme/nvme_rpc.sh @@ -9,7 +9,7 @@ rpc_py=$rootdir/scripts/rpc.py bdf=$(get_first_nvme_bdf) -$rootdir/app/spdk_tgt/spdk_tgt -m 0x3 & +$SPDK_BIN_DIR/spdk_tgt -m 0x3 & spdk_tgt_pid=$! trap 'kill -9 ${spdk_tgt_pid}; exit 1' SIGINT SIGTERM EXIT diff --git a/test/nvme/spdk_nvme_cli_cuse.sh b/test/nvme/spdk_nvme_cli_cuse.sh index e90b4537e..8c209e8f8 100755 --- a/test/nvme/spdk_nvme_cli_cuse.sh +++ b/test/nvme/spdk_nvme_cli_cuse.sh @@ -52,7 +52,7 @@ set -e $rootdir/scripts/setup.sh -$rootdir/app/spdk_tgt/spdk_tgt -m 0x3 & +$SPDK_BIN_DIR/spdk_tgt -m 0x3 & spdk_tgt_pid=$! trap 'kill -9 ${spdk_tgt_pid}; exit 1' SIGINT SIGTERM EXIT diff --git a/test/nvme/spdk_smartctl_cuse.sh b/test/nvme/spdk_smartctl_cuse.sh index 1cdd3dd30..4af14a255 100755 --- a/test/nvme/spdk_smartctl_cuse.sh +++ b/test/nvme/spdk_smartctl_cuse.sh @@ -28,7 +28,7 @@ KERNEL_SMART_ERRLOG=$(${SMARTCTL_CMD} -l error /dev/${nvme_name}) $rootdir/scripts/setup.sh -$rootdir/app/spdk_tgt/spdk_tgt -m 0x3 & +$SPDK_BIN_DIR/spdk_tgt -m 0x3 & spdk_tgt_pid=$! trap 'kill -9 ${spdk_tgt_pid}; exit 1' SIGINT SIGTERM EXIT diff --git a/test/ocf/management/create-destruct.sh b/test/ocf/management/create-destruct.sh index 99d3f7483..162f7a679 100755 --- a/test/ocf/management/create-destruct.sh +++ b/test/ocf/management/create-destruct.sh @@ -14,7 +14,7 @@ function bdev_check_claimed() { fi } -$rootdir/app/iscsi_tgt/iscsi_tgt & +$SPDK_BIN_DIR/iscsi_tgt & spdk_pid=$! trap 'killprocess $spdk_pid; exit 1' SIGINT SIGTERM EXIT diff --git a/test/ocf/management/multicore.sh b/test/ocf/management/multicore.sh index f01f4c2f5..8c4f89e1b 100755 --- a/test/ocf/management/multicore.sh +++ b/test/ocf/management/multicore.sh @@ -8,7 +8,7 @@ rpc_py=$rootdir/scripts/rpc.py spdk_pid='?' function start_spdk() { - $rootdir/app/iscsi_tgt/iscsi_tgt & + $SPDK_BIN_DIR/iscsi_tgt & spdk_pid=$! trap 'killprocess $spdk_pid; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_pid diff --git a/test/ocf/management/persistent-metadata.sh b/test/ocf/management/persistent-metadata.sh index 48e9e5ba0..cbfcab341 100755 --- a/test/ocf/management/persistent-metadata.sh +++ b/test/ocf/management/persistent-metadata.sh @@ -45,7 +45,7 @@ CONFIG # Clear nvme device which we will use in test clear_nvme -"$rootdir/app/iscsi_tgt/iscsi_tgt" --json "$curdir/config" & +"$SPDK_BIN_DIR/iscsi_tgt" --json "$curdir/config" & spdk_pid=$! waitforlisten $spdk_pid @@ -66,7 +66,7 @@ trap - SIGINT SIGTERM EXIT killprocess $spdk_pid # Check for ocf persistency after restart -"$rootdir/app/iscsi_tgt/iscsi_tgt" --json "$curdir/config" & +"$SPDK_BIN_DIR/iscsi_tgt" --json "$curdir/config" & spdk_pid=$! trap 'killprocess $spdk_pid; rm -f $curdir/config ocf_bdevs ocf_bdevs_verify; exit 1' SIGINT SIGTERM EXIT diff --git a/test/ocf/management/remove.sh b/test/ocf/management/remove.sh index 0d2d6ba82..1302f16cd 100755 --- a/test/ocf/management/remove.sh +++ b/test/ocf/management/remove.sh @@ -38,7 +38,7 @@ jq . <<- JSON > "$curdir/config" } JSON -"$rootdir/app/iscsi_tgt/iscsi_tgt" --json "$curdir/config" & +"$SPDK_BIN_DIR/iscsi_tgt" --json "$curdir/config" & spdk_pid=$! waitforlisten $spdk_pid @@ -64,7 +64,7 @@ trap - SIGINT SIGTERM EXIT killprocess $spdk_pid # Check for ocfWT was deleted permanently -"$rootdir/app/iscsi_tgt/iscsi_tgt" --json "$curdir/config" & +"$SPDK_BIN_DIR/iscsi_tgt" --json "$curdir/config" & spdk_pid=$! trap 'killprocess $spdk_pid; rm -f aio* $curdir/config ocf_bdevs ocf_bdevs_verify; exit 1' SIGINT SIGTERM EXIT diff --git a/test/pmem/common.sh b/test/pmem/common.sh index 73edd2c4b..844930df2 100644 --- a/test/pmem/common.sh +++ b/test/pmem/common.sh @@ -63,7 +63,7 @@ function pmem_print_tc_name() { function vhost_start() { local vhost_pid - $rootdir/app/vhost/vhost & + $SPDK_BIN_DIR/vhost & vhost_pid=$! echo $vhost_pid > $testdir/vhost.pid diff --git a/test/rpc/rpc.sh b/test/rpc/rpc.sh index 348247a54..56da28cf5 100755 --- a/test/rpc/rpc.sh +++ b/test/rpc/rpc.sh @@ -37,7 +37,7 @@ function rpc_plugins() { } } -$rootdir/app/spdk_tgt/spdk_tgt & +$SPDK_BIN_DIR/spdk_tgt & spdk_pid=$! trap 'killprocess $spdk_pid; exit 1' SIGINT SIGTERM EXIT waitforlisten $spdk_pid diff --git a/test/spdkcli/common.sh b/test/spdkcli/common.sh index 0acef032e..fec6d0497 100644 --- a/test/spdkcli/common.sh +++ b/test/spdkcli/common.sh @@ -21,19 +21,19 @@ function on_error_exit() { } function run_spdk_tgt() { - $rootdir/app/spdk_tgt/spdk_tgt -m 0x3 -p 0 -s 4096 & + $SPDK_BIN_DIR/spdk_tgt -m 0x3 -p 0 -s 4096 & spdk_tgt_pid=$! waitforlisten $spdk_tgt_pid } function run_nvmf_tgt() { - $rootdir/app/nvmf_tgt/nvmf_tgt -m 0x3 -p 0 -s 4096 & + $SPDK_BIN_DIR/nvmf_tgt -m 0x3 -p 0 -s 4096 & nvmf_tgt_pid=$! waitforlisten $nvmf_tgt_pid } function run_vhost_tgt() { - $rootdir/app/vhost/vhost -m 0x3 -p 0 -s 4096 & + $SPDK_BIN_DIR/vhost -m 0x3 -p 0 -s 4096 & vhost_tgt_pid=$! waitforlisten $vhost_tgt_pid } diff --git a/test/spdkcli/iscsi.sh b/test/spdkcli/iscsi.sh index c2444e97b..ff892ab36 100755 --- a/test/spdkcli/iscsi.sh +++ b/test/spdkcli/iscsi.sh @@ -14,7 +14,7 @@ trap 'on_error_exit;' ERR timing_enter run_iscsi_tgt # Running iscsi target with --wait-for-rpc. Implies framework_start_init later -$rootdir/app/iscsi_tgt/iscsi_tgt -m 0x3 -p 0 -s 4096 --wait-for-rpc & +$SPDK_BIN_DIR/iscsi_tgt -m 0x3 -p 0 -s 4096 --wait-for-rpc & iscsi_tgt_pid=$! waitforlisten $iscsi_tgt_pid $rootdir/scripts/rpc.py framework_start_init diff --git a/test/spdkcli/tcp.sh b/test/spdkcli/tcp.sh index 13c0fbff9..d0d4dafba 100755 --- a/test/spdkcli/tcp.sh +++ b/test/spdkcli/tcp.sh @@ -18,7 +18,7 @@ PORT="9998" trap 'err_cleanup; exit 1' SIGINT SIGTERM EXIT timing_enter run_spdk_tgt_tcp -$rootdir/app/spdk_tgt/spdk_tgt -m 0x3 -p 0 -s 2048 & +$SPDK_BIN_DIR/spdk_tgt -m 0x3 -p 0 -s 2048 & spdk_tgt_pid=$! waitforlisten $spdk_tgt_pid diff --git a/test/spdkcli/virtio.sh b/test/spdkcli/virtio.sh index a707d9dce..b483e0562 100755 --- a/test/spdkcli/virtio.sh +++ b/test/spdkcli/virtio.sh @@ -12,7 +12,7 @@ run_spdk_tgt timing_exit run_spdk_tgt timing_enter run_spdk_virtio -$rootdir/app/spdk_tgt/spdk_tgt -m 0x4 -p 0 -g -u -s 1024 -r /var/tmp/virtio.sock & +$SPDK_BIN_DIR/spdk_tgt -m 0x4 -p 0 -g -u -s 1024 -r /var/tmp/virtio.sock & virtio_pid=$! waitforlisten $virtio_pid /var/tmp/virtio.sock timing_exit run_spdk_virtio diff --git a/test/vhost/common.sh b/test/vhost/common.sh index 4641f84c2..fce3a37b6 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -120,7 +120,7 @@ function vhost_run() { local vhost_dir vhost_dir="$(get_vhost_dir $vhost_name)" - local vhost_app="$rootdir/app/vhost/vhost" + local vhost_app="$SPDK_BIN_DIR/vhost" local vhost_log_file="$vhost_dir/vhost.log" local vhost_pid_file="$vhost_dir/vhost.pid" local vhost_socket="$vhost_dir/usvhost" diff --git a/test/vhost/initiator/blockdev.sh b/test/vhost/initiator/blockdev.sh index 0c25bb0e0..9667f1f3d 100755 --- a/test/vhost/initiator/blockdev.sh +++ b/test/vhost/initiator/blockdev.sh @@ -19,7 +19,7 @@ function err_cleanup() { # start vhost and configure it trap 'err_cleanup; exit 1' SIGINT SIGTERM EXIT -$rootdir/app/vhost/vhost & +$SPDK_BIN_DIR/vhost & vhost_pid=$! waitforlisten $vhost_pid @@ -48,7 +48,7 @@ rpc_cmd vhost_create_scsi_controller naa.Malloc1.0 rpc_cmd vhost_scsi_controller_add_target naa.Malloc1.0 0 Malloc1 # start a dummy app, create vhost bdevs in it, then dump the config for FIO -$rootdir/app/spdk_tgt/spdk_tgt -r /tmp/spdk2.sock -g & +$SPDK_BIN_DIR/spdk_tgt -r /tmp/spdk2.sock -g & dummy_spdk_pid=$! waitforlisten $dummy_spdk_pid /tmp/spdk2.sock rpc_cmd -s /tmp/spdk2.sock bdev_virtio_attach_controller --trtype user --traddr 'naa.Nvme0n1_scsi0.0' -d scsi --vq-count 8 'VirtioScsi0' diff --git a/test/vhost/migration/migration-tc2.sh b/test/vhost/migration/migration-tc2.sh index 397b0c629..aa234d842 100644 --- a/test/vhost/migration/migration-tc2.sh +++ b/test/vhost/migration/migration-tc2.sh @@ -90,7 +90,7 @@ function migration_tc2_configure_vhost() { notice "Running nvmf_tgt..." mkdir -p $nvmf_dir rm -f $nvmf_dir/* - $rootdir/app/nvmf_tgt/nvmf_tgt -s 512 -m 0x4 -r $nvmf_dir/rpc.sock --wait-for-rpc & + $SPDK_BIN_DIR/nvmf_tgt -s 512 -m 0x4 -r $nvmf_dir/rpc.sock --wait-for-rpc & local nvmf_tgt_pid=$! echo $nvmf_tgt_pid > $nvmf_dir/nvmf_tgt.pid waitforlisten "$nvmf_tgt_pid" "$nvmf_dir/rpc.sock" diff --git a/test/vhost/migration/migration-tc3a.sh b/test/vhost/migration/migration-tc3a.sh index a1bf0315c..b8f06a8d0 100644 --- a/test/vhost/migration/migration-tc3a.sh +++ b/test/vhost/migration/migration-tc3a.sh @@ -99,7 +99,7 @@ function host1_start_nvmf() { rm -rf "${nvmf_dir:?}/"* trap 'host1_cleanup_nvmf SIGKILL; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT - $rootdir/app/nvmf_tgt/nvmf_tgt -s 512 -m 0xF -r $nvmf_dir/nvmf_rpc.sock --wait-for-rpc & + $SPDK_BIN_DIR/nvmf_tgt -s 512 -m 0xF -r $nvmf_dir/nvmf_rpc.sock --wait-for-rpc & nvmf_tgt_pid=$! echo $nvmf_tgt_pid > $nvmf_dir/nvmf_tgt.pid waitforlisten "$nvmf_tgt_pid" "$nvmf_dir/nvmf_rpc.sock" diff --git a/test/vmd/vmd.sh b/test/vmd/vmd.sh index f108a1f31..fd3c7642c 100755 --- a/test/vmd/vmd.sh +++ b/test/vmd/vmd.sh @@ -58,7 +58,7 @@ for bdf in $(iter_pci_dev_id 8086 $vmd_id); do done PCI_WHITELIST="${VMD_WHITELIST[*]}" $rootdir/scripts/setup.sh -pci_devs=$($rootdir/app/spdk_lspci/spdk_lspci | grep "NVMe disk behind VMD" | awk '{print $1}') +pci_devs=$($SPDK_BIN_DIR/spdk_lspci | grep "NVMe disk behind VMD" | awk '{print $1}') if [[ -z "$pci_devs" ]]; then echo "Couldn't find any NVMe device behind a VMD."