From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, marc.mari.barcelo@gmail.com,
stefanha@redhat.com, pbonzini@redhat.com,
John Snow <jsnow@redhat.com>,
afaerber@suse.de
Subject: [Qemu-devel] [PATCH 1/6] qtest/ahci: Add simple flush test
Date: Mon, 23 Feb 2015 19:45:24 -0500 [thread overview]
Message-ID: <1424738729-17082-2-git-send-email-jsnow@redhat.com> (raw)
In-Reply-To: <1424738729-17082-1-git-send-email-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
tests/ahci-test.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index f536b19..378cfe5 100644
--- a/tests/ahci-test.c
+++ b/tests/ahci-test.c
@@ -774,6 +774,29 @@ static void ahci_test_io_rw_simple(AHCIQState *ahci, unsigned bufsize,
g_free(rx);
}
+static void ahci_test_nondata(AHCIQState *ahci, uint8_t ide_cmd)
+{
+ uint8_t px;
+ AHCICommand *cmd;
+
+ /* Sanitize */
+ px = ahci_port_select(ahci);
+ ahci_port_clear(ahci, px);
+
+ /* Issue Command */
+ cmd = ahci_command_create(ide_cmd);
+ ahci_command_commit(ahci, cmd, px);
+ ahci_command_issue(ahci, cmd);
+ ahci_command_verify(ahci, cmd);
+ ahci_command_free(cmd);
+}
+
+static void ahci_test_flush(AHCIQState *ahci)
+{
+ ahci_test_nondata(ahci, CMD_FLUSH_CACHE);
+}
+
+
/******************************************************************************/
/* Test Interfaces */
/******************************************************************************/
@@ -911,6 +934,15 @@ static void test_dma_fragmented(void)
g_free(tx);
}
+static void test_flush(void)
+{
+ AHCIQState *ahci;
+
+ ahci = ahci_boot_and_enable();
+ ahci_test_flush(ahci);
+ ahci_shutdown(ahci);
+}
+
/******************************************************************************/
/* AHCI I/O Test Matrix Definitions */
@@ -1150,6 +1182,8 @@ int main(int argc, char **argv)
qtest_add_func("/ahci/io/dma/lba28/fragmented", test_dma_fragmented);
+ qtest_add_func("/ahci/flush/simple", test_flush);
+
ret = g_test_run();
/* Cleanup */
--
1.9.3
next prev parent reply other threads:[~2015-02-24 0:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 0:45 [Qemu-devel] [PATCH 0/6] ahci: rerror/werror=stop resume tests John Snow
2015-02-24 0:45 ` John Snow [this message]
2015-02-24 0:45 ` [Qemu-devel] [PATCH 2/6] qtest/ahci: Allow override of default CLI options John Snow
2015-02-24 0:45 ` [Qemu-devel] [PATCH 3/6] libqtest: add qmp_eventwait John Snow
2015-02-24 0:45 ` [Qemu-devel] [PATCH 4/6] libqtest: add qmp_async John Snow
2015-02-24 0:45 ` [Qemu-devel] [PATCH 5/6] libqos: add blkdebug_prepare_script John Snow
2015-02-24 0:45 ` [Qemu-devel] [PATCH 6/6] qtest/ahci: add flush retry test John Snow
2015-02-24 17:56 ` [Qemu-devel] [PATCH 0/6] ahci: rerror/werror=stop resume tests John Snow
2015-02-26 18:17 ` 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=1424738729-17082-2-git-send-email-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=afaerber@suse.de \
--cc=kwolf@redhat.com \
--cc=marc.mari.barcelo@gmail.com \
--cc=pbonzini@redhat.com \
--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.