From patchwork Thu Aug 27 16:18:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 52773 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 3231F22DC4 for ; Thu, 27 Aug 2015 16:20:01 +0000 (UTC) Received: by wibcx1 with SMTP id cx1sf5478309wib.0 for ; Thu, 27 Aug 2015 09:20:00 -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=8wTVyNaMVnH/XvRJ8pGarJeTxiiteh9XAwy2f7ntx9o=; b=LNnZlqHtKdL4YnCRg4BS8mARTK+MYDyy7q5GJMEOK70uO0x52NyhAwDFe0nxqVqFjX 08BCyMqK3ckrStAA8UPpNS3DmlzYOyPo+K3u7KxVi0GQ/dpG5lcwLTyfMU/jXz3fPWVX Xkj3qxqhgbxIh36SycY9M47ErkWYLxCl159RB0g6zUAA/eH+Srhp6rVNNRVQws8BqDi0 8/+SyU5PZz6uLlXm7QeHKGO/xLG/NzWpk5LUbW1q1pLjytqkZs0Pr39uS6F+QlONx5S9 gGz+9tXoi7mXJ0psu5nKZO7JrOA3dRF6YixBUMTmRl0MbKuFbZLa71YQYe0MQlfzoZfj FmCQ== X-Gm-Message-State: ALoCoQmGkWOFdA6BZ3vWBETcfsw/DtY5eSW7EYJ32Mk2WxwcJmV6m28YZZAuZvK6tCxgb/fiuUsL X-Received: by 10.112.227.105 with SMTP id rz9mr1465285lbc.8.1440692400393; Thu, 27 Aug 2015 09:20:00 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.169 with SMTP id f9ls100147lam.93.gmail; Thu, 27 Aug 2015 09:20:00 -0700 (PDT) X-Received: by 10.152.7.68 with SMTP id h4mr2697539laa.94.1440692400257; Thu, 27 Aug 2015 09:20:00 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id sb1si2698189lbb.33.2015.08.27.09.20.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Aug 2015 09:20:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbsx3 with SMTP id sx3so14733977lbb.0 for ; Thu, 27 Aug 2015 09:20:00 -0700 (PDT) X-Received: by 10.112.235.130 with SMTP id um2mr2657656lbc.72.1440692400079; Thu, 27 Aug 2015 09:20:00 -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 us2csp27523lbb; Thu, 27 Aug 2015 09:19:59 -0700 (PDT) X-Received: by 10.140.237.70 with SMTP id i67mr8212920qhc.48.1440692399024; Thu, 27 Aug 2015 09:19:59 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f76si2999132qhe.58.2015.08.27.09.19.28; Thu, 27 Aug 2015 09:19:58 -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 CA1E2619B9; Thu, 27 Aug 2015 16:19:28 +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 79CB4619AC; Thu, 27 Aug 2015 16:18:58 +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 88730619A8; Thu, 27 Aug 2015 16:18:55 +0000 (UTC) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by lists.linaro.org (Postfix) with ESMTPS id 60B4E619A8 for ; Thu, 27 Aug 2015 16:18:54 +0000 (UTC) Received: by lbcbn3 with SMTP id bn3so14627641lbc.2 for ; Thu, 27 Aug 2015 09:18:53 -0700 (PDT) X-Received: by 10.112.125.34 with SMTP id mn2mr2238897lbb.76.1440692333384; Thu, 27 Aug 2015 09:18:53 -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 c5sm687478lae.47.2015.08.27.09.18.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Aug 2015 09:18:52 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 27 Aug 2015 19:18:46 +0300 Message-Id: <1440692327-8123-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440692327-8123-1-git-send-email-maxim.uvarov@linaro.org> References: <1440692327-8123-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 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.169 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 --- 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..053ca40 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