From patchwork Wed Aug 5 15:26:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 51958 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id ACE0A229FD for ; Wed, 5 Aug 2015 15:29:51 +0000 (UTC) Received: by labkp1 with SMTP id kp1sf16812542lab.0 for ; Wed, 05 Aug 2015 08:29:50 -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=BYu5CwdQhGh+DuNkcvwJOKxGEv+zujctT+L3GogEls5gqpBgz1z7KgtSvsI9vNYQYy 4v7pAEdW8uqMeGc4/U3SUoKk2YLlGMnQfxPgnRAsftwjcXmKmakVKfmTKy3tGeWQK4Jg mcADCxKKmwzijN/5xgGxE4q1XJqdoejRs82FwjO3hTrmCaSiJAS7k8wy6fuZxjpdR2J4 flamHSdin0W4zPQy4MGuIS6ScUXWw6c3zON011QuirtSTZ06AI/dSU6eL2BGTiAsh36f 3qbmMUIXlnck2De96nwhfheuID/pY044/NV7fVWSxQ69o60/gbfQP/dDSNlYiIAWMDx0 Jt2w== X-Gm-Message-State: ALoCoQnADGeUUoMFI/x1yYavJd04svSUplpfRWCeHyOVtkN1T4YKraFfAtC4HapEu8PJ05ABb0nC X-Received: by 10.194.19.33 with SMTP id b1mr2928677wje.6.1438788590628; Wed, 05 Aug 2015 08:29:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.161 with SMTP id x1ls188618lal.45.gmail; Wed, 05 Aug 2015 08:29:50 -0700 (PDT) X-Received: by 10.152.27.134 with SMTP id t6mr9909151lag.100.1438788590454; Wed, 05 Aug 2015 08:29:50 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id uh3si278430lac.125.2015.08.05.08.29.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2015 08:29:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by labkb6 with SMTP id kb6so9377926lab.2 for ; Wed, 05 Aug 2015 08:29:50 -0700 (PDT) X-Received: by 10.112.133.72 with SMTP id pa8mr9657012lbb.117.1438788590327; Wed, 05 Aug 2015 08:29: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.7.198 with SMTP id l6csp435949lba; Wed, 5 Aug 2015 08:29:49 -0700 (PDT) X-Received: by 10.50.117.98 with SMTP id kd2mr11484249igb.78.1438788588683; Wed, 05 Aug 2015 08:29:48 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p3si2722681ioe.59.2015.08.05.08.29.46; Wed, 05 Aug 2015 08:29:48 -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 3B86D61FC4; Wed, 5 Aug 2015 15:29:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal 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 ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5DA8B61FC8; Wed, 5 Aug 2015 15:27:26 +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 6D81561FB9; Wed, 5 Aug 2015 15:27:02 +0000 (UTC) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by lists.linaro.org (Postfix) with ESMTPS id D471261F43 for ; Wed, 5 Aug 2015 15:26:59 +0000 (UTC) Received: by wijp15 with SMTP id p15so53284212wij.0 for ; Wed, 05 Aug 2015 08:26:59 -0700 (PDT) X-Received: by 10.180.187.193 with SMTP id fu1mr11452478wic.75.1438788419119; Wed, 05 Aug 2015 08:26:59 -0700 (PDT) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id y13sm4637638wjq.26.2015.08.05.08.26.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Aug 2015 08:26:58 -0700 (PDT) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Wed, 5 Aug 2015 16:26:42 +0100 Message-Id: <1438788402-9250-4-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1438788402-9250-1-git-send-email-stuart.haslam@linaro.org> References: <1438788402-9250-1-git-send-email-stuart.haslam@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 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.42 as permitted sender) smtp.mail=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