On Mon, Apr 11, 2016 at 01:04:27PM +0200, Alexander Gordeev wrote: > Cc: Thomas Huth <thuth@xxxxxxxxxx> > Cc: Andrew Jones <drjones@xxxxxxxxxx> > Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx> > --- > arm/Makefile.common | 1 + > arm/pci-test.c | 4 ++++ > arm/run | 10 +++++++++- > 3 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/arm/Makefile.common b/arm/Makefile.common > index 372d2ad186a2..4eac039b218d 100644 > --- a/arm/Makefile.common > +++ b/arm/Makefile.common > @@ -33,6 +33,7 @@ cflatobjs += lib/alloc.o > cflatobjs += lib/devicetree.o > cflatobjs += lib/pci.o > cflatobjs += lib/pci-host-generic.o > +cflatobjs += lib/pci-testdev.o > cflatobjs += lib/virtio.o > cflatobjs += lib/virtio-mmio.o > cflatobjs += lib/chr-testdev.o > diff --git a/arm/pci-test.c b/arm/pci-test.c > index e7a8a28f7c6d..d07e5a1f4012 100644 > --- a/arm/pci-test.c > +++ b/arm/pci-test.c > @@ -17,6 +17,10 @@ int main(void) > > pci_print(); > > + ret = pci_testdev(); > + report("PCI test device passed %d tests", > + ret >= PCI_TESTDEV_NUM_BARS * PCI_TESTDEV_NUM_TESTS, ret); > + > pci_shutdown(); > > return report_summary(); > diff --git a/arm/run b/arm/run > index ebf703d5757c..ec14bcd724e9 100755 > --- a/arm/run > +++ b/arm/run > @@ -67,8 +67,16 @@ fi > chr_testdev='-device virtio-serial-device' > chr_testdev+=' -device virtconsole,chardev=ctd -chardev testdev,id=ctd' > > +if ! $qemu $M -device '?' 2>&1 | grep pci-testdev > /dev/null; then ^extra space > + pci_testdev="-device pci-testdev" pointless assignment (*IF* we want to bail out here, but...) > + echo "$qpath doesn't support pci-testdev. Exiting." > + exit 2 Why bail out? (The code I sent you didn't) Users may want to run kvm-unit-tests with a QEMU that doesn't support pci-testdev. There will still be plenty (someday) of tests that don't require it, so we should proceed. Only the pci-test should fail, and it should fail with an informative message. Actually the unit test should probably make use of xfail, like this have_testdev = pci_testdev_probe(); ret = pci_testdev_run(); report_xfail("PCI test device passed...", !have_testdev, ret, ...); > +fi > + > +pci_testdev='-device pci-testdev' > + > M+=",accel=$ACCEL" > -command="$qemu $M -cpu $processor $chr_testdev" > +command="$qemu $M -cpu $processor $chr_testdev $pci_testdev" > command+=" -display none -serial stdio -kernel" > command="$(timeout_cmd) $command" > echo $command "$@" > -- > 1.8.3.1 > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html thanks, drew -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html