From patchwork Fri Jul 14 10:00:04 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: 107761 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp687576qge; Fri, 14 Jul 2017 03:07:16 -0700 (PDT) X-Received: by 10.200.51.235 with SMTP id d40mr10374398qtb.151.1500026836692; Fri, 14 Jul 2017 03:07:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500026836; cv=none; d=google.com; s=arc-20160816; b=zBRiqOmFuTm+ACKp6vxvjOhF446/v6zUdVx1r40GXTjacKy5yvU4rAh+cm2XvJB9bM 3s8V8PCCqV/CWtBd7JNW03hUFo5UZRJV2EZ8gRVnO569LCfs175c8+o3e03pGzBbCxdC BeCy6SW4Z+vCVtashCB4bFyh65S+RAWo0EvVObwdm579oQHAXxSM6Zp7PcveRqqUcqPy 9H96Ua934b+HqOWL3/Swqjd3gLJmFYJfFWBszMukYL2q+UXEWqEsaTBNfIMtCWYTGqXz MfLQL4Jic5Kl93lFQQBuc6NADkOnQ6Gx4mL5H2YiYsTXtY+x4Rd0zmm9k4SDcOm3vyPc LIPw== 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=5pd8pwt+yrXLUJq+4VuUj0tJ2ohU0ZVUGq3sx4vmTxk=; b=E6tYrBbTPrA9hwpR7HNE5T0siTiiyQM0JnZxhuktV5yVX/CN1q5PpSAMwIlx+8/EaR q7jr/yGmahdrOjvxAqBxQq6cvC5VOYe7F/piWWLJlkjnTKlAdZISaq09yVObRnW4rNco 1RHBp4FvZK2fWMU4ZBwP7KUsrW9OsQzC29VmVXoTdCr/wx1tryq+SqGz0Pxs+gPuN5Gi F9deElJ6XLhPbTcgSFT234bsxuhziCXCWSBI8fszKXpRNbaGX3CcFm9I0VbEgwPZCCvd TyOc9e2gxju+MufgTfkLOsJsfhaODP+v3EZnd5kQ/aJqojutJs87k7TcACjex61ukn/o q7iQ== 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 e81si4902022qkb.326.2017.07.14.03.07.16; Fri, 14 Jul 2017 03:07:16 -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 5E122609E5; Fri, 14 Jul 2017 10:07:16 +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,URIBL_BLOCKED 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 E461265BEF; Fri, 14 Jul 2017 10:01:53 +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 02DBF60679; Fri, 14 Jul 2017 10:01:41 +0000 (UTC) Received: from forward4h.cmail.yandex.net (forward4h.cmail.yandex.net [87.250.230.101]) by lists.linaro.org (Postfix) with ESMTPS id AD1B560679 for ; Fri, 14 Jul 2017 10:00:31 +0000 (UTC) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [37.140.190.28]) by forward4h.cmail.yandex.net (Yandex) with ESMTP id 6BBD320A83 for ; Fri, 14 Jul 2017 13:00:30 +0300 (MSK) Received: from smtp3o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3o.mail.yandex.net (Yandex) with ESMTP id 232402940E2E for ; Fri, 14 Jul 2017 13:00:29 +0300 (MSK) Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id eQMe5PKgI5-0TouVmn3; Fri, 14 Jul 2017 13:00:29 +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: Fri, 14 Jul 2017 13:00:04 +0300 Message-Id: <1500026405-14155-9-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500026405-14155-1-git-send-email-odpbot@yandex.ru> References: <1500026405-14155-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 77 Subject: [lng-odp] [PATCH v1 8/9] test: skip pktio_perf tests on 1 and 2 cpus machines 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 Make check should skip the test instead of failing it. Test splits RX and TX cores for packet processing. Core 0 bind to control thread. So running machine should have at least 2 worker threads which is not enough on 1 and 2 cpus machine. CUnit uses special value 77 to mark test as SKIPPED and not fail on it. Signed-off-by: Maxim Uvarov Reviewed-by: Mike Holmes --- /** Email created from pull request 77 (muvarov:monarch_lts) ** https://github.com/Linaro/odp/pull/77 ** Patch: https://github.com/Linaro/odp/pull/77.patch ** Base sha: 0c15c40db40834f1df217191c4b6a06303ab0872 ** Merge commit sha: f06a7319a03ad565ced026ddc76a66164aa93782 **/ test/performance/odp_pktio_perf.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/performance/odp_pktio_perf.c b/test/performance/odp_pktio_perf.c index 18a1aa2a..988f298b 100644 --- a/test/performance/odp_pktio_perf.c +++ b/test/performance/odp_pktio_perf.c @@ -34,6 +34,8 @@ #include #include +#define TEST_SKIP 77 + #define PKT_BUF_NUM 8192 #define MAX_NUM_IFACES 2 #define TEST_HDR_MAGIC 0x92749451 @@ -558,7 +560,7 @@ static int setup_txrx_masks(odp_cpumask_t *thd_mask_tx, gbl_args->args.cpu_count); if (num_workers < 2) { LOG_ERR("Need at least two cores\n"); - return -1; + return TEST_SKIP; } if (gbl_args->args.num_tx_workers) { @@ -659,7 +661,7 @@ static int run_test_single(odp_cpumask_t *thd_mask_tx, static int run_test(void) { - int ret = 1; + int ret; int i; odp_cpumask_t txmask, rxmask; test_status_t status = { @@ -669,8 +671,9 @@ static int run_test(void) .warmup = 1, }; - if (setup_txrx_masks(&txmask, &rxmask) != 0) - return -1; + ret = setup_txrx_masks(&txmask, &rxmask); + if (ret) + return ret; printf("Starting test with params:\n"); printf("\tTransmit workers: \t%d\n", odp_cpumask_count(&txmask)); @@ -691,8 +694,11 @@ static int run_test(void) run_test_single(&txmask, &rxmask, &status); status.warmup = 0; - while (ret > 0) + while (1) { ret = run_test_single(&txmask, &rxmask, &status); + if (ret <= 0) + break; + } return ret; }