From patchwork Mon Sep 9 13:39:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqing Zhu X-Patchwork-Id: 19836 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2B17D25A57 for ; Mon, 9 Sep 2013 13:39:51 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id k4sf310661qaq.8 for ; Mon, 09 Sep 2013 06:39:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=GNXEx9BARYldIDfold7/d65tp7w45y8jM2z9jbHeT0o=; b=lgUdtZzd3F9n6RllxyqHXlHGixQeuPZHkN9/vdgQIYjkR4mCtHi6y0CU/a/W6d4C91 PbFTkpakeBqBI/tF5GkUMTook9GBJPe8vXdO7HR/GnProBTrvyJv0iZRU9i9fp7Hhe48 RDukKi+K7lEWv+hnKYLIJnvtzGHLh7hSBoFjkxJddP3q81bmH7Q2dygI4oS4Z16Cl7Sw 10cU9CIl7KszgrNGjzOoD7+d7EwP7qxxqbhtbGcBl68XXKDjS5VJWBlluM+rAET2Pd8n fVUA9KJq9zoitx3piqIs5R8tSNjEHyf9Zmg0pcqZpFGr9Erg6OI1Nh7UBkxuZ6jNoszC KePA== X-Received: by 10.236.147.70 with SMTP id s46mr6423223yhj.0.1378733991013; Mon, 09 Sep 2013 06:39:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.30.35 with SMTP id p3ls1862441qeh.97.gmail; Mon, 09 Sep 2013 06:39:50 -0700 (PDT) X-Received: by 10.58.146.71 with SMTP id ta7mr1537862veb.23.1378733990916; Mon, 09 Sep 2013 06:39:50 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id tj6si3168014vcb.43.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Sep 2013 06:39:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ha12so3876317vcb.37 for ; Mon, 09 Sep 2013 06:39:50 -0700 (PDT) X-Gm-Message-State: ALoCoQmm7EDyAXO9CIAI5i2qCV1N0RY9RAWVRIFsuhct0z1Tz0Yfp/N6etTE27OlINq+Guj1hfmm X-Received: by 10.220.174.200 with SMTP id u8mr17688498vcz.6.1378733990723; Mon, 09 Sep 2013 06:39:50 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp88168vcz; Mon, 9 Sep 2013 06:39:50 -0700 (PDT) X-Received: by 10.66.3.235 with SMTP id f11mr2288944paf.178.1378733989577; Mon, 09 Sep 2013 06:39:49 -0700 (PDT) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id hg4si11899762pbc.255.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Sep 2013 06:39:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of guoqing.zhu@linaro.org) client-ip=209.85.220.42; Received: by mail-pa0-f42.google.com with SMTP id lj1so6308484pab.1 for ; Mon, 09 Sep 2013 06:39:49 -0700 (PDT) X-Received: by 10.68.255.69 with SMTP id ao5mr19308142pbd.66.1378733989016; Mon, 09 Sep 2013 06:39:49 -0700 (PDT) Received: from localhost.localdomain ([221.223.233.100]) by mx.google.com with ESMTPSA id j9sm17689746paj.18.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Sep 2013 06:39:48 -0700 (PDT) From: Guoqing Zhu To: guoqing.zhu@linaro.org Cc: patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH] Initial multinode netperf test. Date: Mon, 9 Sep 2013 21:39:33 +0800 Message-Id: <1378733973-4525-1-git-send-email-guoqing.zhu@linaro.org> X-Mailer: git-send-email 1.8.1.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: guoqing.zhu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , --- lng-netperf/netperf-client.sh | 34 +++++++++++++++++++++++ lng-netperf/netperf-server.sh | 5 ++++ lng-netperf/netperf2LAVA.py | 63 +++++++++++++++++++++++++++++++++++++++++++ netperf-client-multinode.yaml | 39 +++++++++++++++++++++++++++ netperf-server-multinode.yaml | 39 +++++++++++++++++++++++++++ 5 files changed, 180 insertions(+) create mode 100755 lng-netperf/netperf-client.sh create mode 100755 lng-netperf/netperf-server.sh create mode 100755 lng-netperf/netperf2LAVA.py create mode 100644 netperf-client-multinode.yaml create mode 100644 netperf-server-multinode.yaml diff --git a/lng-netperf/netperf-client.sh b/lng-netperf/netperf-client.sh new file mode 100755 index 0000000..324978a --- /dev/null +++ b/lng-netperf/netperf-client.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +set -x + +local_ip=$(ifconfig|grep "inet addr"|grep -v "127.0.0.1"|cut -d: -f2|cut -d' ' -f1) + +for line in `lava-group | grep server | awk '{print $1}'` ; do + echo $line + # get the ipv4 for this device + STR=`lava-network query $line ipv4` + echo "STR: "$STR + # strip off the prefix for ipv4 + DUT=`echo $STR | sed -e 's/.*addr://'` + echo "DUT: "$DUT + if [ "${local_ip}" != "${DUT}" ]; then + remote_ip=${DUT} + echo ${remote_ip} + break + fi +done + +if [ -z ${remote_ip} ] +then + echo "Missing remote ip!" + exit 1 +fi + +ifconfig -a +ping -c 1 ${remote_ip} || exit 1 +ping -c 30 ${remote_ip} | ./lng-netperf/netperf2LAVA.py +for m in 64 128 256 512 1024 2048 4096 8192 16384; do netperf -H ${remote_ip} -l 20 -c -C -- -m $m -D; done | ./lng-netperf/netperf2LAVA.py +for m in 64 128 256 512 1024 2048 4096 8192 16384; do netperf -H ${remote_ip} -l 20 -t UDP_STREAM -c -C -- -m $m -D; done | ./lng-netperf/netperf2LAVA.py +for m in 1 32 64 128 512 1024 4096 8192 16384; do netperf -t TCP_RR -H ${remote_ip} -l 20 -c -C -- -r $m,$m -D; done | ./lng-netperf/netperf2LAVA.py +for m in 1 32 64 128 512 1024 4096 8192 16384; do netperf -t UDP_RR -H ${remote_ip} -l 20 -c -C -- -r $m,$m -D; done | ./lng-netperf/netperf2LAVA.py diff --git a/lng-netperf/netperf-server.sh b/lng-netperf/netperf-server.sh new file mode 100755 index 0000000..7e2fc3c --- /dev/null +++ b/lng-netperf/netperf-server.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -x + +netserver && echo 'test_case_id:netserver units:none measurement:0 result:pass' || echo 'test_case_id:netserver units:none measurement:0 result:fail' diff --git a/lng-netperf/netperf2LAVA.py b/lng-netperf/netperf2LAVA.py new file mode 100755 index 0000000..ee1199d --- /dev/null +++ b/lng-netperf/netperf2LAVA.py @@ -0,0 +1,63 @@ +#!/usr/bin/python +import re +import sys + +#Parse netperf results looking for the data in the form of +#line = "87380 16384 2048 10.00 4289.48 51.12 51.12 3.905 3.905" ./netperf -l 10 -c -C -- -m 2048 -D +#line = "180224 8192 10.00 1654855 0 10845.1 52.60 1.589" ./netperf -t UDP_STREAM -l 10 -c -C -- -m 8192 -D +#line = "180224 10.00 1649348 10809.0 52.60 1.589" rcv side of UDP_STREAM +#line = "16384 87380 1 1 10.00 47469.68 29.84 29.84 25.146 25.146" ./netperf -t TCP_RR -l 10 -c -C -- -r 1,1 + +found_result = "false" +parser_rtt = re.compile("^rtt\s+\S+\s+\=\s+(?P\d+\.\d+)\/(?P\d+\.\d+)\/(?P\d+\.\d+)\/(?P\d+\.\d+)") +parser_tcp = re.compile("^\s*(?P\d+)\s+(?P\d+)\s+(?P\d+)\s+(?P