From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOUAY-0006Fl-Np for qemu-devel@nongnu.org; Mon, 01 Sep 2014 12:09:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOUAP-0004Ed-4q for qemu-devel@nongnu.org; Mon, 01 Sep 2014 12:09:26 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:47244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOUAO-0004DS-Qt for qemu-devel@nongnu.org; Mon, 01 Sep 2014 12:09:17 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 1 Sep 2014 17:09:15 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id C7D9317D804E for ; Mon, 1 Sep 2014 17:11:10 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s81G9COK45875246 for ; Mon, 1 Sep 2014 16:09:12 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s81B7nqC007556 for ; Mon, 1 Sep 2014 07:07:49 -0400 Date: Mon, 1 Sep 2014 18:09:09 +0200 From: Greg Kurz Message-ID: <20140901180909.6d404d39@bahia.local> In-Reply-To: <1409566080-6313-6-git-send-email-marc.mari.barcelo@gmail.com> References: <1409566080-6313-1-git-send-email-marc.mari.barcelo@gmail.com> <1409566080-6313-6-git-send-email-marc.mari.barcelo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v8 5/7] libqos: Added test case for configuration changes in virtio-blk test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marc =?UTF-8?B?TWFyw60=?= Cc: Paolo Bonzini , qemu-devel@nongnu.org, Stefan Hajnoczi On Mon, 1 Sep 2014 12:07:58 +0200 Marc Mar=C3=AD wrote: > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Marc Mar=C3=AD > --- 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 !=3D NUL= L) and assert (2) is: tests/virtio-blk-test.c:171:pci_basic: assertion failed (status =3D=3D 0): = (2 =3D=3D 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(+) >=20 > 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(); > } >=20 > +static void pci_config(void) > +{ > + QVirtioPCIDevice *dev; > + QPCIBus *bus; > + int n_size =3D TEST_IMAGE_SIZE / 2; > + void *addr; > + uint64_t capacity; > + > + bus =3D test_start(); > + > + dev =3D virtio_blk_init(bus); > + > + /* MSI-X is not enabled */ > + addr =3D dev->addr + QVIRTIO_DEVICE_SPECIFIC_NO_MSIX; > + > + capacity =3D qvirtio_config_readq(&qvirtio_pci, &dev->vdev, addr); > + g_assert_cmpint(capacity, =3D=3D, 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_TIME= OUT)); > + > + capacity =3D qvirtio_config_readq(&qvirtio_pci, &dev->vdev, addr); > + g_assert_cmpint(capacity, =3D=3D, 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) >=20 > 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); >=20 > ret =3D g_test_run(); >=20