From patchwork Thu Aug 27 16:32:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 52775 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 3B9B122DC4 for ; Thu, 27 Aug 2015 16:33:33 +0000 (UTC) Received: by wicbi2 with SMTP id bi2sf19953853wic.3 for ; Thu, 27 Aug 2015 09:33: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:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=fTOhtNkZncsPiLCIaK1jb3+qgNzF751aMN8qUmviAKA=; b=BgZsPGVrwZ5M8mlbVoDtdSEj4Z/Vrnq0RlhEZXkFw3B4GpelJWNAhUw/chVNYYp8o/ KAaOcH4u3Hh++C/MghnJ5QtCpJEt79dyuUJRnBwzxhr3xYGsnAVMYZbYSr8sBBXpghv4 B0DUMwZqC98qBVDYR6e0QCoYmkzAm9l33Pm28gWnEP94roziS+Uq9xXkjr+M/YQ9vpcs 3njb2P4I9f99KIK6REmqWYrmDwkKKBpsJ9/UgUURm/TAs+1qlFppvM0Z+6whPMHoCRrm AcmDea9LQGD5ORuAJvxcykWO/2YhJl59fFrcO9vsDrPMfuz2RqbFb9XxonuDS1ri5IpN 57qg== X-Gm-Message-State: ALoCoQnguYIxBa14XQdez/S16hCvMVHdMl5NVE0kyEEb49TUp3pOjgoc2+ehJyOwzlTkc0vwldfy X-Received: by 10.180.216.12 with SMTP id om12mr2789218wic.1.1440693212559; Thu, 27 Aug 2015 09:33:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.73 with SMTP id b9ls102854laf.43.gmail; Thu, 27 Aug 2015 09:33:32 -0700 (PDT) X-Received: by 10.112.199.66 with SMTP id ji2mr2662702lbc.1.1440693212406; Thu, 27 Aug 2015 09:33:32 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id wh4si2730534lbb.91.2015.08.27.09.33.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Aug 2015 09:33:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbbsx3 with SMTP id sx3so14964522lbb.0 for ; Thu, 27 Aug 2015 09:33:32 -0700 (PDT) X-Received: by 10.152.42.132 with SMTP id o4mr2674978lal.88.1440693212086; Thu, 27 Aug 2015 09:33:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.151.194 with SMTP id us2csp35273lbb; Thu, 27 Aug 2015 09:33:30 -0700 (PDT) X-Received: by 10.50.92.99 with SMTP id cl3mr3270165igb.48.1440693210380; Thu, 27 Aug 2015 09:33:30 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m33si2388901iod.140.2015.08.27.09.33.29; Thu, 27 Aug 2015 09:33:30 -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; Received: by lists.linaro.org (Postfix, from userid 109) id 4BD3B619CB; Thu, 27 Aug 2015 16:33:29 +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, 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 D90B7619C3; Thu, 27 Aug 2015 16:33:05 +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 06D68619C1; Thu, 27 Aug 2015 16:32:48 +0000 (UTC) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by lists.linaro.org (Postfix) with ESMTPS id ADF68619C0 for ; Thu, 27 Aug 2015 16:32:45 +0000 (UTC) Received: by lbbpu9 with SMTP id pu9so14931067lbb.3 for ; Thu, 27 Aug 2015 09:32:44 -0700 (PDT) X-Received: by 10.152.120.38 with SMTP id kz6mr2770091lab.58.1440693164722; Thu, 27 Aug 2015 09:32:44 -0700 (PDT) Received: from localhost.localdomain (ppp91-76-161-180.pppoe.mtu-net.ru. [91.76.161.180]) by smtp.gmail.com with ESMTPSA id kb5sm703727lbc.16.2015.08.27.09.32.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Aug 2015 09:32:44 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 27 Aug 2015 19:32:38 +0300 Message-Id: <1440693159-8111-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440693159-8111-1-git-send-email-maxim.uvarov@linaro.org> References: <1440693159-8111-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 1/2] test: l2fwd: capture test fails X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 l2fwd expects bunch of packets to be routed, test if number of packets less then 100, and report error to make check and mark test as failed. Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- test/performance/odp_l2fwd.c | 12 +++++++----- test/performance/odp_l2fwd_run | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index ce4efa8..b25b978 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -335,7 +335,7 @@ static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool, * @param timeout Number of seconds for stats calculation * */ -static void print_speed_stats(int num_workers, stats_t **thr_stats, +static int print_speed_stats(int num_workers, stats_t **thr_stats, int duration, int timeout) { uint64_t pkts, pkts_prev = 0, pps, drops, maximum_pps = 0; @@ -369,7 +369,8 @@ static void print_speed_stats(int num_workers, stats_t **thr_stats, printf("TEST RESULT: %" PRIu64 " maximum packets per second.\n", maximum_pps); - return; + + return pkts > 100 ? 0 : -1; } /** @@ -386,6 +387,7 @@ int main(int argc, char *argv[]) odp_cpumask_t cpumask; char cpumaskstr[ODP_CPUMASK_STR_SIZE]; odp_pool_param_t params; + int ret; /* Init ODP before calling anything else */ if (odp_init_global(NULL, NULL)) { @@ -491,8 +493,8 @@ int main(int argc, char *argv[]) cpu = odp_cpumask_next(&cpumask, cpu); } - print_speed_stats(num_workers, stats, gbl_args->appl.time, - gbl_args->appl.accuracy); + ret = print_speed_stats(num_workers, stats, gbl_args->appl.time, + gbl_args->appl.accuracy); free(stats); exit_threads = 1; @@ -503,7 +505,7 @@ int main(int argc, char *argv[]) free(gbl_args->appl.if_str); printf("Exit\n\n"); - return 0; + return ret; } /** diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run index c20a3e1..e0c61e7 100755 --- a/test/performance/odp_l2fwd_run +++ b/test/performance/odp_l2fwd_run @@ -63,6 +63,7 @@ run_l2fwd() echo "Run odp_l2fwd -i $IF1,$IF2 -m 0 -t 30 -c 2" odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2 + ret=$? kill ${GEN_PID} @@ -72,7 +73,7 @@ run_l2fwd() exit $TEST_SKIPPED fi - exit 0 + exit $ret } case "$1" in