All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: kvm@vger.kernel.org, Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH RFC 15/15] pci/arm: Add pci-testdev PCI device operation test
Date: Fri, 22 Apr 2016 19:33:41 +0200	[thread overview]
Message-ID: <20160422173341.zn2miw6kt37ebtxi@hawk.localdomain> (raw)
In-Reply-To: <8708e6176b157efee5811b583ab1af608aa6d44b.1460190352.git.agordeev@redhat.com>

On Mon, Apr 11, 2016 at 01:04:27PM +0200, Alexander Gordeev wrote:
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: Andrew Jones <drjones@redhat.com>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> ---
>  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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

thanks,
drew

  reply	other threads:[~2016-04-22 17:33 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 11:04 [PATCH RFC 00/15] PCI bus support Alexander Gordeev
2016-04-11 11:04 ` [PATCH RFC 01/15] Update ioremap() prototype to conform to the Linux one Alexander Gordeev
2016-04-11 11:34   ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 02/15] x86: Add basic ioremap() implementation Alexander Gordeev
2016-04-11 11:45   ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 03/15] x86/vmexit: Make use of ioremap() Alexander Gordeev
2016-04-11 11:46   ` Andrew Jones
2016-04-11 12:02     ` Alexander Gordeev
2016-04-11 11:04 ` [PATCH RFC 04/15] pci: Fix indentation in generic PCI files Alexander Gordeev
2016-04-11 11:50   ` Andrew Jones
2016-04-11 12:06     ` Alexander Gordeev
2016-04-11 12:21       ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 05/15] pci/x86: Rename pci_config_read() to pci_config_readl() Alexander Gordeev
2016-04-11 11:51   ` Andrew Jones
2016-04-13 12:55   ` Thomas Huth
2016-04-14 13:13     ` Alexander Gordeev
2016-04-11 11:04 ` [PATCH RFC 06/15] pci/x86: Add remaining PCI configuration space accessors Alexander Gordeev
2016-04-14  7:29   ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 07/15] pci: Add pci_probe() and pci_shutdown() Alexander Gordeev
2016-04-14  7:45   ` Thomas Huth
2016-04-14 13:23     ` Alexander Gordeev
2016-04-22 15:04       ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 08/15] pci: Rework pci_bar_addr() Alexander Gordeev
2016-04-13 13:28   ` Thomas Huth
2016-04-13 17:46     ` Alexander Gordeev
2016-04-13 18:05       ` Andrew Jones
2016-04-22 15:20   ` Andrew Jones
2016-04-22 15:22   ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 09/15] pci: Add pci_bar_set() Alexander Gordeev
2016-04-13 15:01   ` Thomas Huth
2016-04-13 16:38   ` Andrew Jones
2016-04-13 18:39     ` Alexander Gordeev
2016-04-14  7:30       ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 10/15] pci: Add pci_print() and pci_type_desc() Alexander Gordeev
2016-04-14  7:43   ` Thomas Huth
2016-04-14  8:34     ` Alexander Gordeev
2016-04-14  8:41       ` Thomas Huth
2016-04-14  9:42         ` Andrew Jones
2016-04-22 15:35   ` Andrew Jones
2016-05-18  9:03     ` Alexander Gordeev
2016-05-23 15:10       ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 11/15] pci/x86: Adopt PCI framework changes Alexander Gordeev
2016-04-22 15:37   ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 12/15] Factor out generic architecture code Alexander Gordeev
2016-04-14  7:50   ` Thomas Huth
2016-04-14  8:16     ` Alexander Gordeev
2016-04-22 15:40     ` Andrew Jones
2016-04-22 16:14       ` Alexander Gordeev
2016-04-22 15:54   ` Andrew Jones
2016-04-22 16:35     ` Alexander Gordeev
2016-04-26  8:24     ` Alexander Gordeev
2016-04-26  9:37       ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 13/15] pci/arm: Add generic ECAM host support Alexander Gordeev
2016-04-22 17:07   ` Andrew Jones
2016-05-29 19:54     ` Alexander Gordeev
2016-05-30  6:12       ` Andrew Jones
2016-05-30  6:28   ` Alexander Gordeev
2016-05-30  6:40     ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 14/15] pci: Add pci-testdev PCI bus test device Alexander Gordeev
2016-04-22 17:23   ` Andrew Jones
2016-05-23  8:02     ` Alexander Gordeev
2016-05-23 15:17       ` Andrew Jones
2016-05-29 17:48         ` Alexander Gordeev
2016-05-30  6:09           ` Andrew Jones
2016-04-11 11:04 ` [PATCH RFC 15/15] pci/arm: Add pci-testdev PCI device operation test Alexander Gordeev
2016-04-22 17:33   ` Andrew Jones [this message]
2016-05-29 20:03     ` Alexander Gordeev
2016-05-30  6:15       ` Andrew Jones
2016-05-31 20:13         ` Alexander Gordeev
2016-05-31 20:27           ` Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160422173341.zn2miw6kt37ebtxi@hawk.localdomain \
    --to=drjones@redhat.com \
    --cc=agordeev@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.