All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <gkurz@linux.vnet.ibm.com>
To: "Marc Marí" <marc.mari.barcelo@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v8 5/7] libqos: Added test case for configuration changes in virtio-blk test
Date: Mon, 1 Sep 2014 18:09:09 +0200	[thread overview]
Message-ID: <20140901180909.6d404d39@bahia.local> (raw)
In-Reply-To: <1409566080-6313-6-git-send-email-marc.mari.barcelo@gmail.com>

On Mon,  1 Sep 2014 12:07:58 +0200
Marc Marí <marc.mari.barcelo@gmail.com> wrote:
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Marc Marí <marc.mari.barcelo@gmail.com>
> ---

Hi Marc,

I gave it a try for various host/target combinations involving ppc64 and
x86_64. Here is what I get:

        |   x86_64   |    ppc64    | TARGET
        +------------+-------------+--------
x86_64  |     OK     | assert  (1) |
--------+------------+-------------+
ppc64   | assert (2) | assert  (1) |
--------+------------+-------------+
ppc64le |     OK     | assert  (1) |
--------+------------+-------------+
  HOST  |

where OK means:

/virtio/blk/pci/basic: OK
/virtio/blk/pci/indirect: OK
/virtio/blk/pci/config: OK
/virtio/blk/pci/msix: OK
/virtio/blk/pci/idx: OK

and assert (1) is:

tests/virtio-blk-test.c:87:virtio_blk_init: assertion failed: (dev != NULL)

and assert (2) is:

tests/virtio-blk-test.c:171:pci_basic: assertion failed (status == 0): (2 == 0)

I will investigate further but the first column in the array ^^ seems to
indicate that there's some endianness bug.

Cheers.

--
Greg

>  tests/virtio-blk-test.c |   34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
> 
> diff --git a/tests/virtio-blk-test.c b/tests/virtio-blk-test.c
> index 95e6861..07ae754 100644
> --- a/tests/virtio-blk-test.c
> +++ b/tests/virtio-blk-test.c
> @@ -359,6 +359,39 @@ static void pci_indirect(void)
>      test_end();
>  }
> 
> +static void pci_config(void)
> +{
> +    QVirtioPCIDevice *dev;
> +    QPCIBus *bus;
> +    int n_size = TEST_IMAGE_SIZE / 2;
> +    void *addr;
> +    uint64_t capacity;
> +
> +    bus = test_start();
> +
> +    dev = virtio_blk_init(bus);
> +
> +    /* MSI-X is not enabled */
> +    addr = dev->addr + QVIRTIO_DEVICE_SPECIFIC_NO_MSIX;
> +
> +    capacity = qvirtio_config_readq(&qvirtio_pci, &dev->vdev, addr);
> +    g_assert_cmpint(capacity, ==, TEST_IMAGE_SIZE / 512);
> +
> +    qvirtio_set_driver_ok(&qvirtio_pci, &dev->vdev);
> +
> +    qmp("{ 'execute': 'block_resize', 'arguments': { 'device': 'drive0', "
> +                                                    " 'size': %d } }", n_size);
> +    g_assert(qvirtio_wait_isr(&qvirtio_pci, &dev->vdev, 0x2,
> +                                                        QVIRTIO_BLK_TIMEOUT));
> +
> +    capacity = qvirtio_config_readq(&qvirtio_pci, &dev->vdev, addr);
> +    g_assert_cmpint(capacity, ==, n_size / 512);
> +
> +    qvirtio_pci_device_disable(dev);
> +    g_free(dev);
> +    test_end();
> +}
> +
>  int main(int argc, char **argv)
>  {
>      int ret;
> @@ -367,6 +400,7 @@ int main(int argc, char **argv)
> 
>      g_test_add_func("/virtio/blk/pci/basic", pci_basic);
>      g_test_add_func("/virtio/blk/pci/indirect", pci_indirect);
> +    g_test_add_func("/virtio/blk/pci/config", pci_config);
> 
>      ret = g_test_run();
> 

  reply	other threads:[~2014-09-01 16:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 10:07 [Qemu-devel] [PATCH v8 0/7] Virtio PCI libqos driver Marc Marí
2014-09-01 10:07 ` [Qemu-devel] [PATCH v8 1/7] tests: Functions bus_foreach and device_find from libqos virtio API Marc Marí
2014-09-01 10:07 ` [Qemu-devel] [PATCH v8 2/7] tests: Add virtio device initialization Marc Marí
2014-09-01 10:07 ` [Qemu-devel] [PATCH v8 3/7] libqos: Added basic virtqueue support to virtio implementation Marc Marí
2014-09-01 10:07 ` [Qemu-devel] [PATCH v8 4/7] libqos: Added indirect descriptor " Marc Marí
2014-09-01 10:07 ` [Qemu-devel] [PATCH v8 5/7] libqos: Added test case for configuration changes in virtio-blk test Marc Marí
2014-09-01 16:09   ` Greg Kurz [this message]
2014-09-01 16:27     ` Marc Marí
2014-09-01 21:11       ` Marc Marí
2014-09-02  9:57         ` Stefan Hajnoczi
2014-09-02 11:13       ` Greg Kurz
2014-09-02 15:26         ` [Qemu-devel] [PATCH] libqos: fix endianness bug in virtio-blk-test Greg Kurz
2014-09-01 10:07 ` [Qemu-devel] [PATCH v8 6/7] libqos: Added MSI-X support Marc Marí
2014-09-01 10:08 ` [Qemu-devel] [PATCH v8 7/7] libqos: Added EVENT_IDX support Marc Marí

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=20140901180909.6d404d39@bahia.local \
    --to=gkurz@linux.vnet.ibm.com \
    --cc=marc.mari.barcelo@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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.