qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/30] AHCI test suite framework
@ 2014-08-04 21:11 John Snow
  2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 01/30] blkdebug: report errors on flush too John Snow
                   ` (31 more replies)
  0 siblings, 32 replies; 37+ messages in thread
From: John Snow @ 2014-08-04 21:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, jsnow, stefanha, mst

This patch series introduces a number of small fixes and tweaks to
help support an AHCI test suite that in the future I hope to expand
to a fuller regression suite to help guide the development of the
AHCI device support under, in particular, the Q35 machine type in QEMU.

Paolo Bonzini has contributed a number of cleanup and refactoring patches
that support changes to the PIO setup FIS packet construction code, which
is necessary for testing ths specification adherence of the IDENTIFY command,
which issues its data exclusively via PIO mechanisms.

The ahci-test code being checked in represents a minimum of functionality
needed in order to issue and receive commands from the AHCI HBA under the
libqos / qtest environment.

In V2, as detailed below, these tests are not currently expected to pass.
I will post a complementary patch outside of this set that highlights
the exact set of tests that will not pass, which can help verify at least
the portions of these tests that do work correctly.

Assertions that currently fail:
    - Ordering of PCI capabilities as defined by either AHCI or Intel ICH9
    - Boot-time values of the PxTFD register, which should not have valid
      data until after a D2H FIS is received, but does in Qemu 2.1
    - Boot-time values of the PxSIG register, which should have a specific
      placeholder signature until the first D2H FIS is received, but is
      currently blank.
    - The "Descriptor Processed" interrupt is expected after the IDENTIFY
      command exhausts the given PRDT, but is not seen.

V2:
"ide-test: add test for werror=stop"
    - changed filename variable name
    - altered the QMP event polling to avoid sleep
    - debug_path file cleanup on exit.
"ide: stop PIO transfer on errors"
    - Modified logic to be unconditional.
"ahci: construct PIO Setup FIS for PIO commands"
    - Added in dma_memory_map success checks and error pathways.
"libqtest: Correct small memory leak."
    - Corrected raw usage of free()
"ahci: Adding basic functionality qtest."
    - Removed HBA type.
    - Corrected cleanup order.
    - Corrected raw usage of free()
    - Removed needless conditional around g_free()
    - Altered ahci_boot to return by value instead of parameter.
"ahci: Add test_pci_spec to ahci-test."
    - Removed all ifdef logic in favor of runtime tuning. (--pedantic)
    - Removed all warnings, all infractions are now hard assertions.
    - Replaced g_assert with g_assert_cmphex in many cases
"ahci: add test_pci_enable to ahci-test."
    - Removed MSI codepaths, as it was incomplete and unused.
"ahci: Add test_hba_spec to ahci-test."
    - Removed unneeded macros
    - Added in an optional bar_size return parameter to qpci_iomap
"ahci: Add test_identify case to ahci-test."
    - Corrected raw usage of free()

For convenience; https://github.com/jnsnow/qemu/tree/ahci-test-v2

John Snow (13):
  q35: Enable the ioapic device to be seen by qtest.
  qtest: Adding qtest_memset and qmemset.
  libqos: Correct memory leak
  libqtest: Correct small memory leak.
  libqos: Fixes a small memory leak.
  libqos: allow qpci_iomap to return BAR mapping size
  qtest/ide: Fix small memory leak
  ahci: Adding basic functionality qtest.
  ahci: Add test_pci_spec to ahci-test.
  ahci: add test_pci_enable to ahci-test.
  ahci: Add test_hba_spec to ahci-test.
  ahci: Add test_hba_enable to ahci-test.
  ahci: Add test_identify case to ahci-test.

Paolo Bonzini (17):
  blkdebug: report errors on flush too
  libqtest: add QTEST_LOG for debugging qtest testcases
  ide-test: add test for werror=stop
  ide: stash aiocb for flushes
  ide: simplify reset callbacks
  ide: simplify set_inactive callbacks
  ide: simplify async_cmd_done callbacks
  ide: simplify start_transfer callbacks
  ide: wrap start_dma callback
  ide: remove wrong setting of BM_STATUS_INT
  ide: fold add_status callback into set_inactive
  ide: move BM_STATUS bits to pci.[ch]
  ide: move retry constants out of BM_STATUS_* namespace
  ahci: remove duplicate PORT_IRQ_* constants
  ide: stop PIO transfer on errors
  ide: make all commands go through cmd_done
  ahci: construct PIO Setup FIS for PIO commands

 block/blkdebug.c          |   20 +
 hw/i386/pc_q35.c          |    2 +-
 hw/ide/ahci.c             |  115 ++--
 hw/ide/ahci.h             |   21 -
 hw/ide/atapi.c            |   11 +-
 hw/ide/core.c             |   94 ++-
 hw/ide/internal.h         |   38 +-
 hw/ide/macio.c            |    9 -
 hw/ide/pci.c              |   45 +-
 hw/ide/pci.h              |    7 +
 tests/Makefile            |    2 +
 tests/ahci-test.c         | 1555 +++++++++++++++++++++++++++++++++++++++++++++
 tests/ide-test.c          |   85 ++-
 tests/libqos/malloc-pc.c  |    3 +
 tests/libqos/pci-pc.c     |   12 +-
 tests/libqos/pci-pc.h     |    1 +
 tests/libqos/pci.c        |   10 +-
 tests/libqos/pci.h        |    4 +-
 tests/libqtest.c          |   20 +-
 tests/libqtest.h          |   24 +
 tests/usb-hcd-ehci-test.c |    2 +-
 21 files changed, 1892 insertions(+), 188 deletions(-)
 create mode 100644 tests/ahci-test.c

-- 
1.9.3

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2014-08-11 16:15 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-04 21:11 [Qemu-devel] [PATCH v2 00/30] AHCI test suite framework John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 01/30] blkdebug: report errors on flush too John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 02/30] libqtest: add QTEST_LOG for debugging qtest testcases John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 03/30] ide-test: add test for werror=stop John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 04/30] ide: stash aiocb for flushes John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 05/30] ide: simplify reset callbacks John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 06/30] ide: simplify set_inactive callbacks John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 07/30] ide: simplify async_cmd_done callbacks John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 08/30] ide: simplify start_transfer callbacks John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 09/30] ide: wrap start_dma callback John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 10/30] ide: remove wrong setting of BM_STATUS_INT John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 11/30] ide: fold add_status callback into set_inactive John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 12/30] ide: move BM_STATUS bits to pci.[ch] John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 13/30] ide: move retry constants out of BM_STATUS_* namespace John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 14/30] ahci: remove duplicate PORT_IRQ_* constants John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 15/30] ide: stop PIO transfer on errors John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 16/30] ide: make all commands go through cmd_done John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 17/30] ahci: construct PIO Setup FIS for PIO commands John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 18/30] q35: Enable the ioapic device to be seen by qtest John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 19/30] qtest: Adding qtest_memset and qmemset John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 20/30] libqos: Correct memory leak John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 21/30] libqtest: Correct small " John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 22/30] libqos: Fixes a " John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 23/30] libqos: allow qpci_iomap to return BAR mapping size John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 24/30] qtest/ide: Fix small memory leak John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 25/30] ahci: Adding basic functionality qtest John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 26/30] ahci: Add test_pci_spec to ahci-test John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 27/30] ahci: add test_pci_enable " John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 28/30] ahci: Add test_hba_spec " John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 29/30] ahci: Add test_hba_enable " John Snow
2014-08-04 21:11 ` [Qemu-devel] [PATCH v2 30/30] ahci: Add test_identify case " John Snow
2014-08-06  9:43 ` [Qemu-devel] [PATCH v2 00/30] AHCI test suite framework Stefan Hajnoczi
2014-08-06 11:30   ` Markus Armbruster
2014-08-06 16:50     ` John Snow
2014-08-07  6:01       ` Markus Armbruster
2014-08-07  9:26       ` Stefan Hajnoczi
2014-08-11 16:14 ` Stefan Hajnoczi

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).