From patchwork Thu Oct 13 16:37:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 77632 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp324311qge; Thu, 13 Oct 2016 09:38:11 -0700 (PDT) X-Received: by 10.107.58.10 with SMTP id h10mr7335148ioa.78.1476376691275; Thu, 13 Oct 2016 09:38:11 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n22si9021409itg.21.2016.10.13.09.38.10; Thu, 13 Oct 2016 09:38:11 -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=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id CF53B60846; Thu, 13 Oct 2016 16:37:41 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 E5905617AF; Thu, 13 Oct 2016 16:37:37 +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 7B679617B2; Thu, 13 Oct 2016 16:37:36 +0000 (UTC) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) by lists.linaro.org (Postfix) with ESMTPS id 44000617AB for ; Thu, 13 Oct 2016 16:37:35 +0000 (UTC) Received: by mail-lf0-f51.google.com with SMTP id b75so143705041lfg.3 for ; Thu, 13 Oct 2016 09:37:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NhF8mrZP7XT6Cq9cKiExaC8uB/4slsfsTrlR7NCO+9E=; b=cUYBBo9c5n/ibiVmQKkrWOL5+el/kVsoClWozFlVAoFMUaP9BNdUiTeNYTKPkrDXDa w/z9X1wLv+lExvYR1i3FTMA4kuA+NkZzpm65U5yrrRLJRsu3oSE1N+4G2LhajRJ8WB9D 3vfOP5dUuL6s7c4SWPd9XcKhpPH8UgJanIzHhm0qk3n8srbIKGA/GH++KPXy7vzuen/U K8H37if6w4HYfgVLSzAp/w8razoxIPuHw/OIdzt+doW+gQHAZDedLwQo0Z3jLall7qkE NoRw7HrICMnjvyv/v7HirCCklRWExW3FUmN7fJ5zAmcqpBhdI9ZataIXS8qLbXlgcAvP 8qvA== X-Gm-Message-State: AA6/9Rn7Q4oFRLAxUeS7pHyNPuNxVZe/Hb2b1Uk/YxcKOR1RtpTJeEqFQzeyGDtxKurhbLGl290= X-Received: by 10.25.167.209 with SMTP id q200mr11325410lfe.168.1476376653192; Thu, 13 Oct 2016 09:37:33 -0700 (PDT) Received: from localhost.localdomain ([83.220.239.30]) by smtp.gmail.com with ESMTPSA id r123sm4134426lff.28.2016.10.13.09.37.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Oct 2016 09:37:32 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 13 Oct 2016 19:37:25 +0300 Message-Id: <1476376645-12029-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCHv2] 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" 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 --- v2: update description (Mike) test/common_plat/performance/odp_pktio_perf.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) -- 2.7.1.250.gff4ea60 diff --git a/test/common_plat/performance/odp_pktio_perf.c b/test/common_plat/performance/odp_pktio_perf.c index f041b13..846dfaa 100644 --- a/test/common_plat/performance/odp_pktio_perf.c +++ b/test/common_plat/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) { @@ -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) + break; + } return ret; }