Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kishon Vijay Abraham I and committed by
Bjorn Helgaas
62cb0eff 3f2ed813

+56
+56
tools/pci/pcitest.sh
··· 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