Commit a8104d66 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

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: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie0768b8a9c7390f51d35b2e879f66854a4da2226
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6143


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatar <dongx.yi@intel.com>
parent 306ad7ff
Loading
Loading
Loading
Loading
+21 −17
Original line number Diff line number Diff line
@@ -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