From patchwork Wed May 31 20:00:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 100808 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp486579qge; Wed, 31 May 2017 13:00:33 -0700 (PDT) X-Received: by 10.200.43.99 with SMTP id 32mr34101661qtv.6.1496260832980; Wed, 31 May 2017 13:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496260832; cv=none; d=google.com; s=arc-20160816; b=IlPNDLRpOTabeh+0G56Sui3byvWzREn3U1Yb2S0uW7z5cmsv/knKE6J4jlyhFNdx22 lRyxCDYZAldvdXXeFG9iO0QRP3aXS5D2be31hcw6o3rQhJRY3K5IjtN/m9w4dbRi3TCJ tm9rxlm4SN3GQEo/xuy2WHWOm7rlHU20lY7mXV7eueyCcJICC26R673ZVy22uXx+r3H5 EFlqtm9NL8H/YS4gcXtwN9Pee1WWpl7cgwSwIBqfEZwZqK9oMA7A3zqt/UNgYRAsBI/O gLb0Ec/Ho8k2ByxTy8XqAGZ8c4KB6wJcCwtK8O5XcGNFjq1zM1wtaSlIV5DUEMnqiTF0 OkTw== 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=AmQn+nzq4qkXOlmB7smXdbTxBjkwd8+CkDYbH4JodM4=; b=alMczQ1iIXWTi88zAvH/jfgN54yMOE9NHU6wFaygLsh0QSxKX2tgDFa5DNjloQCOg4 0iLJbGR66a6l5Hsv29g/FmCGP6TJYVLhy1/rZRBekdzl3gxb9D8CCYZpV8XVXXTqGlnu qB6Q0t4R9Ia064Ovg3hY+dzK6SULIt/OQRKjMF2Uk6HuQfGO6QvDvXLKhjGFShgMCDJE zlSMp4wJUNb3nkkSXGj09vZnmCLXbPgjko+ecym1jQOQqh/VPnVlRyUNt+CR0nTh051d 6SXAtkeaQJp+NpE73iyrYxpUq1RV0Zofg97W5GrYHgSjD6/c92/OTE9QlxGAz0kCtj1t eWBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l7si5989527qki.9.2017.05.31.13.00.32; Wed, 31 May 2017 13:00:32 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 51A8960D3C; Wed, 31 May 2017 20:00:32 +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=-0.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A 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 8760560CE4; Wed, 31 May 2017 20:00:23 +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 90F6E60D1F; Wed, 31 May 2017 20:00:17 +0000 (UTC) Received: from forward2p.cmail.yandex.net (forward2p.cmail.yandex.net [77.88.31.17]) by lists.linaro.org (Postfix) with ESMTPS id E5A9560CE4 for ; Wed, 31 May 2017 20:00:15 +0000 (UTC) Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [84.201.187.145]) by forward2p.cmail.yandex.net (Yandex) with ESMTP id 0144C21218 for ; Wed, 31 May 2017 23:00:14 +0300 (MSK) Received: from smtp2h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id 1774A780C04 for ; Wed, 31 May 2017 23:00:12 +0300 (MSK) Received: by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id OSqrOUH4h6-0Bb0wYJd; Wed, 31 May 2017 23:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 31 May 2017 23:00:09 +0300 Message-Id: <1496260809-4141-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496260809-4141-1-git-send-email-odpbot@yandex.ru> References: <1496260809-4141-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 44 Subject: [lng-odp] [PATCH v1 1/1] test: time: do not fail under gcov 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: Maxim Uvarov code coverage gcov make test very slow and it does not pass accepted boundaries. Test if env TEST=coverage variable is set and do no generate fail result if some boundaries are missing. https://bugs.linaro.org/show_bug.cgi?id=3017 Signed-off-by: Maxim Uvarov --- /** Email created from pull request 44 (muvarov:master_time_gcov) ** https://github.com/Linaro/odp/pull/44 ** Patch: https://github.com/Linaro/odp/pull/44.patch ** Base sha: 87bba414b4444d8247adf3411e8bbefd35899f1b ** Merge commit sha: 08e54cf0e57c0aacd7635dade8e9946f9481a261 **/ test/common_plat/validation/api/time/Makefile.am | 10 +++++- test/common_plat/validation/api/time/time.sh | 42 ++++++++++++++++++++++++ test/linux-generic/Makefile.am | 2 +- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100755 test/common_plat/validation/api/time/time.sh diff --git a/test/common_plat/validation/api/time/Makefile.am b/test/common_plat/validation/api/time/Makefile.am index bf2d0268..72e6b7b2 100644 --- a/test/common_plat/validation/api/time/Makefile.am +++ b/test/common_plat/validation/api/time/Makefile.am @@ -1,5 +1,12 @@ include ../Makefile.inc +TESTS_ENVIRONMENT += TEST_DIR=${builddir} + +TESTSCRIPTS = time.sh +TEST_EXTENSIONS = .sh + +TESTS = $(TESTSCRIPTS) + noinst_LTLIBRARIES = libtesttime.la libtesttime_la_SOURCES = time.c @@ -7,4 +14,5 @@ test_PROGRAMS = time_main$(EXEEXT) dist_time_main_SOURCES = time_main.c time_main_LDADD = libtesttime.la $(LIBCUNIT_COMMON) $(LIBODP) -EXTRA_DIST = time.h +EXTRA_DIST = time.h $(TESTSCRIPTS) +dist_check_SCRIPTS = $(TESTSCRIPTS) diff --git a/test/common_plat/validation/api/time/time.sh b/test/common_plat/validation/api/time/time.sh new file mode 100755 index 00000000..02bf75a7 --- /dev/null +++ b/test/common_plat/validation/api/time/time.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Copyright (c) 2017, Linaro Limited +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +# directories where time_main binary can be found: +# -in the validation dir when running make check (intree or out of tree) +# -in the script directory, when running after 'make install', or +# -in the validation when running standalone (./time) intree. +# -in the current directory. +# running stand alone out of tree requires setting PATH +PATH=${TEST_DIR}/api/time:$PATH +PATH=$(dirname $0)/../../../../common_plat/validation/api/time:$PATH +PATH=$(dirname $0):$PATH +PATH=`pwd`:$PATH + +time_main_path=$(which time_main${EXEEXT}) +if [ -x "$time_main_path" ] ; then + echo "running with time_main: $time_run_path" +else + echo "cannot find time_main: please set you PATH for it." + exit 1 +fi + +# exit codes expected by automake for skipped tests +TEST_SKIPPED=77 + +time_main${EXEEXT} +ret=$? + +SIGSEGV=139 + +if [ "${TRAVIS}" = "true" ] && [ $ret -ne 0 ] && + [ ${TEST} = "coverage" ] && [ $ret -ne ${SIGSEGV} ]; then + echo "SKIP: skip due significant slowdown under code coverage" + exit ${TEST_SKIPPED} +fi + +exit $ret diff --git a/test/linux-generic/Makefile.am b/test/linux-generic/Makefile.am index 38516a43..f92083d7 100644 --- a/test/linux-generic/Makefile.am +++ b/test/linux-generic/Makefile.am @@ -28,7 +28,7 @@ TESTS = validation/api/pktio/pktio_run.sh \ $(ALL_API_VALIDATION_DIR)/scheduler/scheduler_main$(EXEEXT) \ $(ALL_API_VALIDATION_DIR)/std_clib/std_clib_main$(EXEEXT) \ $(ALL_API_VALIDATION_DIR)/thread/thread_main$(EXEEXT) \ - $(ALL_API_VALIDATION_DIR)/time/time_main$(EXEEXT) \ + $(ALL_API_VALIDATION_DIR)/time/time.sh \ $(ALL_API_VALIDATION_DIR)/timer/timer_main$(EXEEXT) \ $(ALL_API_VALIDATION_DIR)/traffic_mngr/traffic_mngr.sh \ $(ALL_API_VALIDATION_DIR)/shmem/shmem_main$(EXEEXT) \