[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] tests: use qtest_pc_boot()/qtest_pc_shutdow
From: |
Greg Kurz |
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 |
On Fri, 30 Sep 2016 11:56:50 +0200
Laurent Vivier <address@hidden> wrote:
> On 30/09/2016 10:33, Greg Kurz wrote:
> > On Thu, 29 Sep 2016 19:15:05 +0200
> > Laurent Vivier <address@hidden> 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
[Qemu-devel] [PATCH 2/3] qtest: evaluate endianness of the target in qtest_init(), Laurent Vivier, 2016/09/29
[Qemu-devel] [PATCH 3/3] tests: enable virtio tests on SPAPR, Laurent Vivier, 2016/09/29
Re: [Qemu-devel] [PATCH 3/3] tests: enable virtio tests on SPAPR, Greg Kurz, 2016/09/30