Re: [Qemu-devel] [PATCH 2/4] IDE: test flush on empty CDROM
On 08/08/2017 03:20 PM, Eric Blake wrote: > On 08/08/2017 12:57 PM, John Snow wrote: >> From: Kevin Wolf >> >> Signed-off-by: Kevin Wolf >> Signed-off-by: John Snow >> --- >> tests/ide-test.c | 19 +++ >> 1 file changed, 19 insertions(+) >> > >> +static void test_flush_empty_drive(void) >> +{ >> +QPCIDevice *dev; >> +QPCIBar bmdma_bar, ide_bar; >> + >> +ide_test_start("-device ide-cd,bus=ide.0"); >> +dev = get_pci_device(&bmdma_bar, &ide_bar); >> + >> +/* FLUSH CACHE command on device 0*/ > > Space before */ > > Reviewed-by: Eric Blake > > I agree with your assessment of 1 and 2 being 2.10 material. > Yep, thanks. I just wanted to include Kevin's attempt at fixing the root problem to make it clear that: (A) The root problem is known and being worked on, but (B) Is evidently not ready for prime time. I'll stage 1 & 2 with your minor typo edit here, thank you. --js
Re: [Qemu-devel] [PATCH 2/4] IDE: test flush on empty CDROM
On 08/08/2017 12:57 PM, John Snow wrote: > From: Kevin Wolf > > Signed-off-by: Kevin Wolf > Signed-off-by: John Snow > --- > tests/ide-test.c | 19 +++ > 1 file changed, 19 insertions(+) > > +static void test_flush_empty_drive(void) > +{ > +QPCIDevice *dev; > +QPCIBar bmdma_bar, ide_bar; > + > +ide_test_start("-device ide-cd,bus=ide.0"); > +dev = get_pci_device(&bmdma_bar, &ide_bar); > + > +/* FLUSH CACHE command on device 0*/ Space before */ Reviewed-by: Eric Blake I agree with your assessment of 1 and 2 being 2.10 material. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature
[Qemu-devel] [PATCH 2/4] IDE: test flush on empty CDROM
From: Kevin Wolf Signed-off-by: Kevin Wolf Signed-off-by: John Snow --- tests/ide-test.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index bfd79dd..ffbfb04 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -689,6 +689,24 @@ static void test_flush_nodev(void) ide_test_quit(); } +static void test_flush_empty_drive(void) +{ +QPCIDevice *dev; +QPCIBar bmdma_bar, ide_bar; + +ide_test_start("-device ide-cd,bus=ide.0"); +dev = get_pci_device(&bmdma_bar, &ide_bar); + +/* FLUSH CACHE command on device 0*/ +qpci_io_writeb(dev, ide_bar, reg_device, 0); +qpci_io_writeb(dev, ide_bar, reg_command, CMD_FLUSH_CACHE); + +/* Just testing that qemu doesn't crash... */ + +free_pci_device(dev); +ide_test_quit(); +} + static void test_pci_retry_flush(void) { test_retry_flush("pc"); @@ -954,6 +972,7 @@ int main(int argc, char **argv) qtest_add_func("/ide/flush", test_flush); qtest_add_func("/ide/flush/nodev", test_flush_nodev); +qtest_add_func("/ide/flush/empty_drive", test_flush_empty_drive); qtest_add_func("/ide/flush/retry_pci", test_pci_retry_flush); qtest_add_func("/ide/flush/retry_isa", test_isa_retry_flush); -- 2.9.4