test: Enable xnvme in autotest builds
Signed-off-by: Michal Berger <michal.berger@intel.com> Change-Id: I32594d94eb397dfe1fcec867fd0caf67a07b208c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14118 Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
08422b5843
commit
c8f62d792a
@ -24,6 +24,10 @@ if [ -n "$SPDK_TEST_NATIVE_DPDK" ]; then
|
||||
else
|
||||
scanbuild_exclude="--exclude $rootdir/dpdk/"
|
||||
fi
|
||||
# We exclude /tmp as it's used by xnvme's liburing subproject for storing
|
||||
# temporary .c files which are picked up as buggy by the scanbuild.
|
||||
scanbuild_exclude+=" --exclude $rootdir/xnvme --exclude /tmp"
|
||||
|
||||
scanbuild="scan-build -o $output_dir/scan-build-tmp $scanbuild_exclude --status-bugs"
|
||||
config_params=$(get_config_params)
|
||||
|
||||
|
@ -135,6 +135,7 @@ DEPDIRS-bdev_rbd := $(BDEV_DEPS_THREAD)
|
||||
DEPDIRS-bdev_uring := $(BDEV_DEPS_THREAD)
|
||||
DEPDIRS-bdev_virtio := $(BDEV_DEPS_THREAD) virtio
|
||||
DEPDIRS-bdev_zone_block := $(BDEV_DEPS_THREAD)
|
||||
DEPDIRS-bdev_xnvme := $(BDEV_DEPS_THREAD)
|
||||
|
||||
# module/event
|
||||
|
||||
|
30
scripts/ar-xnvme-fixer
Executable file
30
scripts/ar-xnvme-fixer
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# The xnvme build executes library_bundler.py which wraps itself around ar
|
||||
# to create libxnvme.a. It builds a set of MRI commands which then is
|
||||
# passed to ar via stdin. The set of members is declared via ADDLIB
|
||||
# followed by an absolute path to the file. On the physical nodes this
|
||||
# path may look as the following:
|
||||
#
|
||||
# /workspace/foo-job@tmp/...
|
||||
#
|
||||
# The '@' has a special meaning for ar when spotted on the cmdline.
|
||||
# It ends up splitting the path into /workspace/foo-job treating it
|
||||
# as a member path which doesn't exist. This causes the entire build
|
||||
# to fail. To workaround this, we inject ourselves via AR_TOOL and
|
||||
# modify the MRI commands such that the absolute paths to members are
|
||||
# replaced with relative ones (relative to xnvme/builddir from where
|
||||
# the library_bundler.py is executed).
|
||||
|
||||
curdir=$(readlink -f "$(dirname "$0")")
|
||||
rootdir=$(readlink -f "$curdir/../")
|
||||
|
||||
[[ ! -t 0 ]] || exit 1
|
||||
|
||||
while read -r cmd arg; do
|
||||
if [[ $cmd == ADDLIB && $arg == /* ]]; then
|
||||
arg=${arg/"$rootdir/xnvme/"/"../"}
|
||||
fi
|
||||
mri+=("$cmd${arg:+ $arg}")
|
||||
done
|
||||
|
||||
ar "$@" < <(printf '%s\n' "${mri[@]}")
|
@ -165,6 +165,8 @@ export SPDK_TEST_NVMF_NICS
|
||||
export SPDK_TEST_SMA
|
||||
: ${SPDK_TEST_DAOS=0}
|
||||
export SPDK_TEST_DAOS
|
||||
: ${SPDK_TEST_XNVME:=0}
|
||||
export SPDK_TEST_XNVME
|
||||
|
||||
# always test with SPDK shared objects.
|
||||
export SPDK_LIB_DIR="$rootdir/build/lib"
|
||||
@ -211,6 +213,9 @@ leak:libtcmalloc_minimal.so
|
||||
|
||||
# Suppress leaks in libiscsi
|
||||
leak:libiscsi.so
|
||||
|
||||
# Supress leaks in xnvme
|
||||
leak:xnvme_dev_alloc
|
||||
EOL
|
||||
|
||||
# Suppress leaks in libfuse3
|
||||
@ -234,6 +239,8 @@ export SPDK_EXAMPLE_DIR="$rootdir/build/examples"
|
||||
export QEMU_BIN=${QEMU_BIN:-}
|
||||
export VFIO_QEMU_BIN=${VFIO_QEMU_BIN:-}
|
||||
|
||||
export AR_TOOL=$rootdir/scripts/ar-xnvme-fixer
|
||||
|
||||
# pass our valgrind desire on to unittest.sh
|
||||
if [ $SPDK_RUN_VALGRIND -eq 0 ]; then
|
||||
export valgrind=''
|
||||
@ -494,6 +501,11 @@ function get_config_params() {
|
||||
config_params+=' --with-daos'
|
||||
fi
|
||||
|
||||
# Make the xnvme module available for the tests
|
||||
if [[ $SPDK_TEST_XNVME -eq 1 ]]; then
|
||||
config_params+=' --with-xnvme'
|
||||
fi
|
||||
|
||||
echo "$config_params"
|
||||
xtrace_restore
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user