summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2017-03-27 05:45:17 -0400
committerBjorn Helgaas <bhelgaas@google.com>2017-04-28 11:23:20 -0400
commit62cb0eff82d8c64b79d3cf46a995306551beeaf3 (patch)
tree416993e089432240ec31d96e217e3387644a54ab /tools
parent3f2ed813483452e3f8de56ec40c97c432c16dbf1 (diff)
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')
-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 @@
1#!/bin/sh
2
3echo "BAR tests"
4echo
5
6bar=0
7
8while [ $bar -lt 6 ]
9do
10 pcitest -b $bar
11 bar=`expr $bar + 1`
12done
13echo
14
15echo "Interrupt tests"
16echo
17
18pcitest -l
19msi=1
20
21while [ $msi -lt 33 ]
22do
23 pcitest -m $msi
24 msi=`expr $msi + 1`
25done
26echo
27
28echo "Read Tests"
29echo
30
31pcitest -r -s 1
32pcitest -r -s 1024
33pcitest -r -s 1025
34pcitest -r -s 1024000
35pcitest -r -s 1024001
36echo
37
38echo "Write Tests"
39echo
40
41pcitest -w -s 1
42pcitest -w -s 1024
43pcitest -w -s 1025
44pcitest -w -s 1024000
45pcitest -w -s 1024001
46echo
47
48echo "Copy Tests"
49echo
50
51pcitest -c -s 1
52pcitest -c -s 1024
53pcitest -c -s 1025
54pcitest -c -s 1024000
55pcitest -c -s 1024001
56echo