diff --git a/test/dd/common.sh b/test/dd/common.sh index 225578602..d2f7defa3 100644 --- a/test/dd/common.sh +++ b/test/dd/common.sh @@ -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 +} diff --git a/test/dd/dd.sh b/test/dd/dd.sh index 2a5aee6c7..e2b8bb86a 100755 --- a/test/dd/dd.sh +++ b/test/dd/dd.sh @@ -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[@]}"