From patchwork Wed Apr 5 08:52:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 747160 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vyfsb2Xtqz9s78 for ; Wed, 5 Apr 2017 18:59:15 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="POANbn8H"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754306AbdDEI5s (ORCPT ); Wed, 5 Apr 2017 04:57:48 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:44375 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755001AbdDEIzk (ORCPT ); Wed, 5 Apr 2017 04:55:40 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v358sG3M031290; Wed, 5 Apr 2017 03:54:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1491382457; bh=Zqa/3Kz0kT1PsbWTNZiRaQvXTt9T3gcGYV2jIPFKarY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=POANbn8Hyj1fPRfJx/GWkk7FvksfEpPn1Q4LXGny8IlG9T5YrVHbY7dRxESCBnrCU gxN9RFY3Hr7IsPuzH5TXVcCZNXv3qZzrDJWlAliWBhKQYFW+51i9Zjn0HBnbiIg1qQ +7o4QVF5Sy9TVxklL+fPNLpgkBzLScQf2AYfjpLg= Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v358sGT1029108; Wed, 5 Apr 2017 03:54:16 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Wed, 5 Apr 2017 03:54:16 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v358qrhx012909; Wed, 5 Apr 2017 03:54:13 -0500 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Joao Pinto , , , , , , CC: , , Subject: [PATCH v6 20/23] tools: PCI: Add sample test script to invoke pcitest Date: Wed, 5 Apr 2017 14:22:40 +0530 Message-ID: <20170405085243.18123-21-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170405085243.18123-1-kishon@ti.com> References: <20170405085243.18123-1-kishon@ti.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Add a simple test script that invokes the pcitest userspace tool to perform all the PCI endpoint tests (BAR tests, interrupt tests, read tests, write tests and copy tests). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas --- tools/pci/pcitest.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 tools/pci/pcitest.sh diff --git a/tools/pci/pcitest.sh b/tools/pci/pcitest.sh new file mode 100644 index 000000000000..5442bbea4c22 --- /dev/null +++ b/tools/pci/pcitest.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +echo "BAR tests" +echo + +bar=0 + +while [ $bar -lt 6 ] +do + pcitest -b $bar + bar=`expr $bar + 1` +done +echo + +echo "Interrupt tests" +echo + +pcitest -l +msi=1 + +while [ $msi -lt 33 ] +do + pcitest -m $msi + msi=`expr $msi + 1` +done +echo + +echo "Read Tests" +echo + +pcitest -r -s 1 +pcitest -r -s 1024 +pcitest -r -s 1025 +pcitest -r -s 1024000 +pcitest -r -s 1024001 +echo + +echo "Write Tests" +echo + +pcitest -w -s 1 +pcitest -w -s 1024 +pcitest -w -s 1025 +pcitest -w -s 1024000 +pcitest -w -s 1024001 +echo + +echo "Copy Tests" +echo + +pcitest -c -s 1 +pcitest -c -s 1024 +pcitest -c -s 1025 +pcitest -c -s 1024000 +pcitest -c -s 1024001 +echo