From a8104d66d96521937787e111002597181e4339c4 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Thu, 28 Jan 2021 03:51:35 -0500 Subject: [PATCH] test/check_so_deps: move checking Makefile and .so to run_test Moved the test to a separate function so it runs under run_test. This will make sure the logs print out "START TEST" and additionally that time taken will be tracked separately. It might have been misleading to include results of this test right after confirm_abi_deps. This could lead to belive that it was output of confirm_abi_deps. See snippet: ************************************ START TEST confirm_abi_deps ************************************ * Running confirm_abi_deps against spdk_abi_latest Processed 60 objects. real 0m3.970s user 0m3.220s sys 0m0.600s ************************************ END TEST confirm_abi_deps ************************************ --------------------------------------------------------------------- there was a dependency mismatch in the library nvme The makefile lists: 'log sock util rdma vfio_user' readelf outputs : 'log rdma sock util' --------------------------------------------------------------------- shared object test failed Signed-off-by: Tomasz Zawadzki Change-Id: Ie0768b8a9c7390f51d35b2e879f66854a4da2226 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6143 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: --- test/make/check_so_deps.sh | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/test/make/check_so_deps.sh b/test/make/check_so_deps.sh index 122c1e078..9d4d58d3d 100755 --- a/test/make/check_so_deps.sh +++ b/test/make/check_so_deps.sh @@ -237,6 +237,26 @@ function confirm_deps() { fi } +function confirm_makefile_deps() { + echo "---------------------------------------------------------------------" + # Exclude libspdk_env_dpdk.so from the library list. We don't link against this one so that + # users can define their own environment abstraction. However we do want to still check it + # for dependencies to avoid printing out a bunch of confusing symbols under the missing + # symbols section. + SPDK_LIBS=("$libdir/"libspdk_!(env_dpdk).so) + + declare -A IGNORED_LIBS=() + if grep -q 'CONFIG_RDMA?=n' $rootdir/mk/config.mk; then + IGNORED_LIBS["rdma"]=1 + fi + + ( + import_libs_deps_mk + for lib in "${SPDK_LIBS[@]}"; do confirm_deps "$lib" & done + wait + ) +} + source ~/autorun-spdk.conf config_params=$(get_config_params) if [ "$SPDK_TEST_OCF" -eq 1 ]; then @@ -257,23 +277,7 @@ rm -f $fail_file run_test "confirm_abi_deps" confirm_abi_deps -echo "---------------------------------------------------------------------" -# Exclude libspdk_env_dpdk.so from the library list. We don't link against this one so that -# users can define their own environment abstraction. However we do want to still check it -# for dependencies to avoid printing out a bunch of confusing symbols under the missing -# symbols section. -SPDK_LIBS=("$libdir/"libspdk_!(env_dpdk).so) - -declare -A IGNORED_LIBS=() -if grep -q 'CONFIG_RDMA?=n' $rootdir/mk/config.mk; then - IGNORED_LIBS["rdma"]=1 -fi - -( - import_libs_deps_mk - for lib in "${SPDK_LIBS[@]}"; do confirm_deps "$lib" & done - wait -) +run_test "confirm_makefile_deps" confirm_makefile_deps $MAKE $MAKEFLAGS clean