Skip to content

Commit

Permalink
tools: pci: add sample test script to invoke pcitest
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Sekhar Nori <[email protected]>
  • Loading branch information
kishon authored and nsekhar committed Oct 21, 2016
1 parent 0f0f26d commit abe0b0f
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions tools/pci/pcitest.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit abe0b0f

Please sign in to comment.