[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/35] qtest/ahci: add port_reset test
From: |
John Snow |
Subject: |
[Qemu-devel] [PULL 04/35] qtest/ahci: add port_reset test |
Date: |
Sat, 4 Jul 2015 02:06:43 -0400 |
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 <address@hidden>
Message-id: address@hidden
---
tests/ahci-test.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index a7b4df2..0a0ef2a 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
*/
@@ -1623,6 +1646,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
- [Qemu-devel] [PULL 00/35] Ide patches, John Snow, 2015/07/04
- [Qemu-devel] [PULL 01/35] ahci: Do not ignore memory access read size, John Snow, 2015/07/04
- [Qemu-devel] [PULL 05/35] ahci: Rename NCQFIS structure fields, John Snow, 2015/07/04
- [Qemu-devel] [PULL 02/35] qtest/ahci: add test_max, John Snow, 2015/07/04
- [Qemu-devel] [PULL 06/35] ahci: use shorter variables, John Snow, 2015/07/04
- [Qemu-devel] [PULL 04/35] qtest/ahci: add port_reset test,
John Snow <=
- [Qemu-devel] [PULL 03/35] libqos/ahci: fix memory management bugs, John Snow, 2015/07/04
- [Qemu-devel] [PULL 07/35] ahci: add ncq_err helper, John Snow, 2015/07/04
- [Qemu-devel] [PULL 08/35] ahci: check for ncq prdtl overflow, John Snow, 2015/07/04
- [Qemu-devel] [PULL 09/35] ahci: separate prdtl from opts, John Snow, 2015/07/04
- [Qemu-devel] [PULL 10/35] ahci: add ncq debug checks, John Snow, 2015/07/04
- [Qemu-devel] [PULL 11/35] ahci: ncq sector count correction, John Snow, 2015/07/04
- [Qemu-devel] [PULL 12/35] ahci/qtest: Execute IDENTIFY prior to data commands, John Snow, 2015/07/04
- [Qemu-devel] [PULL 13/35] libqos/ahci: fix cmd_sanity for ncq, John Snow, 2015/07/04
- [Qemu-devel] [PULL 14/35] libqos/ahci: add NCQ frame support, John Snow, 2015/07/04
- [Qemu-devel] [PULL 17/35] libqos/ahci: set the NCQ tag on command_commit, John Snow, 2015/07/04