From: John Snow <jsnow@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com,
stefanha@redhat.com, pbonzini@redhat.com, pjp@redhat.com,
John Snow <jsnow@redhat.com>
Subject: [Qemu-devel] [PATCH 2/4] IDE: test flush on empty CDROM
Date: Tue, 8 Aug 2017 13:57:09 -0400 [thread overview]
Message-ID: <20170808175711.12203-3-jsnow@redhat.com> (raw)
In-Reply-To: <20170808175711.12203-1-jsnow@redhat.com>
From: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
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
next prev parent reply other threads:[~2017-08-08 17:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 17:57 [Qemu-devel] [PATCH 0/4] IDE: Do not flush empty drives John Snow
2017-08-08 17:57 ` [Qemu-devel] [PATCH 1/4] IDE: Do not flush empty CDROM drives John Snow
2017-08-08 19:19 ` Eric Blake
2017-08-09 9:34 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-08-08 17:57 ` John Snow [this message]
2017-08-08 19:20 ` [Qemu-devel] [PATCH 2/4] IDE: test flush on empty CDROM Eric Blake
2017-08-08 19:32 ` John Snow
2017-08-09 9:35 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-08-08 17:57 ` [Qemu-devel] [PATCH 3/4] block-backend: shift in-flight counter to BB from BDS John Snow
2017-08-08 18:34 ` Paolo Bonzini
2017-08-08 18:48 ` John Snow
2017-08-09 16:01 ` Kevin Wolf
2017-08-08 17:57 ` [Qemu-devel] [PATCH 4/4] block-backend: test flush op on empty backend John Snow
2017-08-09 16:02 ` Kevin Wolf
2017-08-09 15:53 ` [Qemu-devel] [Qemu-block] [PATCH 0/4] IDE: Do not flush empty drives Stefan Hajnoczi
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=20170808175711.12203-3-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=dgilbert@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pjp@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.