summaryrefslogtreecommitdiff
path: root/tests/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2014-03-13Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell1-0/+2
staging Block pull request # gpg: Signature made Thu 13 Mar 2014 13:50:49 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: (24 commits) block/raw-win32: bdrv_parse_filename() for hdev block/raw-posix: Strip protocol prefix on creation block/raw-posix: bdrv_parse_filename() for cdrom block/raw-posix: bdrv_parse_filename() for floppy block/raw-posix: bdrv_parse_filename() for hdev qemu-io: Fix warnings from static code analysis block: Unlink temporary file qcow2: Don't write with BDRV_O_INCOMING qcow2: Keep option in qcow2_invalidate_cache() qmp: add query-iothreads command iothread: stash thread ID away dataplane: replace internal thread with IOThread iothread: add "iothread" qdev property type qdev: make get_pointer() handle temporary strings iothread: add I/O thread object aio: add aio_context_acquire() and aio_context_release() rfifolock: add recursive FIFO lock object: add object_get_canonical_path_component() block: Rewrite the snapshot authorization mechanism for block filters. iotests: Test corruption during COW request ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13rfifolock: add recursive FIFO lockStefan Hajnoczi1-0/+2
QemuMutex does not guarantee fairness and cannot be acquired recursively: Fairness means each locker gets a turn and the scheduler cannot cause starvation. Recursive locking is useful for composition, it allows a sequence of locking operations to be invoked atomically by acquiring the lock around them. This patch adds RFifoLock, a recursive lock that guarantees FIFO order. Its first user is added in the next patch. RFifoLock has one additional feature: it can be initialized with an optional contention callback. The callback is invoked whenever a thread must wait for the lock. For example, it can be used to poke the current owner so that they release the lock soon. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13tests: Add spapr-pci-host-bridge qtestAlexey Kardashevskiy1-0/+3
This adds a test whether sPAPR PHB can be added via the command line. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13tests: Add virtio-console qtestAndreas Färber1-0/+6
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13tests: Add virtio-serial qtestAndreas Färber1-0/+3
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13tests: Add virtio-scsi qtestAndreas Färber1-0/+3
Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13tests: Add virtio-rng qtestAndreas Färber1-0/+3
Cc: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13tests: Add virtio-balloon qtestAndreas Färber1-0/+3
Cc: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13tests: Add virtio-blk qtestAndreas Färber1-0/+3
Cc: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13tests: Clean up IndustryPack TPCI200 gcov pathsAndreas Färber1-2/+2
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-11qapi script: do not allow string discriminatorWenchao Xia1-1/+2
Since enum based discriminators provide better type-safety and ensure that future qapi additions do not forget to adjust dependent unions, forbid using string as discriminator from now on. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-03-11qapi script: support enum type as discriminator in unionWenchao Xia1-1/+1
By default, any union will automatically generate a enum type as "[UnionName]Kind" in C code, and it is duplicated when the discriminator is specified as a pre-defined enum type in schema. After this patch, the pre-defined enum type will be really used as the switch case condition in generated C code, if discriminator is an enum field. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-03-11qapi script: check correctness of unionWenchao Xia1-1/+3
Since line info is remembered as QAPISchema.line now, this patch uses it as additional info for every expr in QAPISchema inside qapi.py, then improves error message with it in checking of exprs. For common union the patch will check whether base is a valid complex type if specified. For flat union it will check whether base presents, whether discriminator is found in base, whether the key of every branch is correct when discriminator is an enum type. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-03-11qapi script: add check for duplicated keyWenchao Xia1-1/+2
It is bad that same key was specified twice, especially when a union has two branches with same condition. This patch can prevent it. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-02-20Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' ↵Peter Maydell1-29/+56
into staging QOM infrastructure fixes and device conversions * QTest cleanups and test cases for PCI NICs * NAND fix for "info qtree" * Cleanup and extension of QOM machine tests * IndustryPack test cases and conversion to QOM realize * I2C cleanups * Cleanups of legacy qdev properties # gpg: Signature made Mon 17 Feb 2014 22:15:37 GMT using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/qom-devices-for-peter: (49 commits) qtest: Include system headers before user headers qapi: Refine human printing of sizes qdev: Use QAPI type names for properties qdev: Add enum property types to QAPI schema block: Handle "rechs" and "large" translation options qdev: Remove hex8/32/64 property types qdev: Remove most legacy printers qdev: Use human mode in "info qtree" qapi: Add human mode to StringOutputVisitor qdev: Inline qdev_prop_parse() qdev: Legacy properties are just strings qdev: Legacy properties are now read-only qdev: Remove legacy parsers for hex8/32/64 qdev: Sizes are now parsed by StringInputVisitor qapi: Add size parser to StringInputVisitor qtest: Don't segfault with invalid -qtest option ipack: Move IndustryPack out of hw/char/ ipoctal232: QOM parent field cleanup ipack: QOM parent field cleanup for IPackDevice ipack: QOM parent field cleanup for IPackBus ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-14ipack: Move IndustryPack out of hw/char/Andreas Färber1-2/+2
Move the header defining an IPackBus and IPackDevice base class into a new include/ directory and move their implementation and a PCI-IndustryPack bridge out of hw/char/ directory into a new hw/ipack/. Acked-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Add ipoctal232 qtestAndreas Färber1-0/+7
Acked-by: Alberto Garcia <agarcia@igalia.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Add tpci200 qtestAndreas Färber1-0/+3
Acked-by: Alberto Garcia <agarcia@igalia.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Add virtio-net qtestAndreas Färber1-0/+7
Cc: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Add ne2000 qtestAndreas Färber1-0/+3
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Add eepro100 qtestAndreas Färber1-0/+3
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Add pcnet qtestAndreas Färber1-0/+4
Test PCI only for now. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Add rtl8139 qtestAndreas Färber1-0/+3
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Add vmxnet3 qtestAndreas Färber1-0/+5
Note that this will emit a warning: [vmxnet3][WR][vmxnet3_peer_has_vnet_hdr]: Peer has no virtio extension. Task offloads will be emulated. Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Add e1000 qtestAndreas Färber1-0/+7
Cc: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Run qom-test for every architecturePeter Maydell1-23/+8
Rather than requiring every new architecture to remember to add a line to the Makefile to say that qom-test will work on it, autogenerate the list of supported architectures by looking at the files in default-configs (as configure does), and add qom-test to the test list for all of them automatically. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14tests: Fix gcov paths for relocated device sourcesAndreas Färber1-6/+6
Commit 49ab747f668f421138d5b40d83fa279c4c5e278d moved fdc.c, hd-geometry.c, m48t59.c, tmp105.c into hw/ subdirectories; commit 0ddfaf7fe4c8453446730328bf348b7c6438e4f8 did for mc146818rtc.c. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-10hw/pci: switch to a generic hotplug handling for PCIDeviceIgor Mammedov1-1/+1
make qdev_unplug()/device_set_realized() to call hotplug handler's plug/unplug methods if available and remove not needed anymore hot(un)plug handling from PCIDevice. In case if hotplug handler is not available, revert to the legacy hotplug method for compatibility with not yet converted buses. 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>
2014-01-17tests: Add libqemustub to qom-interface-checkPeter Crosthwaite1-1/+1
The recent addition of util/error.c's dependency on error_report() causes this test to fail to link due to a number of missing monitor related symbols. All these symbols are however defined by libqemustub. Add this libary to the link. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-01-13tests: Some unit tests for vmstate.cEduardo Habkost1-0/+4
* Basic load/save tests * Tests for loading older versions * Tests for .field_exists() handling Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2013-12-24tests: Test QOM interface castingIgor Mammedov1-1/+5
Add basic regression testing for QOM Interface usage. Test checks casting to interface type/class for following cases: - interface implementation in leaf class - interface implementation in intermediate (parent) class Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-10acpi-test: basic acpi unit-testMichael S. Tsirkin1-0/+2
We run bios, and boot a minimal boot sector that immediately halts. Then poke at memory to find ACPI tables. This only checks that RSDP is there. More will be added later. Cc: Andreas Färber <afaerber@suse.de> Cc: Markus Armbruster <armbru@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-11-07qdev-monitor-test: add device_add leak test casesStefan Hajnoczi1-0/+2
Ensure that the device_add error code path deletes device objects. Failure to do so not only leaks the objects but can also keep other objects (like drive or netdev) alive due to qdev properties holding references. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-11-07blockdev-test: add test case for drive_add duplicate IDsStefan Hajnoczi1-0/+2
The following should work: (qemu) drive_add if=none,id=drive0 (qemu) drive_del drive0 (qemu) drive_add if=none,id=drive0 Previous versions of QEMU produced a duplicate ID error because drive_add leaked the options. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-11-05qtest: Prepare QOM machine testsAndreas Färber1-0/+26
Instantiate all [*] machines per target, so that they get a bit of test coverage at all. This has proven helpful during QOM refactorings. [*] ppcemb target contains some non-working non-embedded machines, and ppc405 CPUs are not available there either. i386 and x86_64 do not cover pc*-x.y or xenfv. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-10-11build: add command check-cleanWenchao Xia1-1/+7
This command will package the clean operations in tests. Now root Makefile simply calls the command and do not care the details of it any more. Original the built binaries for test will not be removed, now they will be deleted in clean operation. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-10-11tests: build the helper program by defaultWenchao Xia1-1/+7
Usually we may configure and make, then goto ./tests/qemu-iotest, check. In this case an error will happen since helper program was not built. This patch simply build it by default. A better way may be introducing Makefile in ./tests/qemu-iotest, but it is more complicate to handle out of tree case, and a bit overkill for a single file now, we can do that when more files come. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-10-02tests: Fix schema parser test for in-tree buildMarkus Armbruster1-4/+4
Commit 4f193e3 added the test, but screwed up in-tree builds (SRCDIR=.): the tests's output overwrites the expected output, and is thus compared to itself. Cc: qemu-stable@nongnu.org Reported-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-12qemu-iotests: add unix socket help programWenchao Xia1-1/+2
This program can do a sendmsg call to transfer fd with unix socket, which is not supported in python2. The built binary will not be deleted in clean, but it is a existing issue in ./tests, which should be solved in another patch. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-06throttle: Add units testsBenoît Canet1-0/+2
Signed-off-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-20OptsVisitor: introduce unit tests, with test cases for range flatteningLaszlo Ersek1-1/+5
According to commit 4f193e34 ("tests: Use qapi-schema-test.json as schema parser test") the "tests/qapi-schema/qapi-schema-test.out" file must be updated as well. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-08-16tests: Unit tests for qdev global properties handlingEduardo Habkost1-0/+7
This tests the qdev global-properties handling code. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29tests: Use qapi-schema-test.json as schema parser testMarkus Armbruster1-4/+4
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1374939721-7876-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29tests: QAPI schema parser testsMarkus Armbruster1-2/+22
The parser handles erroneous input badly. To be improved shortly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1374939721-7876-2-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25qtest: add test for ISA I/O space endiannessPaolo Bonzini1-2/+12
This writes a register and reads its 1/2/4 byte parts. Masking is done in the device model. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1374501278-31549-25-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22tests: Add test-bitops.c with some sextract testsPeter Maydell1-0/+2
Add some simple test cases for the new sextract32 and sextract64 functions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-id: 1372419632-5521-3-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18libqos: Generalize I/O-mapped fw_cfgMarkus Armbruster1-1/+1
Provide a constructor that takes the base address in addition to the PC-specific one. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-12-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18boot-order-test: Add tests for PowerMacsAndreas Färber1-1/+3
They set the boot device via fw_cfg, which is then translated to a boot path of "hd" or "cd" in OpenBIOS. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-6-git-send-email-armbru@redhat.com Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Converted to libqos/fw_cfg on Anthony's request. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18libqos: include dependenciesAnthony Liguori1-0/+1
Otherwise rebuilds can fail when libqos is modified. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18boot-order-test: New; covering just PC for nowMarkus Armbruster1-0/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>