mbox

[RFC,PULL,0/6] Block sgarzare test patches

Message ID 20190212141234.2814-1-stefanha@redhat.com
State New
Headers show

Pull-request

git://github.com/stefanha/qemu.git tags/block-sgarzare-test-pull-request

Message

Stefan Hajnoczi Feb. 12, 2019, 2:12 p.m. UTC
The following changes since commit 22c5f446514a2a4bb0dbe1fea26713da92fc85fa:

  Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190211' into staging (2019-02-11 17:04:57 +0000)

are available in the Git repository at:

  git://github.com/stefanha/qemu.git tags/block-sgarzare-test-pull-request

for you to fetch changes up to bcfdf3d6971e2fd3d424d0c2ea80fdccc35d3dda:

  tests/virtio-blk: add test for WRITE_ZEROES command (2019-02-12 22:00:09 +0800)

----------------------------------------------------------------
Block pull request for testing

Peter hit a virtio-blk-test failure caused by the new DISCARD/WRITE_ZEROES
patches that Stefano and I have been unable to reproduce.  Here are the patches
so they can be tested again in Peter's environment.

----------------------------------------------------------------

Stefano Garzarella (6):
  virtio-blk: add acct_failed param to virtio_blk_handle_rw_error()
  virtio-blk: add host_features field in VirtIOBlock
  virtio-blk: add "discard" and "write-zeroes" properties
  virtio-blk: add DISCARD and WRITE_ZEROES features
  tests/virtio-blk: change assert on data_size in virtio_blk_request()
  tests/virtio-blk: add test for WRITE_ZEROES command

 include/hw/virtio/virtio-blk.h |   5 +-
 hw/block/virtio-blk.c          | 214 +++++++++++++++++++++++++++++++--
 hw/core/machine.c              |   2 +
 tests/virtio-blk-test.c        |  75 +++++++++++-
 4 files changed, 282 insertions(+), 14 deletions(-)

Comments

Peter Maydell Feb. 12, 2019, 5:04 p.m. UTC | #1
On Tue, 12 Feb 2019 at 14:12, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> ----------------------------------------------------------------
> Block pull request for testing
>
> Peter hit a virtio-blk-test failure caused by the new DISCARD/WRITE_ZEROES
> patches that Stefano and I have been unable to reproduce.  Here are the patches
> so they can be tested again in Peter's environment.
>
> ----------------------------------------------------------------

x86-64 host seems to be a bit random about whether it reproducibly
fails (it failed in the test merge builds but not when I run the
test program by hand) but aarch64 host seems more definitely
fails-every-time:

pm215@gcc113:~/qemu/build/all$
QTEST_QEMU_BINARY=ppc64-softmmu/qemu-system-ppc64 strace -tt -f -o
~/strace.log  tests/virtio-blk-test
/ppc64/virtio/blk/pci/basic: **
ERROR:/home/pm215/qemu/tests/virtio-blk-test.c:272:test_basic:
assertion failed (status == 0): (1 == 0)
Aborted (core dumped)

The strace.log from that is at
http://people.linaro.org/~peter.maydell/strace.log
(3.6MB file; the -f means it will have the trace for
both the test binary and the QEMU process it spawns).

thanks
-- PMM
Stefano Garzarella Feb. 12, 2019, 6:14 p.m. UTC | #2
On Tue, Feb 12, 2019 at 6:04 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 12 Feb 2019 at 14:12, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > ----------------------------------------------------------------
> > Block pull request for testing
> >
> > Peter hit a virtio-blk-test failure caused by the new DISCARD/WRITE_ZEROES
> > patches that Stefano and I have been unable to reproduce.  Here are the patches
> > so they can be tested again in Peter's environment.
> >
> > ----------------------------------------------------------------
>
> x86-64 host seems to be a bit random about whether it reproducibly
> fails (it failed in the test merge builds but not when I run the
> test program by hand) but aarch64 host seems more definitely
> fails-every-time:
>
> pm215@gcc113:~/qemu/build/all$
> QTEST_QEMU_BINARY=ppc64-softmmu/qemu-system-ppc64 strace -tt -f -o
> ~/strace.log  tests/virtio-blk-test
> /ppc64/virtio/blk/pci/basic: **
> ERROR:/home/pm215/qemu/tests/virtio-blk-test.c:272:test_basic:
> assertion failed (status == 0): (1 == 0)
> Aborted (core dumped)
>
> The strace.log from that is at
> http://people.linaro.org/~peter.maydell/strace.log
> (3.6MB file; the -f means it will have the trace for
> both the test binary and the QEMU process it spawns).
>
> thanks
> -- PMM

I found the error. I forgot the endianness in the test, so now it
works on ppc64 guest and x86_64 host.
Maybe the randomness of the fails was the different endianness between
guest and host.

I'll send a v5 of the series with the fix.

Thanks and sorry for that,
Stefano