From patchwork Wed Nov 11 15:01:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 56377 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1407359lbb; Wed, 11 Nov 2015 07:02:01 -0800 (PST) X-Received: by 10.55.207.3 with SMTP id e3mr10985906qkj.32.1447254121684; Wed, 11 Nov 2015 07:02:01 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 31si7614651qkw.15.2015.11.11.07.02.00; Wed, 11 Nov 2015 07:02:01 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id C2E9761D78; Wed, 11 Nov 2015 15:02:00 +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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, 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 AE71E61B7F; Wed, 11 Nov 2015 15:01:56 +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 3E46661A03; Wed, 11 Nov 2015 15:01:50 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by lists.linaro.org (Postfix) with ESMTPS id 4797361A03 for ; Wed, 11 Nov 2015 15:01:48 +0000 (UTC) Received: by wmdw130 with SMTP id w130so116303095wmd.0 for ; Wed, 11 Nov 2015 07:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=JYTmsBSLgK+jaVOoZDJ0WdZiyTvEFBZiY4PLaPkmp8Q=; b=P742SPJzSh38iiVU7CkgL+tS26kU6i3WMyqogX3Hi8g0+/df65P/NmsB8igA7QKDrn Ykxcga+gjSkMRVNfkf0rsKi02Oope4FYPiBM3TtoN+XZ0UIRcRMrTv7yNg/zX4xjWJz/ qs6S0t3LTywOtDgVIyjcoauZod3vi2i080P+A1vT+SvmOVzbC7zVKuhcSnFnATvY77KL rF3ukKsqjr4IpuX7zFRqFKiOonTf/4lU0dXtGvjsvb2Ne6ZnFPDK0hzFxWAtZRbgvED/ v9inDWuqa3IsTTNUOKO1E/EFjI4nEKWDhgs4vmsoLNKW1dajlYpgujXV31VsySG85PBu SoBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=JYTmsBSLgK+jaVOoZDJ0WdZiyTvEFBZiY4PLaPkmp8Q=; b=k/3e3E5GD2x8I/iN41NavZVSGswxW0BXbQiA0qEfNQqI9EaK8l7xmmD30alMUlBh0b ZBOgoJB6uWS5oOwLV2Y8YiQ6UtcYlBuWnhqFRdZWqP2KM9ArA13CH8lSCZCkxIO60Vav baNP862zhULl2AqlwqUetMapUFELn+Ijq8XIpCtZUNaNLxBDCHH9tJwxhhMsi6JJXQvW TfVv60LvquKlyj7lS8t/tQbye/0YrbPxYplfhWgKYvQM5ojL+8SunV2pclQ/tGYKIS4N klmxHGh7Bi/i5+ZPgzJH1ym+BVwB4dgVSX8EKPyPWnlIXaDfcH6lw8D90UFk/Fyl/D/b 1KvQ== X-Gm-Message-State: ALoCoQnSt6RaTPWTRTCKP+qSLzghp0dH8n7CJejllqqd6eUHp/VE0dZZWWxqOyMql7MqhytpwhSb X-Received: by 10.28.94.194 with SMTP id s185mr40752377wmb.90.1447254106731; Wed, 11 Nov 2015 07:01:46 -0800 (PST) Received: from e106441.emea.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id r9sm9403768wjz.35.2015.11.11.07.01.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Nov 2015 07:01:45 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Wed, 11 Nov 2015 15:01:27 +0000 Message-Id: <1447254087-13353-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCH] test: performance: set a packet rate pass threshold for l2fwd 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Report a failure if the maximum achieved packet rate is less than a predefined threshold (currently set at 5000pps). Signed-off-by: Stuart Haslam --- test/performance/odp_l2fwd_run | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run index e0c61e7..001d8c2 100755 --- a/test/performance/odp_l2fwd_run +++ b/test/performance/odp_l2fwd_run @@ -61,16 +61,35 @@ run_l2fwd() 2>&1 > /dev/null & GEN_PID=$! - 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 + # this just turns off output buffering so that you still get periodic + # output while piping to tee, as long as stdbuf is available. + if [ "$(which stdbuf)" != "" ]; then + STDBUF="stdbuf -o 0" + else + STDBUF= + fi + LOG=odp_l2fwd_tmp.log + $STDBUF odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2 | tee $LOG ret=$? kill ${GEN_PID} + if [ ! -f $LOG ]; then + echo "FAIL: $LOG not found" + ret=1 + elif [ $ret -eq 0 ]; then + PASS_PPS=5000 + MAX_PPS=$(awk '/TEST RESULT/ {print $3}' $LOG) + if [ "$MAX_PPS" -lt "$PASS_PPS" ]; then + echo "FAIL: pps below threshold $MAX_PPS < $PASS_PPS" + ret=1 + fi + fi + + rm -f $LOG cleanup_pktio_env if [ $? -ne 0 ]; then echo "cleanup_pktio_env error $?" - exit $TEST_SKIPPED fi exit $ret