From: John Snow <jsnow@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH v2 4/4] qtest/ahci: add port_reset test
Date: Tue, 16 Jun 2015 12:02:55 -0400 [thread overview]
Message-ID: <1434470575-21625-5-git-send-email-jsnow@redhat.com> (raw)
In-Reply-To: <1434470575-21625-1-git-send-email-jsnow@redhat.com>
Test that we can survive a couple of cycles of running a basic identify
test, some IO, and resetting the HBA. Ensures that we can bring the HBA
back to compliant spec during the lifecycle of the VM.
Signed-off-by: John Snow <jsnow@redhat.com>
---
tests/ahci-test.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index 5148328..43da3d1 100644
--- a/tests/ahci-test.c
+++ b/tests/ahci-test.c
@@ -1372,6 +1372,29 @@ static void test_max(void)
ahci_shutdown(ahci);
}
+static void test_reset(void)
+{
+ AHCIQState *ahci;
+ int i;
+
+ ahci = ahci_boot(NULL);
+ ahci_test_pci_spec(ahci);
+ ahci_pci_enable(ahci);
+
+ for (i = 0; i < 2; i++) {
+ ahci_test_hba_spec(ahci);
+ ahci_hba_enable(ahci);
+ ahci_test_identify(ahci);
+ ahci_test_io_rw_simple(ahci, 4096, 0,
+ CMD_READ_DMA_EXT,
+ CMD_WRITE_DMA_EXT);
+ ahci_set(ahci, AHCI_GHC, AHCI_GHC_HR);
+ ahci_clean_mem(ahci);
+ }
+
+ ahci_shutdown(ahci);
+}
+
/******************************************************************************/
/* AHCI I/O Test Matrix Definitions */
@@ -1628,6 +1651,7 @@ int main(int argc, char **argv)
qtest_add_func("/ahci/migrate/dma/halted", test_migrate_halted_dma);
qtest_add_func("/ahci/max", test_max);
+ qtest_add_func("/ahci/reset", test_reset);
ret = g_test_run();
--
2.1.0
next prev parent reply other threads:[~2015-06-16 16:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 16:02 [Qemu-devel] [PATCH v2 0/4] ahci: misc fixes/tests for 2.4 John Snow
2015-06-16 16:02 ` [Qemu-devel] [PATCH v2 1/4] ahci: Do not ignore memory access read size John Snow
2015-06-16 16:25 ` Eric Blake
2015-06-16 19:03 ` John Snow
2015-06-16 16:02 ` [Qemu-devel] [PATCH v2 2/4] qtest/ahci: add test_max John Snow
2015-06-16 16:02 ` [Qemu-devel] [PATCH v2 3/4] libqos/ahci: fix memory management bugs John Snow
2015-06-16 16:02 ` John Snow [this message]
2015-06-29 21:16 ` [Qemu-devel] [PATCH v2 0/4] ahci: misc fixes/tests for 2.4 John Snow
2015-07-01 17:51 ` John Snow
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=1434470575-21625-5-git-send-email-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=kwolf@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).