From patchwork Fri Oct 14 11:51: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: 77654 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp255705qge; Fri, 14 Oct 2016 04:51:39 -0700 (PDT) X-Received: by 10.55.156.18 with SMTP id f18mr10665821qke.177.1476445899697; Fri, 14 Oct 2016 04:51:39 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f99si9440563qkh.235.2016.10.14.04.51.39; Fri, 14 Oct 2016 04:51:39 -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 2F04761B94; Fri, 14 Oct 2016 11:51:39 +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, 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 7945A61B67; Fri, 14 Oct 2016 11:51:35 +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 B0CFB61B67; Fri, 14 Oct 2016 11:51:33 +0000 (UTC) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by lists.linaro.org (Postfix) with ESMTPS id 50B6261B75 for ; Fri, 14 Oct 2016 11:51:32 +0000 (UTC) Received: by mail-lf0-f49.google.com with SMTP id x79so197109378lff.0 for ; Fri, 14 Oct 2016 04:51:32 -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=U7lXAwFMUjAQ3RAXqOWADyNgsOLw4Gvu4sPR5/nEcwc=; b=U5WlwG+TbYm/R3ZQmAgN4CDd/aqrSv+pQyXT/39OsBkMBgBWXiYA5dnod2Qq/t/BUq zV3V5Hy21oeg2V/b1GEufKGM+BfAkFTCvZW1xk4ECI468L1ce6zs/jDpfE4wCqxfdPqz rCzQTu5GJ2/M9U2og+LGOvJDVkqSFrJtuA+YSJQcIUzESvKTT/rDq1lMr3SVQiVhraLb syA41UzaBnPfSpTXCaDI38ckYKKuI76pb8//uuG+CYewXwRBIH6H/mNpa0QRGWrxXqBT 4ms3ijcIJK5DZ/DaVCvzkZB/Tte8TYC2FHcBUvQrTDyt4pxMrX9Cx3EZY6e9K2gdPWEL kwLQ== X-Gm-Message-State: AA6/9RljphTxYVmAOmdzlfz7Vo7/FpiT+lJX9exFVJ/a0/zD+bI+8nW/okdCUajNKG+L5UQFL+o= X-Received: by 10.25.207.84 with SMTP id f81mr2847010lfg.155.1476445891059; Fri, 14 Oct 2016 04:51:31 -0700 (PDT) Received: from maxim-Aspire-VN7-791.d-systems.local ([185.75.190.112]) by smtp.gmail.com with ESMTPSA id w65sm5068909lff.16.2016.10.14.04.51.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Oct 2016 04:51:30 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 14 Oct 2016 14:51:25 +0300 Message-Id: <1476445885-26827-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCHv3] 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 --- v3: update if logic (found just after apply.) v2: update description (Mike) test/common_plat/performance/odp_pktio_perf.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) -- 2.7.1.250.gff4ea60 Reviewed-by: Mike Holmes diff --git a/test/common_plat/performance/odp_pktio_perf.c b/test/common_plat/performance/odp_pktio_perf.c index f041b13..483f067 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) { @@ -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; }