summaryrefslogtreecommitdiffstats
path: root/tools/pci
diff options
context:
space:
mode:
authorKishon Vijay Abraham I2017-03-27 11:45:17 +0200
committerBjorn Helgaas2017-04-28 17:23:20 +0200
commit62cb0eff82d8c64b79d3cf46a995306551beeaf3 (patch)
tree416993e089432240ec31d96e217e3387644a54ab /tools/pci
parenttools: PCI: Add a userspace tool to test PCI endpoint (diff)
downloadkernel-qcow2-linux-62cb0eff82d8c64b79d3cf46a995306551beeaf3.tar.gz
kernel-qcow2-linux-62cb0eff82d8c64b79d3cf46a995306551beeaf3.tar.xz
kernel-qcow2-linux-62cb0eff82d8c64b79d3cf46a995306551beeaf3.zip
tools: PCI: Add sample test script to invoke pcitest
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 <kishon@ti.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'tools/pci')
-rw-r--r--tools/pci/pcitest.sh56
1 files changed, 56 insertions, 0 deletions
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