From patchwork Wed Jan 17 16:03:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 124848 Delivered-To: patch@linaro.org Received: by 10.46.62.1 with SMTP id l1csp107056lja; Wed, 17 Jan 2018 08:40:08 -0800 (PST) X-Google-Smtp-Source: ACJfBouLSbUo6zJSDbilfF+136cS3kZsKWrQ+IpJUYv7uB1hnuiY8kH1LwqyDn6UYjDZBoFzP6zD X-Received: by 10.55.102.151 with SMTP id a145mr45332464qkc.258.1516207208328; Wed, 17 Jan 2018 08:40:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516207208; cv=none; d=google.com; s=arc-20160816; b=I7/GS7ab+Lf/5POlpKwEmybaH3uqCzgtt/LUW99jHl30uh1pwlqDPMX/oZ2PIPckQ4 f0K/FQBUeZIbvdoaRmebZAAQolQgLG73zNJOEPhu0NJr1mya4TNUMrQ2sZ9c5ooNxPH3 fx+zcU73cqCTJleXOsibw5vlJr7TuCp0wC3LpBWyr7FHz5VmGPT/De/ksknfhzFgr7dY I5oC5NE7TN9hejDU6cMIdhVbeBqKieloH12AKA2PfyhRnOUk/8oTsNXTaNsUr7EyC0NG tTBkFrox2RkYxFP1+is5VYMpKIEWZ0Yi4swdJucyvf1gbFMULN6XeXUsfLt2KPjGy1dI Rkqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=rc4Cmq6R1oV/T0H0ZLDTrfhOkOKB0p7DNZpyisjWeOQ=; b=KbAKEOmrwnK9DoTtlrdGGdjKo1rPlS8c1Ma6qPDI+8mYwFqjYAr/AAXNSDSnc7c48Z K8/u59bG66ORs981nUYsoXbi0/XltKPrmCTfyhuPCrtKyroN6HWiyxb77tNjxKP9s4dl Ro4BkiOhon/qbwIs4IkqSb2N7l2UVKoHBOfVxrjtZ8qnyUnEK1R6tJ03Z68OLlevbsCv QNah7WVwgUosvVLbd2qa4KjiJ4leKDi49Gi8ppcEBc2AEKiMG3mDa3qGwFfszKFie1+I 43Hzzei7xseIeUwEQz7dSPWASQlW8uGpxoEmsBLD5dNwP4F/NML2yHogc9giyXvTureN JG/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id q17si260373qte.468.2018.01.17.08.40.08; Wed, 17 Jan 2018 08:40:08 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id F0F826176E; Wed, 17 Jan 2018 16:40:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 1C6B462817; Wed, 17 Jan 2018 16:05:21 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 395D062813; Wed, 17 Jan 2018 16:05:09 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 67A236281B for ; Wed, 17 Jan 2018 16:03:08 +0000 (UTC) Received: from mxback7j.mail.yandex.net (mxback7j.mail.yandex.net [IPv6:2a02:6b8:0:1619::110]) by forward106j.mail.yandex.net (Yandex) with ESMTP id 64CC01804D78 for ; Wed, 17 Jan 2018 19:03:07 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback7j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 8PTUzc4OHx-37YifEwZ; Wed, 17 Jan 2018 19:03:07 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id fTsV1JdBNS-36ZiPmqV; Wed, 17 Jan 2018 19:03:06 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 17 Jan 2018 19:03:05 +0300 Message-Id: <1516204986-15528-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516204986-15528-1-git-send-email-odpbot@yandex.ru> References: <1516204986-15528-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 390 Subject: [lng-odp] [PATCH v6 1/2] build: provide an option to link examples dynamically X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Distributions won't like statically-linked binaries. Provide configure switch to link examples and tests dynamically. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 390 (lumag:dynamic-link-tests) ** https://github.com/Linaro/odp/pull/390 ** Patch: https://github.com/Linaro/odp/pull/390.patch ** Base sha: 520c170d758f2d37554631bf1467ec50e027cd3e ** Merge commit sha: 5aab2047568e864d1383eac1d391c7c98726f2e7 **/ configure.ac | 11 +++++++++++ example/Makefile.inc | 12 +++++++++++- platform/linux-generic/test/Makefile.am | 3 +-- platform/linux-generic/test/ring/Makefile.am | 25 +++++++++++++++++++++++++ test/Makefile.inc | 11 ++++++++++- 5 files changed, 58 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 177881a58..918444290 100644 --- a/configure.ac +++ b/configure.ac @@ -172,6 +172,16 @@ AS_IF([test "${with_platform}" = "linux-generic"], AC_DEFINE_UNQUOTED([IMPLEMENTATION_NAME], ["$IMPLEMENTATION_NAME"], [Define to the name of the implementation]) +########################################################################## +# Build examples/tests dynamically +########################################################################## +AC_ARG_ENABLE([static-applications], + [AS_HELP_STRING([--disable-static-applications], + [disable static linking of examples and tests] + [ with ODP])], [], + [enable_static_applications=yes]) +AM_CONDITIONAL([STATIC_APPS], [test "x$enable_static_applications" != "xno"]) + ########################################################################## # Include m4 files ########################################################################## @@ -383,6 +393,7 @@ AC_MSG_RESULT([ Deprecated APIs: ${deprecated} debug: ${enable_debug} cunit: ${cunit_support} + static tests linkage: ${enable_static_applications} test_vald: ${test_vald} test_perf: ${test_perf} test_perf_proc: ${test_perf_proc} diff --git a/example/Makefile.inc b/example/Makefile.inc index fa1224338..64665ef4a 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -1,7 +1,13 @@ TESTS_ENVIRONMENT = EXEEXT=${EXEEXT} LIB = $(top_builddir)/lib -LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_LIBS_LT) +LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la + +# Do not link to DPDK twice in case of dynamic linking with ODP +if STATIC_APPS +LDADD += $(DPDK_LIBS_LT) +endif + AM_CFLAGS = \ -I$(srcdir) \ -I$(top_srcdir)/example \ @@ -13,4 +19,8 @@ AM_CFLAGS = \ -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \ -I$(top_builddir)/include +if STATIC_APPS AM_LDFLAGS = -L$(LIB) -static +else +AM_LDFLAGS = +endif diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am index 97784a02c..99934099a 100644 --- a/platform/linux-generic/test/Makefile.am +++ b/platform/linux-generic/test/Makefile.am @@ -6,8 +6,7 @@ SUBDIRS = performance if test_vald TESTS = validation/api/pktio/pktio_run.sh \ validation/api/pktio/pktio_run_tap.sh \ - validation/api/shmem/shmem_linux$(EXEEXT) \ - ring/ring_main$(EXEEXT) + validation/api/shmem/shmem_linux$(EXEEXT) SUBDIRS += validation/api/pktio\ validation/api/shmem\ diff --git a/platform/linux-generic/test/ring/Makefile.am b/platform/linux-generic/test/ring/Makefile.am index 8287c7e04..a9e6b8338 100644 --- a/platform/linux-generic/test/ring/Makefile.am +++ b/platform/linux-generic/test/ring/Makefile.am @@ -1,3 +1,7 @@ +# ring test uses internal symbols from libodp-linux which are not available +# when linking test with libodp-linux.so +if STATIC_APPS + include $(top_srcdir)/test/Makefile.inc test_PROGRAMS = ring_main @@ -6,4 +10,25 @@ ring_main_SOURCES = \ ring_suites.c ring_suites.h \ ring_basic.c ring_stress.c +TESTS = ring_main$(EXEEXT) + PRELDADD += $(LIBCUNIT_COMMON) + +TESTNAME = linux-generic-ring + +TESTENV = tests-$(TESTNAME).env + +test_DATA = $(TESTENV) + +DISTCLEANFILES = $(TESTENV) +.PHONY: $(TESTENV) +$(TESTENV): + echo "TESTS=\"$(TESTS)\"" > $@ + echo "$(TESTS_ENVIRONMENT)" >> $@ + echo "$(LOG_COMPILER)" >> $@ + +if test_installdir +installcheck-local: + $(DESTDIR)/$(testdir)/run-test.sh $(TESTNAME) +endif +endif diff --git a/test/Makefile.inc b/test/Makefile.inc index b0a8749dc..04b145f77 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -11,9 +11,14 @@ LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la #in the following line, the libs using the symbols should come before #the libs containing them! The includer is given a chance to add things #before libodp by setting PRELDADD before the inclusion. -LDADD = $(PRELDADD) $(LIBODP) $(DPDK_LIBS_LT) +LDADD = $(PRELDADD) $(LIBODP) PRELDADD = +# Do not link to DPDK twice in case of dynamic linking with ODP +if STATIC_APPS +LDADD += $(DPDK_LIBS_LT) +endif + INCFLAGS = \ -I$(top_builddir)/platform/@with_platform@/include \ -I$(top_srcdir)/helper/include \ @@ -28,7 +33,11 @@ AM_CPPFLAGS = $(INCFLAGS) AM_CPPFLAGS += -I$(top_srcdir)/test/common AM_CFLAGS = $(CUNIT_CFLAGS) +if STATIC_APPS AM_LDFLAGS = -L$(LIB) -static +else +AM_LDFLAGS = +endif @VALGRIND_CHECK_RULES@ From patchwork Wed Jan 17 16:03:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 124855 Delivered-To: patch@linaro.org Received: by 10.46.62.1 with SMTP id l1csp107755lja; Wed, 17 Jan 2018 08:42:11 -0800 (PST) X-Google-Smtp-Source: ACJfBouBS3Zd5nPi4oOcZ+LP9wqWThOB6GFCz3AwptciAonN0XodRZzhHe7HsH1H4o2Gl/jmHuGy X-Received: by 10.237.54.8 with SMTP id e8mr63850878qtb.25.1516207331197; Wed, 17 Jan 2018 08:42:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516207331; cv=none; d=google.com; s=arc-20160816; b=EYKmZiLqriPnCTOeQ481xoVW54nOSvEEDpL8vDmf2TytGubyAa29QSJGZvImSI1b/d YRw6oQ+ovZl9T0wZ67+Wc6E4ion/4Ob+Usd5oZrHu4m27n/GVx1gpb7xEQJUlxcgRgbh 863FmRt9T+34APvAoRIfRq7Sy9TNQlUvqxJ8WIWGSBl7u0alkcr3MajIFOY2LLaa4SOr TSFE+cWvFqzxLYRstfhImp4Leclit3xeWipKpC5G93L3YNGr7pry7I680LNqH8pV0jdJ TRmdxRYIAxK/RwfwIAsSqSMF6Dc+k7K1eBm/v/e6szbAWyic223WMCPwfpHzpM1SmoGE m8Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=BzTqiem3nEatHuoSRTufYYlcQh7cGBjH8Ks0f766cU4=; b=kbQXzeKYPHVZgyg6s3mtJOybQIZdgWax8bJmq5FkeM0PqrU4OBdroIFzYiH54MLtF3 bkjbilQh310vUop5Xu16m9sK9wY9L0P0IKnbW2mtzUcY01TjkaU0GEE7S5i/gYs9E3IV eoX10ISjFSeeB22JCX0jeo30LCrs/pxvrfra+MCdUfK5BP0EKboYozI6o8yFDsQ77EJd Gnnh8cvwxiqp+I5hxqdSgSocU/Jl/b03mwaWQf7rUivBnXS2YBqWEo0KRpsWUnAzPRlH ZU7ePAQjS3sNOvLjxRt7qv6xb12ToDF+pks+ZOaK9Di7rTzbj9bS3XN+D3VUGdgzUEB5 jBRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id e80si6442035qkh.250.2018.01.17.08.42.11; Wed, 17 Jan 2018 08:42:11 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id E644562850; Wed, 17 Jan 2018 16:42:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CC9F962861; Wed, 17 Jan 2018 16:05:39 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4BE0D6285F; Wed, 17 Jan 2018 16:05:35 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 39F6562819 for ; Wed, 17 Jan 2018 16:03:09 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward101j.mail.yandex.net (Yandex) with ESMTP id C44281243F97 for ; Wed, 17 Jan 2018 19:03:07 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id YQfIL33RvC-37Nmmaaq; Wed, 17 Jan 2018 19:03:07 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id fTsV1JdBNS-37ZuMWMZ; Wed, 17 Jan 2018 19:03:07 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 17 Jan 2018 19:03:06 +0300 Message-Id: <1516204986-15528-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516204986-15528-1-git-send-email-odpbot@yandex.ru> References: <1516204986-15528-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 390 Subject: [lng-odp] [PATCH v6 2/2] travis: run tests with dynamically-linked tests X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 390 (lumag:dynamic-link-tests) ** https://github.com/Linaro/odp/pull/390 ** Patch: https://github.com/Linaro/odp/pull/390.patch ** Base sha: 520c170d758f2d37554631bf1467ec50e027cd3e ** Merge commit sha: 5aab2047568e864d1383eac1d391c7c98726f2e7 **/ .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index fa352b572..a0bc2f391 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,7 @@ env: - CONF="--enable-schedule-iquery" - CONF="--enable-schedule-scalable" - CONF="--enable-dpdk-zero-copy" + - CONF="--disable-static-applications" - CROSS_ARCH="arm64" - CROSS_ARCH="armhf" CFLAGS="-march=armv7-a" - CROSS_ARCH="powerpc"