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 <benjamin.walker@intel.com>
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 <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Ben Walker 2020-05-11 14:15:03 -07:00 committed by Tomasz Zawadzki
parent 918177d6fd
commit 6b9b448e53
55 changed files with 113 additions and 88 deletions

1
.gitignore vendored
View File

@ -13,6 +13,7 @@
*.so.*
*.swp
*.DS_Store
build/
ut_coverage/
tags
cscope.out

View File

@ -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; \

View File

@ -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
~~~
<a id="huge"></a>

View File

@ -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"

View File

@ -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":

View File

@ -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}

View File

@ -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}

View File

@ -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

View File

@ -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)

View File

@ -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
```

View File

@ -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)

View File

@ -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)

View File

@ -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=\

View File

@ -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")

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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 &

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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..."

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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'

View File

@ -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"

View File

@ -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"

View File

@ -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."