summaryrefslogtreecommitdiffstats
path: root/tests/ide-test.c
Commit message (Collapse)AuthorAgeFilesLines
* libqos: add blkdebug_prepare_scriptJohn Snow2015-04-281-22/+1
| | | | | | | | Pull this helper out of ide-test and into libqos, to be shared with ahci-test. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1426018503-821-6-git-send-email-jsnow@redhat.com
* libqtest: add qmp_eventwaitJohn Snow2015-04-281-10/+1
| | | | | | | Allow the user to poll until a desired interrupt occurs. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1426018503-821-4-git-send-email-jsnow@redhat.com
* qtest/ide: Test flush / retry for ISA and PCIJohn Snow2015-03-101-5/+15
| | | | | | | | | | | | | | | | This patch adds tests for werror and rerror functionality for the PCI and ISA ide buses. Tests for the AHCI device are to be included at a later date after requisite patches have been merged upstream to support needed functionality by the tests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1424708286-16483-18-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qtests: Specify image format explicitlyKevin Wolf2014-12-101-4/+5
| | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416497234-29880-5-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qtest/ide: Uninitialize PC allocatorJohn Snow2014-09-081-0/+2
| | | | | | | | | | | | Use the new call to pc_alloc_uninit as a test for the new pathways. The leak checking / assert pathways are not enabled in this patch, leaving this as an option to future test writers. Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* ide: Fix segfault when flushing a device that doesn't existKevin Wolf2014-08-151-0/+14
| | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qtest/ide: Fix small memory leakJohn Snow2014-08-151-0/+2
| | | | | | | | | | | | | | For libqos debugging purposes, it's nice to be able to assert that tests and associated libraries have no memory leaks. To that end, free up the trivial cmdline leak. The remaining leaks caused by pc_alloc_init are fixed instead by my first-fit pc_alloc implementation already on the qemu-devel mailing list. Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* libqos: allow qpci_iomap to return BAR mapping sizeJohn Snow2014-08-151-1/+1
| | | | | | | | | | | This patch allows qpci_iomap to return the size of the BAR mapping that it created, to allow driver applications (e.g, ahci-test) to make determinations about the suitability or the mapping size, or in the specific case of AHCI, how many ports are supported by the HBA. Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* ide-test: add test for werror=stopPaolo Bonzini2014-08-151-0/+81
| | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qtest: Fix the bug about disable vnc causes "make check" failKewei Yu2014-01-221-3/+0
| | | | | | | | | | When we disable vnc from "./configure", QEMU can't use the vnc option. So qtest can't use the "vnc -none ", otherwise "make check" fails. If QEMU uses "-display none", "-vnc none" is excrescent, So we just need to drop it. Signed-off-by: Kewei Yu <keweihk@gmail.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* libqtest: rename qmp() to qmp_discard_response()Stefan Hajnoczi2013-11-071-4/+6
| | | | | | | | | | | | | Existing qmp() callers do not expect a response object. In order to implement real QMP test cases it will be necessary to inspect the response object. Rename qmp() to qmp_discard_response(). Later patches will introduce a qmp() function that returns the response object and tests that use it. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
* ide-test: Check what happens with bus mastering disabledKevin Wolf2013-10-281-0/+26
| | | | | | The main goal is that qemu doesn't crash. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* libqtest: New qtest_end() to go with qtest_start()Markus Armbruster2013-07-181-1/+1
| | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1371711329-9144-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ide-test: fix failure for test_flushMichael Roth2013-06-141-1/+4
| | | | | | | | | | | | | | | | | | | bd07684aacfb61668ae2c25b7dd00b64f3d7c7f3 added a test to ensure BSY flag is set when a flush request is in flight. It does this by setting a blkdebug breakpoint on flush_to_os before issuing a CMD_FLUSH_CACHE. It then resumes CMD_FLUSH_CACHE operation and checks that BSY is unset. The actual unsetting of BSY does not occur until ide_flush_cb gets called in a bh, however, so in some cases this check will race with the actual completion. Fix this by polling the ide status register until BSY flag gets unset before we do our final sanity checks. According to f68ec8379e88502b4841a110c070e9b118d3151c this is in line with how a guest would determine whether or not the device is still busy. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ide-test: Add FLUSH CACHE test caseKevin Wolf2013-06-061-0/+40
| | | | | | | | This checks in particular that BSY is set while the flush request is in flight. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* ide-test: Add enum value for DEVKevin Wolf2013-06-061-1/+2
| | | | | | | Get rid of the magic number. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* ide-test: Fix endianness problemsKevin Wolf2013-05-151-5/+27
| | | | | | | | The test case passes on big endian hosts now (tested on ppc64) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-id: 1368622839-7084-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qtest/ide-test: Test short and long PRDTsKevin Wolf2013-05-081-0/+54
| | | | | | | | This tests the behaviour of the DMA engine when the given PRDT contains physical region descriptors for either more or less bytes than the IDE request is for. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qtest/ide-test: Add simple DMA read/write test caseKevin Wolf2013-05-081-0/+221
| | | | | | | This tests that single sectors can be successfully written and correctly read back. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qtest: Add IDE test caseKevin Wolf2013-05-081-0/+165
This adds a simple IDE test case and starts by verifying that IDENTIFY can be successfully used and return the correct serial number, version and the WCE flag is set for cache=writeback. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
OpenPOWER on IntegriCloud