From 199e427d5dea3051eec1726eb9c857aa3d5fdde2 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Wed, 15 Jun 2016 20:29:06 +0200 Subject: Merge Ubuntu DPDK packaging as of 15th June 2016 As discussed this shall be our initial baseline. If history is needed for any sort of debugging or analysis it can be found at https://code.launchpad.net/~ubuntu-server/dpdk/+git/dpdk Change-Id: Ie95c7effbbea34d723df14f6451c1f782000cbc1 Signed-off-by: Christian Ehrhardt --- debian/tests/test-linkage | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 debian/tests/test-linkage (limited to 'debian/tests/test-linkage') diff --git a/debian/tests/test-linkage b/debian/tests/test-linkage new file mode 100644 index 00000000..fabe1c84 --- /dev/null +++ b/debian/tests/test-linkage @@ -0,0 +1,51 @@ +#!/bin/bash +set -eu + +basedir=$(dirname "$0") +. "${basedir}"/check-dpdk-supported-arch.sh + +cat > testlinkage.c << EOF +#include +#include "dpdk/rte_common.h" + +int main() +{ + printf("Hello rte_exit %p\n", rte_exit); + return 0; +} +EOF + +# -ldpdk actually refers to a linker script now, not a real .so +# with broken linkage this will fail with undefined symbols +printf "\n\nChecking compile with link against DPDK\n" +gcc -v testlinkage.c -o testlinkage.bin -Wall -Werror -ldpdk +echo "OK" + +printf "\n\nLinkage info\n" +lddtree testlinkage.bin + +printf "\n\nChecking for expected internal libraries\n" +# a few of the sublibs that it should use +lddtree testlinkage.bin | grep '^ librte_eal.so' +echo "OK" + +printf "\n\nChecking for expected secondary library dependencies\n" +lddtree testlinkage.bin | grep '^ libpthread.so' +lddtree testlinkage.bin | grep '^ librt.so' +echo "OK" + +printf "\n\nChecking for expected feature dependent library dependencies\n" +# features only used by the lib that we enabled +ldd /usr/lib/*/librte_pmd_pcap.so | grep libpcap +ldd /usr/lib/*/librte_pmd_xenvirt.so | grep libxenstore +echo "OK" + +printf "\n\nChecking test execution\n" +# It doesn't do much, but it should work - so calling it is a minor extra test. +# It is known to fail without SSE3 in e.g. some adt environments, in that +# case check at least that we get the correct error message (this will trigger +# a test fail if it neither finds the success nor the expected error message) +(./testlinkage.bin 2>&1 || /bin/true ) | \ +grep -E 'ERROR: This system does not support "SSSE3".|Hello rte_exit 0x' + +echo "OK" -- cgit 1.2.3-korg