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 <tomasz.zawadzki@intel.com>
Change-Id: Ie0768b8a9c7390f51d35b2e879f66854a4da2226
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6143
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
This commit is contained in:
Tomasz Zawadzki 2021-01-28 03:51:35 -05:00
parent 306ad7ff17
commit a8104d66d9

View File

@ -237,6 +237,26 @@ function confirm_deps() {
fi 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 source ~/autorun-spdk.conf
config_params=$(get_config_params) config_params=$(get_config_params)
if [ "$SPDK_TEST_OCF" -eq 1 ]; then if [ "$SPDK_TEST_OCF" -eq 1 ]; then
@ -257,23 +277,7 @@ rm -f $fail_file
run_test "confirm_abi_deps" confirm_abi_deps run_test "confirm_abi_deps" confirm_abi_deps
echo "---------------------------------------------------------------------" run_test "confirm_makefile_deps" confirm_makefile_deps
# 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
)
$MAKE $MAKEFLAGS clean $MAKE $MAKEFLAGS clean