test/dd: Add function checking if spdk_dd links to liburing
Change-Id: I0b475682152c506f72b8a284285ec0292e3658cc Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3328 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
f6a0f36c2e
commit
ef5e01fa48
@ -127,3 +127,28 @@ get_native_nvme_bs() {
|
||||
|
||||
echo "$lbaf"
|
||||
}
|
||||
|
||||
check_liburing() {
|
||||
# Simply check if spdk_dd links to liburing. If yes, log that information.
|
||||
local lib so
|
||||
local -g liburing_in_use=0
|
||||
|
||||
while read -r lib _ so _; do
|
||||
if [[ $lib == liburing.so.* ]]; then
|
||||
printf '* spdk_dd linked to liburing\n'
|
||||
# For sanity, check build config to see if liburing was requested.
|
||||
if [[ -e $rootdir/test/common/build_config.sh ]]; then
|
||||
source "$rootdir/test/common/build_config.sh"
|
||||
fi
|
||||
if [[ $CONFIG_URING != y ]]; then
|
||||
printf '* spdk_dd built with liburing, but no liburing support requested?\n'
|
||||
fi
|
||||
if [[ ! -e $so ]]; then
|
||||
printf '* %s is missing, aborting\n' "$lib"
|
||||
return 1
|
||||
fi
|
||||
export liburing_in_use=1
|
||||
return 0
|
||||
fi
|
||||
done < <(LD_TRACE_LOADED_OBJECTS=1 "${DD_APP[@]}") >&2
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ source "$testdir/common.sh"
|
||||
"$rootdir/scripts/setup.sh"
|
||||
nvmes=($(nvme_in_userspace))
|
||||
|
||||
check_liburing
|
||||
|
||||
run_test "spdk_dd_basic_rw" "$testdir/basic_rw.sh" "${nvmes[@]}"
|
||||
run_test "spdk_dd_posix" "$testdir/posix.sh"
|
||||
run_test "spdk_dd_bdev_to_bdev" "$testdir/bdev_to_bdev.sh" "${nvmes[@]}"
|
||||
|
Loading…
Reference in New Issue
Block a user