aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-02-02Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into stagingPeter Maydell6-65/+290
This series is mostly about 9p request cancellation. It fixes a long standing bug (read "specification violation") where the server would send an invalid response when the client has cancelled an in-flight request. This was causing annoying spurious EINTR returns in linux. The fix comes with some related testing in QTEST. Other patches are code cleanup and improvements. # gpg: Signature made Fri 02 Feb 2018 10:16:03 GMT # gpg: using RSA key 71D4D5E5822F73D6 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" # gpg: aka "Gregory Kurz <gregory.kurz@free.fr>" # gpg: aka "[jpeg image of size 3330]" # Primary key fingerprint: B482 8BAF 9431 40CE F2A3 4910 71D4 D5E5 822F 73D6 * remotes/gkurz/tags/for-upstream: tests/virtio-9p: explicitly handle potential integer overflows tests: virtio-9p: add FLUSH operation test libqos/virtio: return length written into used descriptor tests: virtio-9p: add WRITE operation test tests: virtio-9p: add LOPEN operation test tests: virtio-9p: use the synth backend tests: virtio-9p: wait for completion in the test code tests: virtio-9p: move request tag to the test functions 9pfs: Correctly handle cancelled requests 9pfs: drop v9fs_register_transport() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-02tests/virtio-9p: explicitly handle potential integer overflowsGreg Kurz1-10/+21
Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-02-02tests: virtio-9p: add FLUSH operation testGreg Kurz1-13/+104
The idea is to send a victim request that will possibly block in the server and to send a flush request to cancel the victim request. This patch adds two test to verifiy that: - the server does not reply to a victim request that was actually cancelled - the server replies to the flush request after replying to the victim request if it could not cancel it 9p request cancellation reference: http://man.cat-v.org/plan_9/5/flush Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> (groug, change the test to only write a single byte to avoid any alignment or endianess consideration)
2018-02-02libqos/virtio: return length written into used descriptorGreg Kurz6-25/+38
When a 9p request is flushed (ie, cancelled) by the guest, the device is expected to simply mark the request as used, without sending a 9p reply (ie, without writing anything into the used buffer). To be able to test this, we need access to the length written by the device into the used descriptor. This patch adds a uint32_t * argument to qvirtqueue_get_buf() and qvirtio_wait_used_elem() for this purpose. All existing users are updated accordingly. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-02-01tests: virtio-9p: add WRITE operation testGreg Kurz1-0/+63
Trivial test of a successful write. Signed-off-by: Greg Kurz <groug@kaod.org> (groug, handle potential overflow when computing request size, add missing g_free(buf), backend handles one written byte at a time to validate the server doesn't do short-reads) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-02-01tests: virtio-9p: add LOPEN operation testGreg Kurz1-0/+47
Trivial test of a successful open. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-02-01tests: virtio-9p: use the synth backendGreg Kurz1-16/+6
The purpose of virtio-9p-test is to test the virtio-9p device, especially the 9p server state machine. We don't really care what fsdev backend we're using. Moreover, if we want to be able to test the flush request or a device reset with in-flights I/O, it is close to impossible to achieve with a physical backend because we cannot ask it reliably to put an I/O on hold at a specific point in time. Fortunately, we can do that with the synthetic backend, which allows to register callbacks on read/write accesses to a specific file. This will be used by a later patch to test the 9P flush request. The walk request test is converted to using the synth backend. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-02-01tests: virtio-9p: wait for completion in the test codeGreg Kurz1-2/+12
In order to test request cancellation, we will need to send multiple requests and wait for the associated replies. Since we poll the ISR to know if a request completed, we may have several replies to parse when we detect ISR was set to 1. This patch moves the waiting out of the reply parsing path, up into the functional tests. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-02-01tests: virtio-9p: move request tag to the test functionsGreg Kurz1-14/+14
It doesn't really makes sense to hide the request tag from the test functions. It prevents to test the 9p server behavior when passed a wrong tag (ie, still in use or different from P9_NOTAG for a version request). Also the spec says that a tag is reusable as soon as the corresponding request was replied or flushed: no need to always increment tags like we do now. And finaly, an upcoming test of the flush command will need to manipulate tags explicitely. This simply changes all request functions to have a tag argument. Except for the version request which needs P9_NOTAG, all other tests can pass 0 since they wait for the reply before sending another request. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-01-31iotests: Make 200 run on tmpfsMax Reitz1-1/+1
200 currently fails on tmpfs because it sets cache=none. However, without that (and aio=native), the test still works now and it fails before Jeff's series (on fc7dbc119e0852a70dc9fa68bb41a318e49e4cd6). So we can probably remove the aio=native safely, and replace cache=none by cache=$CACHEMODE. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Message-id: 20180117135015.15051-1-mreitz@redhat.com Signed-off-by: Jeff Cody <jcody@redhat.com>
2018-01-29tpm: add CRB deviceMarc-André Lureau2-0/+277
tpm_crb is a device for TPM 2.0 Command Response Buffer (CRB) Interface as defined in TCG PC Client Platform TPM Profile (PTP) Specification Family “2.0” Level 00 Revision 01.03 v22. The PTP allows device implementation to switch between TIS and CRB model at run time, but given that CRB is a simpler device to implement, I chose to implement it as a different device. The device doesn't implement other locality than 0 for now (my laptop TPM doesn't either, so I assume this isn't so bad) Tested with some success with Linux upstream and Windows 10, seabios & modified ovmf. The device is recognized and correctly transmit command/response with passthrough & emu. However, we are missing PPI ACPI part atm. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-01-26iotest 205: new test for qmp nbd-server-removeVladimir Sementsov-Ogievskiy3-0/+162
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20180119135719.24745-6-vsementsov@virtuozzo.com> [eblake: adjust to next available test number] Signed-off-by: Eric Blake <eblake@redhat.com>
2018-01-26iotests: implement QemuIoInteractive classVladimir Sementsov-Ogievskiy1-0/+38
Implement QemuIoInteractive to test nbd-server-remove command when there are active connections. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20180119135719.24745-5-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2018-01-26iotest 147: add cases to test new @name parameter of nbd-server-addVladimir Sementsov-Ogievskiy2-15/+57
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180119135719.24745-4-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2018-01-24Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell41-591/+682
Block layer patches # gpg: Signature made Tue 23 Jan 2018 12:38:36 GMT # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (29 commits) iotests: Disable some tests for compat=0.10 iotests: Split 177 into two parts for compat=0.10 iotests: Make 059 pass on machines with little RAM iotests: Filter compat-dependent info in 198 iotests: Make 191 work with qcow2 options iotests: Make 184 image-less iotests: Make 089 compatible with compat=0.10 iotests: Fix 067 for compat=0.10 iotests: Fix 059's reference output iotests: Fix 051 for compat=0.10 iotests: Fix 020 for vmdk iotests: Skip 103 for refcount_bits=1 iotests: Forbid 020 for non-file protocols iotests: Drop format-specific in _filter_img_info iotests: Fix _img_info for backslashes block/vmdk: Add blkdebug events block/qcow: Add blkdebug events qcow2: No persistent dirty bitmaps for compat=0.10 block/vmdk: Fix , instead of ; at end of line qemu-iotests: Fix locking issue in 102 ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-01-23iotests: Disable some tests for compat=0.10Max Reitz4-2/+9
Tests 080, 130, 137, and 176 simply do not work with compat=0.10 for the reasons stated there. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20171123020832.8165-10-mreitz@redhat.com> [eblake: fix 177 in a separate commit] Signed-off-by: Eric Blake <eblake@redhat.com> Message-id: 20180117165420.15946-3-eblake@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Split 177 into two parts for compat=0.10Eric Blake5-32/+193
When originally written, test 177 explicitly took care to run with compat=0.10. Then I botched my own test in commit 81c219ac and f0a9c18f, by adding additional actions that require v3 images. Split out the new code into a new v3-only test, 204, and revert 177 back to its original state other than a new comment. Reported-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Message-id: 20180117165420.15946-2-eblake@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Make 059 pass on machines with little RAMMax Reitz1-1/+3
Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171129192411.6637-1-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Filter compat-dependent info in 198Max Reitz2-10/+4
There is a bit of image-specific information which depends on the qcow2 compat level. Filter it so that 198 works with compat=0.10 (and any refcount_bits value). Note that we cannot simply drop the --format-specific switch because we do need the "encrypt" information. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-18-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Make 191 work with qcow2 optionsMax Reitz2-227/+91
In order for 191 to work with an explicit refcount_bits or compat=0.10, we should strip format-specific information from the output--and we can do so by using _filter_img_info. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-17-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Make 184 image-lessMax Reitz2-74/+14
184 does not need an image, so don't use one. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-16-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Make 089 compatible with compat=0.10Max Reitz2-12/+2
The only thing that is missing is a _filter_img_info after the "$QEMU_IO -c info" invocations. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-15-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Fix 067 for compat=0.10Max Reitz2-72/+28
067 works very well with compat=0.10 once you remove format-specific information from the QMP output. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-14-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Fix 059's reference outputMax Reitz1-1/+1
As of commit 9877860e7bd1e26ee70ab9bb5ebc34c92bf23bf5, vmdk fails differently when opening the sample image. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-13-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Fix 051 for compat=0.10Max Reitz3-0/+4
051 has both compat=1.1 and compat=0.10 tests (once it uses lazy_refcounts, once it tests that setting them does not work). For the compat=0.10 tests, it already explicitly creates a suitable image. So let's just ignore the user-specified compat level for the lazy_refcounts test and explicitly create a compat=1.1 image there, too. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-12-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Fix 020 for vmdkMax Reitz2-5/+10
vmdk cannot work with anything but vmdk backing files, so make the backing file be the same format as the overlay. Reported-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-11-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Skip 103 for refcount_bits=1Max Reitz1-0/+2
Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-9-mreitz@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Forbid 020 for non-file protocolsMax Reitz1-7/+1
This test does funny things like TEST_IMG="TEST_IMG.base" _make_test_img that usually only work with the file protocol. More specifically, they do not work with the most interesting non-file protocols, so we might as well skip this for anything but file. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-8-mreitz@redhat.com Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Drop format-specific in _filter_img_infoMax Reitz2-3/+32
_filter_img_info should remove format-specific information, too. We already have such a filter in _img_info, and it is very useful for query-block-named-block-nodes (etc.), too. However, in 198 we need that information (but we still want the rest of the filter), so make that filtering optional. Note that "the rest of the filter" includes filtering of the test directory, so we can drop the _filter_testdir from 198 at the same time. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-7-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Fix _img_info for backslashesMax Reitz1-1/+1
read without -r eats backslashes. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171123020832.8165-6-mreitz@redhat.com Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23qemu-iotests: Fix locking issue in 102Max Reitz2-2/+8
102 truncates a qcow2 file (the raw file) on purpose while a VM is running. However, image locking will usually prevent exactly this. The fact that most people have not noticed until now (I suppose you may have seen sporadic failures, but not taken them too seriously, like me) further shows that this truncation is actually not really done concurrently, but that the VM is still starting up by this point and has not yet opened the image. Remedy this by waiting for the monitor shell to appear before the qemu-img invocation so we know the VM is up. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171129185102.29390-1-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23blockdev: Mark BD-{remove,insert}-medium stableMax Reitz4-16/+16
Now that iotest 093 test proves that the throttling configuration survives a blockdev-remove-medium/blockdev-insert-medium pair, the original reason for declaring these commands experimental is gone (see commit 6e0abc251dd4f8eba1f53656dfede12e5840e83b). Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171110224302.14424-5-mreitz@redhat.com Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23tests/ahci: Switch tray and medium commands to @idMax Reitz1-6/+6
Currently, the tray and medium commands in the AHCI test use the deprecated @device parameter. This patch switches all invocations over to use @id. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171110224302.14424-3-mreitz@redhat.com Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23iotests: Make BD-{remove,insert}-medium use @idMax Reitz2-131/+113
In some cases, these commands still use the deprecated @device parameter. Fix that so we can later drop that parameter from their interface. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171110224302.14424-2-mreitz@redhat.com Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23qcow2: Repair unaligned preallocated zero clustersMax Reitz2-1/+11
We can easily repair unaligned preallocated zero clusters by discarding them, so why not do it? Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171110203759.14018-2-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-01-23tests/qemu-iotests: adding savevm/loadvm with postcopy flag testDaniel Henrique Barboza3-0/+144
This patch implements a test case for the scenario that was failing prior to the patch "migration/ram.c: do not set 'postcopy_running' in POSTCOPY_INCOMING_END", commit acab30b85d. This new test file 201 was derived from the test file 181 authored by Kevin Wolf. CC: Kevin Wolf <kwolf@redhat.com> CC: Max Reitz <mreitz@redhat.com> CC: Cleber Rosa <crosa@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-01-23tests/.gitignore: Add test-bdrv-drainKevin Wolf1-0/+1
Commit 881cfd17 added a new test binary, include it in .gitignore. Reported-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2018-01-23Merge remote-tracking branch 'remotes/huth/tags/pull-request-2018-01-22' ↵Peter Maydell3-137/+271
into staging Pull request for various patches that have been reviewed and laying on the mailing list for a while, but apparently no maintainer feels really responsible for picking up. # gpg: Signature made Mon 22 Jan 2018 11:10:16 GMT # gpg: using RSA key 0x2ED9D774FE702DB5 # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" # gpg: aka "Thomas Huth <thuth@redhat.com>" # gpg: aka "Thomas Huth <huth@tuxfamily.org>" # gpg: aka "Thomas Huth <th.huth@posteo.de>" # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth/tags/pull-request-2018-01-22: hw/isa: Replace fprintf(stderr, "*\n" with error_report() hw/ipmi: Replace fprintf(stderr, "*\n" with error_report() hw/bt: Replace fprintf(stderr, "*\n" with error_report() Fixes after renaming __FUNCTION__ to __func__ Replace all occurances of __FUNCTION__ with __func__ tests/cpu-plug-test: Test CPU hot-plugging on s390x tests/cpu-plug-test: Check CPU hot-plugging on ppc64, too tests/cpu-plug-test: Check the CPU hot-plugging with device_add, too tests: Rename pc-cpu-test.c to cpu-plug-test.c Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-01-23migration: Revert postcopy-blocktime commit setPeter Maydell1-16/+0
This reverts commits ca6011c migration: add postcopy total blocktime into query-migrate 5f32dc8 migration: add blocktime calculation into migration-test 2f7dae9 migration: postcopy_blocktime documentation 3be98be migration: calculate vCPU blocktime on dst side 01a87f0 migration: add postcopy blocktime ctx into MigrationIncomingState 31bf06a migration: introduce postcopy-blocktime capability as they don't build on ppc32 due to trying to do atomic accesses on types that are larger than the host pointer type. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-01-22tests/cpu-plug-test: Test CPU hot-plugging on s390xThomas Huth2-0/+40
CPU hot-plugging on s390x is possible with both, "cpu-add" and "device_add", so test both. Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-01-22tests/cpu-plug-test: Check CPU hot-plugging on ppc64, tooThomas Huth2-0/+51
Hot plugging on ppc64 is possible via "device_add", too. Unlike x86, we must not specify a 'socket-id' and 'thread-id' here, so this needs to be done with a separate function that just specifies the 'core-id' during the "device_add". Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-01-22tests/cpu-plug-test: Check the CPU hot-plugging with device_add, tooThomas Huth1-2/+45
Using 'device_add' instead of 'cpu-add' is the new way for hot-plugging CPUs, so we should test this regularly, too. Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Tested-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-01-22tests: Rename pc-cpu-test.c to cpu-plug-test.cThomas Huth2-14/+14
The test will be extended to work on other architectures, too, so let's use a more generic name for the file and the functions in here first. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-01-18tests: acpi: add comments to fetch_rsdt_referenced_tables/data->tables usageIgor Mammedov1-0/+3
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-01-18tests: acpi: rename test_acpi_tables()/test_dst_table() to reflect its usageIgor Mammedov1-5/+10
Main purpose of test_dst_table() is loading a table from QEMU with checking that checksum in header matches actual one, rename it reflect main action it performs. Likewise test_acpi_tables() name is to broad, while the function only loads tables referenced by RSDT, rename it to reflect it. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-01-18tests: acpi: init table descriptor in test_dst_table()Igor Mammedov1-3/+1
remove code duplication and make sure that table descriptor passed in for initialization is in expected state. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-01-18tests: acpi: move tested tables array allocation outside of ↵Igor Mammedov1-2/+2
test_acpi_dsdt_table() at best it's confusing that array for list of tables to be tested against reference tables is allocated within test_acpi_dsdt_table() and at worst it would just overwrite list of tables if they were added before test_acpi_dsdt_table(). Move array initialization to test_acpi_one() before we start processing tables. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-01-18vhost-user-test: use init_virtio_dev in multiqueue testMaxime Coquelin1-57/+8
Now that init_virtio_dev() has been generalized to all cases, use it in test_multiqueue() to avoid code duplication. Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-01-18vhost-user-test: make features mask an init_virtio_dev() argumentMaxime Coquelin1-7/+7
The goal is to generalize the use of [un]init_virtio_dev() to all tests, which does not necessarily expose the same features set. Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-01-18vhost-user-test: setup virtqueues in all testsMaxime Coquelin1-11/+42
Only the multiqueue test setups the virtqueues. This patch generalizes the setup of virtqueues for all tests. Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>