Let's check if a testpmd and unit tests from a reference build can run with the current release libraries/drivers.
This gives another level of ABI checking, like catching regressions on experimental or internal ABI symbols that get promoted to stable without providing an alias for existing users. We may need to skip unit tests that were added since the reference. So add a ABI_SKIP_TESTS environment variable in preparation. Signed-off-by: David Marchand <[email protected]> --- Changes since v2: - automated generation of the tests list, Changes since v1: - dropped hack, testing this patch can't be done in the CI now, - emptied the excluded tests list, - added test-null.sh, --- .ci/linux-build.sh | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index c789111a79..a15b3d3516 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -206,7 +206,7 @@ if [ "$ABI_CHECKS" = "true" ]; then # don't try to link apps. REF_OPTS="$REF_OPTS -Dcheck_includes=false" REF_OPTS="$REF_OPTS -Ddeveloper_mode=disabled" - REF_OPTS="$REF_OPTS -Ddisable_apps=*" + REF_OPTS="$REF_OPTS -Denable_apps=test,test-pmd" REF_OPTS="$REF_OPTS -Denable_docs=false" REF_OPTS="$REF_OPTS -Dexamples=" refsrcdir=$(readlink -f $(pwd)/../dpdk-$REF_GIT_TAG) @@ -215,13 +215,25 @@ if [ "$ABI_CHECKS" = "true" ]; then ninja -C $refsrcdir/build DESTDIR=$(pwd)/reference meson install -C $refsrcdir/build find reference/usr/local -name '*.a' -delete - rm -rf reference/usr/local/bin + rm -rf reference/usr/local/bin/* + cp $refsrcdir/build/app/dpdk-test reference/usr/local/bin/dpdk-test + meson test -C $refsrcdir/build --list --suite fast-tests | sort > reference/tests.txt + cp $refsrcdir/build/app/dpdk-testpmd reference/usr/local/bin/dpdk-testpmd rm -rf reference/usr/local/share echo $REF_GIT_TAG > reference/VERSION fi DESTDIR=$(pwd)/install meson install -C build devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-} + + failed= + configure_coredump + mv -f build/app/dpdk-testpmd build/app/dpdk-testpmd.ori + cp reference/usr/local/bin/dpdk-testpmd build/app/dpdk-testpmd + devtools/test-null.sh || failed="true" + mv -f build/app/dpdk-testpmd.ori build/app/dpdk-testpmd + catch_coredump + [ "$failed" != "true" ] fi if [ "$RUN_TESTS" = "true" ]; then @@ -232,6 +244,23 @@ if [ "$RUN_TESTS" = "true" ]; then catch_ubsan DPDK:fast-tests build/meson-logs/testlog.txt check_traces [ "$failed" != "true" ] + + if [ "$ABI_CHECKS" = "true" ]; then + failed= + configure_coredump + mv -f build/app/dpdk-test build/app/dpdk-test.ori + cp reference/usr/local/bin/dpdk-test build/app/dpdk-test + meson test -C build --list --suite fast-tests | sort > build/tests.txt + DPDK_TEST_SKIP=$(grep -vxFf reference/tests.txt build/tests.txt | + sed -n 's,DPDK:.* / ,,p' | tr '\n' ',') + sudo env DPDK_TEST_SKIP="$DPDK_TEST_SKIP" \ + meson test -C build --suite fast-tests -t 3 --no-stdsplit --print-errorlogs || failed="true" + catch_coredump + catch_ubsan DPDK:fast-tests build/meson-logs/testlog.txt + check_traces + mv -f build/app/dpdk-test.ori build/app/dpdk-test + [ "$failed" != "true" ] + fi fi # Test examples compilation with an installed dpdk -- 2.54.0

