test/common: Add env switch for testing against igb_uio driver
This is mainly needed by the vg jobs which use distros with broken uio driver. Currently, this is not the case, however, there is a plan to add centos8 to the CI pool which suffers from this very issue. Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: I17724cf9c14809c3dca5a0817433f1fe27449117 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4342 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
0cfefac204
commit
785d6ca209
@ -128,6 +128,8 @@ export SPDK_AUTOTEST_X
|
||||
export SPDK_TEST_RAID5
|
||||
: ${SPDK_TEST_URING=0}
|
||||
export SPDK_TEST_URING
|
||||
: ${SPDK_TEST_USE_IGB_UIO:=0}
|
||||
export SPDK_TEST_USE_IGB_UIO
|
||||
|
||||
export DPDK_LIB_DIR="${SPDK_RUN_EXTERNAL_DPDK:-$rootdir/dpdk/build}/lib"
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR
|
||||
@ -198,6 +200,11 @@ if [ "$(uname -s)" = "Linux" ]; then
|
||||
MAKEFLAGS=${MAKEFLAGS:--j$(nproc)}
|
||||
# Override the default HUGEMEM in scripts/setup.sh to allocate 8GB in hugepages.
|
||||
export HUGEMEM=8192
|
||||
if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then
|
||||
export DRIVER_OVERRIDE=$rootdir/dpdk/build-tmp/kernel/linux/igb_uio/igb_uio.ko
|
||||
# Building kernel modules requires root privileges
|
||||
MAKE="sudo $MAKE"
|
||||
fi
|
||||
elif [ "$(uname -s)" = "FreeBSD" ]; then
|
||||
MAKE="gmake"
|
||||
MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | grep -E -i 'hw.ncpu' | awk '{print $2}')}
|
||||
@ -419,6 +426,9 @@ function get_config_params() {
|
||||
config_params+=" --with-dpdk=$SPDK_RUN_EXTERNAL_DPDK"
|
||||
fi
|
||||
|
||||
if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then
|
||||
config_params+=" --with-igb-uio-driver"
|
||||
fi
|
||||
echo "$config_params"
|
||||
xtrace_restore
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user