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