From: Greg Kurz <groug@kaod.org>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org, dgibson@redhat.com, thuth@redhat.com,
qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] tests: use qtest_pc_boot()/qtest_pc_shutdown() in virtio tests
Date: Fri, 30 Sep 2016 12:34:46 +0200 [thread overview]
Message-ID: <20160930123446.480322e7@bahia> (raw)
In-Reply-To: <0ee7d079-1a51-841a-bf83-29037628f021@redhat.com>
On Fri, 30 Sep 2016 11:56:50 +0200
Laurent Vivier <lvivier@redhat.com> wrote:
> On 30/09/2016 10:33, Greg Kurz wrote:
> > On Thu, 29 Sep 2016 19:15:05 +0200
> > Laurent Vivier <lvivier@redhat.com> wrote:
> ...
> >> @@ -230,9 +227,6 @@ static void test_unaligned_write_same(void)
> >> 0x41, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x33, 0x00, 0x00
> >> };
> >>
> >> - qvirtio_scsi_start("-drive file=blkdebug::null-co://,if=none,id=dr1"
> >> - ",format=raw,file.align=4k "
> >> - "-device scsi-disk,drive=dr1,lun=0,scsi-id=1");
> >> vs = qvirtio_scsi_pci_init(PCI_SLOT);
> >>
> >> g_assert_cmphex(0, ==,
> >> @@ -242,7 +236,7 @@ static void test_unaligned_write_same(void)
> >> virtio_scsi_do_command(vs, write_same_cdb_2, NULL, 0, buf2, 512, NULL));
> >>
> >> qvirtio_scsi_pci_free(vs);
> >> - qvirtio_scsi_stop();
> >> + qvirtio_scsi_stop(vs->qs);
> >
> > Is still vs->qs still valid ? Also it looks wrong to call qvirtio_scsi_stop()
> > without any prior call to qvirtio_scsi_start()...
>
> The qvirtio_scsi_start() is called by qvirtio_scsi_pci_init().
>
> Laurent
I guess qvirtio_scsi_pci_free() should call qvirtio_scsi_stop() as well then.
Also, it looks like vs is leaked, but this is already the case with the
current code. Maybe worth fixing that first.
Cheers.
--
Greg
next prev parent reply other threads:[~2016-09-30 10:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 17:15 [Qemu-devel] [PATCH 0/3] tests: enable virtio tests on SPAPR Laurent Vivier
2016-09-29 17:15 ` [Qemu-devel] [PATCH 1/3] tests: use qtest_pc_boot()/qtest_pc_shutdown() in virtio tests Laurent Vivier
2016-09-30 1:27 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-09-30 6:56 ` Laurent Vivier
2016-09-30 8:33 ` [Qemu-devel] " Greg Kurz
2016-09-30 9:13 ` Laurent Vivier
2016-09-30 10:29 ` Greg Kurz
2016-09-30 10:33 ` Laurent Vivier
2016-09-30 9:56 ` Laurent Vivier
2016-09-30 10:34 ` Greg Kurz [this message]
2016-09-29 17:15 ` [Qemu-devel] [PATCH 2/3] qtest: evaluate endianness of the target in qtest_init() Laurent Vivier
2016-09-30 1:29 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-09-29 17:15 ` [Qemu-devel] [PATCH 3/3] tests: enable virtio tests on SPAPR Laurent Vivier
2016-09-30 1:30 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-09-30 6:59 ` Laurent Vivier
2016-09-30 9:06 ` David Gibson
2016-09-30 10:18 ` [Qemu-devel] " Greg Kurz
2016-09-30 10:30 ` Laurent Vivier
2016-09-30 10:52 ` Greg Kurz
2016-09-30 15:19 ` John Snow
2016-10-01 12:14 ` Greg Kurz
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=20160930123446.480322e7@bahia \
--to=groug@kaod.org \
--cc=dgibson@redhat.com \
--cc=lvivier@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).