From patchwork Thu Jan 18 21:00:27 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: 125044 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp296216lja; Thu, 18 Jan 2018 13:04:06 -0800 (PST) X-Google-Smtp-Source: ACJfBotNZr72N0ysRGoF6KatHkShS+qgs++VjOy53yPB/gHc3IMC2LIQVPETrxrzQfyuu/T6FPZU X-Received: by 10.55.132.5 with SMTP id g5mr23932513qkd.257.1516309446634; Thu, 18 Jan 2018 13:04:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516309446; cv=none; d=google.com; s=arc-20160816; b=LWrSPplJsKc6j+LaRho6PEQeWNRtHecKjkeYYaBWeUQE1qG/xhwXg3AcJC7cBBUOVk FAs4Vd3dvxgNheocQifCZU4/W4FKUohDvxeiQfd2i7tsazTli1G2fdaPE2DuAVjsazQl ylw34tqUI2ALy4pasneZ0EUyx6Uct/qkTWNggnPwEwGTPnTJTdjKXUOcJx5gSI4F1fJS RIpoChg80rFHJXNHAOaPfPikWYg5ge2wUbPovFHpPvLRisL9ob1xgl9sFjzJ471tWfzC shapfSwU3gXQD4zkHlk/LwPw5JcXfKc0s96HVN0LrlqqaPTBAbVa+rNB3ndODDTMxi3O ADPQ== 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=shCspztHDXLYG71YHkpnVk8mDVMODmlRHnV75kiRUVg=; b=f+O23LlL5wvDxhLvFAcx+mkMxPoaWGF5I8I9KJFwMnMCi1vlN22xhAa3IZ7LsdBmp6 SlxdgysCVFQYtqtOCMDp/zPuz7XS0IxWkQyFDv3zGjYSctCyTVvMTJxFzArqmoGZJ9Qb hYMesGeJQuaCW/8nKM8Wdn2YnHOmqE67rr6o4ec8L8/O2I3lYlvHyRcgwJduB0OH1O0O nDdz7oEzem4NHfhddcOc93PMFrmSkCL4GituCf6PC/0THIsJE0apXIeir6NRIha6mz8F uDS7I5FQaPb83feeOwoFZ6XfF3kwaTpQASOULDWufDdCHTrecOW/FLrNb/eDGmpA1AC5 N0eg== 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 t52si3493571qta.217.2018.01.18.13.04.06; Thu, 18 Jan 2018 13:04:06 -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 554F26284C; Thu, 18 Jan 2018 21:04:06 +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_H2 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 20413627D3; Thu, 18 Jan 2018 21:02:16 +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 BC18261726; Thu, 18 Jan 2018 21:00:51 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id 0122A6152C for ; Thu, 18 Jan 2018 21:00:47 +0000 (UTC) Received: from mxback13g.mail.yandex.net (mxback13g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:92]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 7936B2183E80 for ; Fri, 19 Jan 2018 00:00:45 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback13g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id cIFp1Pcir6-0jVigbkQ; Fri, 19 Jan 2018 00:00:45 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0vkV36BW3S-0ifGOL0S; Fri, 19 Jan 2018 00:00:44 +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: Fri, 19 Jan 2018 00:00:27 +0300 Message-Id: <1516309228-14151-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516309228-14151-1-git-send-email-odpbot@yandex.ru> References: <1516309228-14151-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 390 Subject: [lng-odp] [PATCH v7 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: 5a4502fc6bc53e6503169da3028f456b64811a0b ** Merge commit sha: edf30b70f488ab88edf3bbccf655c1f45fb0753c **/ configure.ac | 11 +++++++++++ example/Makefile.inc | 12 +++++++++++- platform/linux-generic/test/Makefile.am | 3 +-- platform/linux-generic/test/ring/Makefile.am | 28 ++++++++++++++++++++++++++-- test/Makefile.inc | 12 +++++++++++- 5 files changed, 60 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 0c8799f1e..56a422b4b 100644 --- a/configure.ac +++ b/configure.ac @@ -182,6 +182,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 ########################################################################## @@ -393,6 +403,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 4a15ee7e0..3c8060da9 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -2,11 +2,21 @@ include $(top_srcdir)/Makefile.inc TESTS_ENVIRONMENT = EXEEXT=${EXEEXT} -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 \ $(ODP_INCLUDES) \ $(HELPER_INCLUDES) +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 edaf4510c..3f774342e 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,7 +10,27 @@ ring_main_SOURCES = \ ring_suites.c ring_suites.h \ ring_basic.c ring_stress.c +TESTS = ring_main$(EXEEXT) + PRELDADD += $(LIBCUNIT_COMMON) -AM_CPPFLAGS += \ - -I$(top_srcdir)/platform/linux-generic/include +AM_CPPFLAGS += -I$(top_srcdir)/platform/linux-generic/include + +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 83004f0c6..55a493a85 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -11,16 +11,26 @@ 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 = AM_CPPFLAGS = \ $(ODP_INCLUDES) \ $(HELPER_INCLUDES) \ -I$(top_srcdir)/test/common + +# Do not link to DPDK twice in case of dynamic linking with ODP +if STATIC_APPS +LDADD += $(DPDK_LIBS_LT) +endif + AM_CFLAGS = $(CUNIT_CFLAGS) +if STATIC_APPS AM_LDFLAGS = -L$(LIB) -static +else +AM_LDFLAGS = +endif @VALGRIND_CHECK_RULES@ From patchwork Thu Jan 18 21:00:28 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: 125042 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp295674lja; Thu, 18 Jan 2018 13:03:03 -0800 (PST) X-Google-Smtp-Source: ACJfBouQcUhPsmNCoeCAq1mccMqY4hDBblVTPXuOdHuj7jxQO1QGHZPTf+ekJayqo9gtY+sKSlZ+ X-Received: by 10.237.58.229 with SMTP id o92mr66422818qte.35.1516309383056; Thu, 18 Jan 2018 13:03:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516309383; cv=none; d=google.com; s=arc-20160816; b=SNQZfvXMC/Hq8cU6jCkh/r0xeAwy0t4f/4SS2WOcz47QIfqAB6HqFtz1fYk6dZPEjL HH6EP1bQgTbPWG/rHp+X0K33z5c6MC7kklX8+hhpPoMA4RWGw8CN6Qvl5dj2DtIcKs8l 8L5XkdaFlQXWgkEbEuvedL7orkfrOnyrK+QaLKX44iuM4zb7Q3SbrbzrTC4S8yhgVY0s gZxDqKXB/qSXBox3q+5H1pGZ11VwI5rPPHXMohXjMY4NqKV6HGqTsfiPqzT3TjAnxS5q 8sStpQxdxcTd7YToFDdFvZfliAb3zLM3LWQ3kOAkYlT7U7mHscpY6nbsw2uDLyYVNCkZ buOQ== 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=FwbLEXPdRRKBFs3XEN+TyHJgcUqnD2LciswWMWWbasA=; b=qB8h/5PtiTZrgb1xWy2kf7g9DWniVsY5oAyxEDDnvNrp/2x3duPH2z1IQkWYd2F0q2 DLelQmvhETXMcix/SQMqK2Y9zTA2ZNH/S4CgzKzfQy+uphceEUpZ6KYPjSBrc8L63eqp xMxh1Ses5gOrLrTpq64Vme2RY95czu4s2efRBX56eHpOtSjGB/3k/IQFiDKXP8UOKjF8 xXiS/nHe4+jsnoNMp4eT93xkXuv4YPLAgX1ggfS+oeeXlNY1ehDq+5bSSzbW9qszJEa6 T96RE4OQJtAGHcvhtfoMaZRBDfesShzI2mljNMUn0XaZZYCAH4nCutWhKp+s8ovZupE8 u4BQ== 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 s82si3085840qkl.305.2018.01.18.13.03.02; Thu, 18 Jan 2018 13:03:03 -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 52C3F627F0; Thu, 18 Jan 2018 21:03:02 +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_H2 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 1E83F62793; Thu, 18 Jan 2018 21:02:03 +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 7C0E26177C; Thu, 18 Jan 2018 21:00:50 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id D65DE614E3 for ; Thu, 18 Jan 2018 21:00:47 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 28113423A2 for ; Fri, 19 Jan 2018 00:00:46 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id si2A8jNevL-0jLediv2; Fri, 19 Jan 2018 00:00:46 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0vkV36BW3S-0jfWlBBW; Fri, 19 Jan 2018 00:00:45 +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: Fri, 19 Jan 2018 00:00:28 +0300 Message-Id: <1516309228-14151-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516309228-14151-1-git-send-email-odpbot@yandex.ru> References: <1516309228-14151-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 390 Subject: [lng-odp] [PATCH v7 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: 5a4502fc6bc53e6503169da3028f456b64811a0b ** Merge commit sha: edf30b70f488ab88edf3bbccf655c1f45fb0753c **/ .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index b614668c5..14bc1b143 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"