From patchwork Fri Sep 4 13:20:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 53092 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 EDC352159E for ; Fri, 4 Sep 2015 13:25:51 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf6297552wic.2 for ; Fri, 04 Sep 2015 06:25:51 -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=S/yW/TYpPHctMvw+HzN5peAg8kQ8OQ1fQWUTwEwhqSo=; b=Qs3OdTToGlmOlW2UftZoxumFXTm8KlXwmxw88daSte5oxkA8Has/4PSLj0GKrBEB+f aHgQIdwKzSpCvbYY4hcXdk+F2R1BQ0k6tRqR2PMAFGRAGIxs7TEI3ELR56Gm9VOwRIGZ 7ZFp01QQTqPu2eq4KfxVkngaiG4NpUzmTqDTipgxX2l6hEysT6AJUfW2ahxXCpyirCkI qmEhYrIe2wxrhIreGUTbiBE6pdN7wH3OSEJDV2zxUCFw5IZsaIFF4B7ll0qasQeP1J31 MRDlPolAFJrGg7LWOqYtUeBhIzchALaRe+fbNYCCzd8gi3u+YyByRMmivW1jt1BHH2mp rCBA== X-Gm-Message-State: ALoCoQmDce4TOl2vs33PgRNmbh0NDO1Fej7w3I6xyls8oANf6mTVhK4nBxNEdJYUM45asYp2yGFO X-Received: by 10.112.138.2 with SMTP id qm2mr1035933lbb.19.1441373151280; Fri, 04 Sep 2015 06:25:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.72 with SMTP id l8ls369552lae.9.gmail; Fri, 04 Sep 2015 06:25:51 -0700 (PDT) X-Received: by 10.152.27.100 with SMTP id s4mr3770199lag.122.1441373151124; Fri, 04 Sep 2015 06:25:51 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id iz8si2302356lac.131.2015.09.04.06.25.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2015 06:25:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lamp12 with SMTP id p12so13018318lam.0 for ; Fri, 04 Sep 2015 06:25:51 -0700 (PDT) X-Received: by 10.152.5.228 with SMTP id v4mr3713183lav.36.1441373150952; Fri, 04 Sep 2015 06:25:50 -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.164.42 with SMTP id yn10csp1971610lbb; Fri, 4 Sep 2015 06:25:50 -0700 (PDT) X-Received: by 10.55.24.8 with SMTP id j8mr5041788qkh.93.1441373150052; Fri, 04 Sep 2015 06:25:50 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q9si2737477qkl.116.2015.09.04.06.25.49; Fri, 04 Sep 2015 06:25:50 -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 4393861A4E; Fri, 4 Sep 2015 13:25:49 +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 979B261804; Fri, 4 Sep 2015 13:23:01 +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 5ED1561CD3; Fri, 4 Sep 2015 13:22:53 +0000 (UTC) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by lists.linaro.org (Postfix) with ESMTPS id 1EF0461586 for ; Fri, 4 Sep 2015 13:22:18 +0000 (UTC) Received: by wiclk2 with SMTP id lk2so22597129wic.0 for ; Fri, 04 Sep 2015 06:22:17 -0700 (PDT) X-Received: by 10.180.219.106 with SMTP id pn10mr7435171wic.56.1441372937368; Fri, 04 Sep 2015 06:22:17 -0700 (PDT) Received: from e106441.emea.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id gt10sm4155421wib.20.2015.09.04.06.22.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Sep 2015 06:22:16 -0700 (PDT) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Fri, 4 Sep 2015 14:20:29 +0100 Message-Id: <1441372829-12886-5-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1441372829-12886-1-git-send-email-stuart.haslam@linaro.org> References: <1441372829-12886-1-git-send-email-stuart.haslam@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 4/4] linux-generic: pktio: add test for pcap pktio 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: stuart.haslam@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.215.45 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 If pcap is enabled in the build, add a validation test for it. Signed-off-by: Stuart Haslam --- platform/linux-generic/test/Makefile.am | 5 ++++ platform/linux-generic/test/pktio/Makefile.am | 4 +++ platform/linux-generic/test/pktio/pktio_run_pcap | 33 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100755 platform/linux-generic/test/pktio/pktio_run_pcap diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am index 7d1ce1b..11648d4 100644 --- a/platform/linux-generic/test/Makefile.am +++ b/platform/linux-generic/test/Makefile.am @@ -26,6 +26,11 @@ TESTS = pktio/pktio_run \ ${top_builddir}/test/validation/system/system_main$(EXEEXT) SUBDIRS = $(ODP_MODULES) + +if HAVE_PCAP +TESTS += pktio/pktio_run_pcap +endif + endif #performance tests refer to pktio_env diff --git a/platform/linux-generic/test/pktio/Makefile.am b/platform/linux-generic/test/pktio/Makefile.am index 93281dd..6fe2013 100644 --- a/platform/linux-generic/test/pktio/Makefile.am +++ b/platform/linux-generic/test/pktio/Makefile.am @@ -1,2 +1,6 @@ dist_bin_SCRIPTS = pktio_env \ pktio_run + +if HAVE_PCAP +dist_bin_SCRIPTS += pktio_run_pcap +endif diff --git a/platform/linux-generic/test/pktio/pktio_run_pcap b/platform/linux-generic/test/pktio/pktio_run_pcap new file mode 100755 index 0000000..c130417 --- /dev/null +++ b/platform/linux-generic/test/pktio/pktio_run_pcap @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Copyright (c) 2015, Linaro Limited +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +# directories where pktio_main binary can be found: +# -in the validation dir when running make check (intree or out of tree) +# -in the script directory, when running after 'make install', or +# -in the validation when running standalone intree. +# -in the current directory. +# running stand alone out of tree requires setting PATH +PATH=${TEST_DIR}/pktio:$PATH +PATH=$(dirname $0):$PATH +PATH=$(dirname $0)/../../../../test/validation/pktio:$PATH +PATH=.:$PATH + +pktio_main_path=$(which pktio_main${EXEEXT}) +if [ -x "$pktio_main_path" ] ; then + echo "running with $pktio_main_path" +else + echo "cannot find pktio_main${EXEEXT}: please set you PATH for it." +fi + +PCAP_FNAME=vald.pcap +export ODP_PKTIO_IF0="pcap:out=${PCAP_FNAME}" +export ODP_PKTIO_IF1="pcap:in=${PCAP_FNAME}" +pktio_main${EXEEXT} +ret=$? +rm -f ${PCAP_FNAME} +exit $ret