On 30/09/2016 10:33, Greg Kurz wrote: > On Thu, 29 Sep 2016 19:15:05 +0200 > Laurent Vivier <lviv...@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