From patchwork Wed Oct 14 12:06:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 54911 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 53E1823012 for ; Wed, 14 Oct 2015 12:09:57 +0000 (UTC) Received: by lbbpc3 with SMTP id pc3sf24960292lbb.2 for ; Wed, 14 Oct 2015 05:09:56 -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=ZvAUwWC6/5LuBpkF2Gy+eD3YMDs4c4GwVSaXLIZj13LBzD6zQLt/lHMK/ECr1mbaHX 3OTOZDQDAvE16EAPZ8Iz5MJqITINUO3k8O7xXOaItw9tH5Jh1H0c7McMZr19laXwZNo5 qEo9ufJ3i3PynmONIFxjZ9GL2hpHzmSKg8xrEYvPEGV7ndfwPPoRPd+7c1ICQMERD06H s/47A6DazrfDIjLo74DExAQ6xChAS2TRCuLh4I03wQbG1b0BZEe/iXJCchIF5mi725dq gE52lKCD2coFT8LN9r5iWd/ilYAV/+CGmx2WY11HKwM3VSsfoBUar7Wja7dJnSZ9efqY fRlg== X-Gm-Message-State: ALoCoQkbE6d38ttFevkykitmpNEAbinHvct1iMJOvnlEzhY0O94MdSnoP5tQe21RC3yXBRvN8UQm X-Received: by 10.180.189.49 with SMTP id gf17mr5446995wic.6.1444824596316; Wed, 14 Oct 2015 05:09:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.19.100 with SMTP id j97ls32571lfi.50.gmail; Wed, 14 Oct 2015 05:09:56 -0700 (PDT) X-Received: by 10.112.63.135 with SMTP id g7mr1432712lbs.16.1444824596159; Wed, 14 Oct 2015 05:09:56 -0700 (PDT) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id x128si5336479lfd.127.2015.10.14.05.09.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 05:09:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by lffy185 with SMTP id y185so10183488lff.2 for ; Wed, 14 Oct 2015 05:09:56 -0700 (PDT) X-Received: by 10.25.77.133 with SMTP id a127mr932032lfb.19.1444824595955; Wed, 14 Oct 2015 05:09:55 -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.59.35 with SMTP id w3csp2692536lbq; Wed, 14 Oct 2015 05:09:55 -0700 (PDT) X-Received: by 10.55.209.93 with SMTP id s90mr3444136qki.55.1444824595061; Wed, 14 Oct 2015 05:09:55 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l6si7495758qkh.69.2015.10.14.05.09.46; Wed, 14 Oct 2015 05:09:55 -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 CD17961C83; Wed, 14 Oct 2015 12:09:46 +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 8464961CB8; Wed, 14 Oct 2015 12:07: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 A8DFB61C83; Wed, 14 Oct 2015 12:06:50 +0000 (UTC) Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by lists.linaro.org (Postfix) with ESMTPS id E8E0561B7D for ; Wed, 14 Oct 2015 12:06:43 +0000 (UTC) Received: by wicgb1 with SMTP id gb1so127206416wic.1 for ; Wed, 14 Oct 2015 05:06:43 -0700 (PDT) X-Received: by 10.180.92.201 with SMTP id co9mr4312989wib.58.1444824403089; Wed, 14 Oct 2015 05:06:43 -0700 (PDT) Received: from e106441.emea.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id gn9sm2638958wib.0.2015.10.14.05.06.42 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Oct 2015 05:06:42 -0700 (PDT) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Wed, 14 Oct 2015 13:06:28 +0100 Message-Id: <1444824388-25708-5-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1444824388-25708-1-git-send-email-stuart.haslam@linaro.org> References: <1444824388-25708-1-git-send-email-stuart.haslam@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 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.46 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