History | View | Annotate | Download (16.8 kB)
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging
QOM infrastructure fixes and device conversions
ipack: Move IndustryPack out of hw/char/
Move the header defining an IPackBus and IPackDevice base class intoa new include/ directory and move their implementation and aPCI-IndustryPack bridge out of hw/char/ directory into a new hw/ipack/.
Acked-by: Alberto Garcia <agarcia@igalia.com>...
tests: Add ipoctal232 qtest
Acked-by: Alberto Garcia <agarcia@igalia.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
tests: Add tpci200 qtest
tests: Add virtio-net qtest
Cc: Michael S. Tsirkin <mst@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
tests: Add ne2000 qtest
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
tests: Add e1000 qtest
tests: Add vmxnet3 qtest
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>...
tests: Add rtl8139 qtest
tests: Add pcnet qtest
Test PCI only for now.
tests: Add eepro100 qtest
tests: Run qom-test for every architecture
Rather than requiring every new architecture to remember to add a lineto the Makefile to say that qom-test will work on it, autogeneratethe list of supported architectures by looking at the files indefault-configs (as configure does), and add qom-test to the...
tests: Fix gcov paths for relocated device sources
Commit 49ab747f668f421138d5b40d83fa279c4c5e278d movedfdc.c, hd-geometry.c, m48t59.c, tmp105.c into hw/ subdirectories;commit 0ddfaf7fe4c8453446730328bf348b7c6438e4f8 did for mc146818rtc.c.
Cc: Paolo Bonzini <pbonzini@redhat.com>...
hw/pci: switch to a generic hotplug handling for PCIDevice
make qdev_unplug()/device_set_realized() to call hotplug handler'splug/unplug methods if available and remove not needed anymorehot(un)plug handling from PCIDevice.
In case if hotplug handler is not available, revert to the legacy...
tests: Add libqemustub to qom-interface-check
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 monitorrelated symbols. All these symbols are however defined by libqemustub.Add this libary to the link....
tests: Some unit tests for vmstate.c
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>
tests: Test QOM interface casting
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...
acpi-test: basic acpi unit-test
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>...
blockdev-test: add test case for drive_add duplicate IDs
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 becausedrive_add leaked the options....
qdev-monitor-test: add device_add leak test cases
Ensure that the device_add error code path deletes device objects.Failure to do so not only leaks the objects but can also keep otherobjects (like drive or netdev) alive due to qdev properties holdingreferences....
qtest: Prepare QOM machine tests
Instantiate all [*] machines per target, so that they get a bit of testcoverage at all. This has proven helpful during QOM refactorings.
[*] ppcemb target contains some non-working non-embedded machines, andppc405 CPUs are not available there either....
build: add command check-clean
This command will package the clean operations in tests. Now root Makefilesimply calls the command and do not care the details of it any more. Originalthe built binaries for test will not be removed, now they will be deleted...
tests: build the helper program by default
Usually we may configure and make, then goto ./tests/qemu-iotest,check. In this case an error will happen since helper programwas not built. This patch simply build it by default. A better waymay be introducing Makefile in ./tests/qemu-iotest, but it is more...
tests: Fix schema parser test for in-tree build
Commit 4f193e3 added the test, but screwed up in-tree builds(SRCDIR=.): the tests's output overwrites the expected output, and isthus compared to itself.
Cc: qemu-stable@nongnu.orgReported-by: Laszlo Ersek <lersek@redhat.com>...
qemu-iotests: add unix socket help program
This program can do a sendmsg call to transfer fd with unixsocket, which is not supported in python2.
The built binary will not be deleted in clean, but it is aexisting issue in ./tests, which should be solved in another...
throttle: Add units tests
Signed-off-by: Benoit Canet <benoit@irqsave.net>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
OptsVisitor: introduce unit tests, with test cases for range flattening
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>...
tests: Unit tests for qdev global properties handling
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>
tests: QAPI schema parser tests
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
tests: Use qapi-schema-test.json as schema parser test
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qtest: add test for ISA I/O space endianness
This writes a register and reads its 1/2/4 byte parts. Maskingis 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...
tests: Add test-bitops.c with some sextract tests
Add some simple test cases for the new sextract32and 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...
libqos: Generalize I/O-mapped fw_cfg
Provide a constructor that takes the base address in addition to thePC-specific one.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Message-id: 1372254743-15808-12-git-send-email-armbru@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
boot-order-test: New; covering just PC for now
Signed-off-by: Markus Armbruster <armbru@redhat.com>Message-id: 1372254743-15808-3-git-send-email-armbru@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
libqos: include dependencies
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...
boot-order-test: Add tests for PowerMacs
They set the boot device via fw_cfg, which is then translated to a bootpath 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>...
int128: optimize and add test cases
For add, the carry only requires checking one of the arguments.For sub and neg, we can similarly optimize computation of thecarry.
For ge, we can just do lexicographic order.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests: set MALLOC_PERTURB_ to expose memory bugs
glibc wipes malloc(3) memory when the MALLOC_PERTURB_ environmentvariable is set. The value of the environment variable determines thebit pattern used to wipe memory. For more information, seehttp://udrepper.livejournal.com/11429.html....
qtest: Add IDE test case
This adds a simple IDE test case and starts by verifying that IDENTIFYcan be successfully used and return the correct serial number, versionand the WCE flag is set for cache=writeback.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
libqos: Relocate I2C files
Commit c4efe1cada311b9dc0df5beb71c4227ff3414aa1 (qtest: add libqosincluding PCI support) created a libqos/ subdirectory but left theexisting I2C libqos files libi2c*.[hc] in tests/. Clean this up.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
fw_cfg: add qtest test case
This validates some basic characteristics of fw_cfg.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1366123521-4330-8-git-send-email-aliguori@us.ibm.com
i440fx-test: add test to compare default register values
This test compares all of the default register values against thespec. It turns out we deviate in quite a few places. Theseplaces are really only visible to the BIOS though which is whythis hasn't created any problems....
qtest: add libqos including PCI support
This includes basic PCI support for the PC platform. Enoughabstraction should be present to support non-PC platforms too.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1366123521-4330-3-git-send-email-aliguori@us.ibm.com
libqos: add fw_cfg support
fw_cfg is needed to get the top of memory which is necessary fordoing PCI allocation and allocating RAM for DMA.
Add a PC version of fw_cfg and enough abstraction to support otherplatforms.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
libqos: add malloc support
This is a very simple allocator for the PC platform. It shouldbe possible to add backends for other platforms.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1366123521-4330-5-git-send-email-aliguori@us.ibm.com
configure: Don't fall back to gthread coroutine backend
The gthread coroutine backend is broken and does not produce a workingQEMU; it is only useful for some very limited debugging situations.Clean up the backend selection logic in configure so that it now runs...
tests: Add unit tests for mulu64 and muls64
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
cutils: unsigned int parsing functions
There are lots of duplicate parsing code using strto*() in QEMU, andmost of that code is broken in one way or another. Even the visitorscode have duplicate integer parsing code1. This introduces functionsto help parsing unsigned int values: parse_uint() and parse_uint_full()....
sparc: disable qtest in make check
We've seen this repeatedly in buildbot but I can now reliablyreproduce it myself too. With a few hundred runs of 'make check',qemu-system-sparc will hang consuming 100% CPU. I've attached GDBto the hung process and unfortunately, I can't get anything useful...
Add XBZRLE testing
Signed-off-by: Orit Wasserman <owasserm@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
target-i386: Topology & APIC ID utility functions
This introduces utility functions for the APIC ID calculation, based on: Intel® 64 Architecture Processor Topology Enumeration http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/...
tests: Add gcov support for x86_64 qtest
Since x86_64 is a superset of i386 and reuses all its test cases, adoptall the i386 gcov source files as well, substituting their pathsappropriately.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tests: Add gcov support for sparc64 qtest
m48t59-test is individually being executed for sparc and sparc64, so addthe gcov source file for sparc64 as well.
tests: Fix gcov typo for tmp105-test
Commit 6e9989034b176a8e4cfdccd85892abfa73977ba7 introduced a new qtesttest case but misspelled gcov, leading to no coverage analysis. Fix it.
tests: adjust gcov variables for directory movement
I had missed the introduction of the gcov-files-* variables.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
add hierarchical bitmap data type and test cases
HBitmaps provides an array of bits. The bits are stored as usual in anarray of unsigned longs, but HBitmap is also optimized to provide fastiteration over set bits; going from one bit to the next is O(logB n)...
libqtest: Prepare I2C libqos
This adds a simple I2C API and a driver implementation for omap_i2c.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
tests: Add tmp105 qtest test case
Exercise all four commands of the TMP105, testing for an issue in theI2C TX path.
The test case uses the N800's OMAP I2C and is the first for ARM.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
build: move QAPI definitions for QEMU out of qapi-obj-y
There is no reason why for example qemu-ga should include all thedefinitions for the QEMU monitor. However, there are a fewthat are needed (qapi_free_SocketAddress, qapi_free_InetSocketAddress,ErrorClass_lookup). These should be moved to a separate "core"...
build: move base QAPI files to libqemuutil.a
build: fold trace-obj-y into libqemuutil.a
build: rename oslib-obj-y to util-obj-y
This prepares the creation of libqemuutil.a in the next patch.
build: move util-obj-y to libqemuutil.a
Use a static library to eliminate repetition in the linking rules.
build: move files away from tools-obj-y, common-obj-y, user-obj-y
Split them between libqemuutil.a and, for those used by qemu-img/io/nbd,block-obj-y.
Static libraries ensure that binaries such as qemu-ga do not includeunused modules.
build: move qobject files to qobject/ and libqemuutil.a
stubs: fully replace qemu-tool.c and qemu-user.c
tests: add gcov support
Add support for compiling for GCOV test coverage, enabledwith '--enable-gcov' during configure.
Test coverage will be reported after each test.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tests: add AioContext unit tests
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
tests: add thread pool unit tests
tests: link in stubs
build: do not include main loop where it is not actually used
janitor: move iovector functions out of cutils.c
This removes the dependency of cutils.c on iov.c, and lets us removeiov.o from several builds.
tests: do not include tools-obj-ySigned-off-by: Paolo Bonzini <pbonzini@redhat.com>
block: Enable qemu_open/close to work with fd sets
When qemu_open is passed a filename of the "/dev/fdset/nnn" format (where nnn is the fdset ID), an fd with matching accessmode flags will be searched for within the specified monitorfd set. If the fd is found, a dup of the fd will be returned...
tests: Makefile: include dependency files
Otherwise 'make check' won't recompile files that need to be recompiledbecause of header changes.
To reproduce the bug, run:
$ make check # succeeds $ echo B0RKED > hw/mc146818rtc_regs.h $ make check # is supposed to try to rebuild tests/rtc-test.o and fail...
qtest: Add hard disk geometry test
So far covers only IDE and tests only CMOS contents.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Merge remote-tracking branch 'mjt/mjt-iov2' into staging
qapi: Unit tests for visitor-based serialization
Currently we test our visitors individually, and seperately for inputvs. output. This is useful for validating internal representationsagainst the native C types and vice-versa, and other visitor-specific...
rewrite iov_* functions
This changes implementations of all iov_*functions, completing the previous step.
All iov_* functions now ensure that this offsetargument is within the iovec (using assertion),but lets to specify `bytes' value larger thanactual length of the iovec - in this case they...
build: do not sprinkle around GENERATED_HEADERS dependencies
Keeping GENERATED_HEADERS dependencies up-to-date everywhere is complex.We can simply make the Makefile depend on them, and they will be builtbefore all other targets.
tests: Add rtc-test (fix test regression)
Commit 93e9eb6808c886f5f1c903b7ced1eed65de2ba39 added fdc-test,but accidentally removed rtc-test because check-qtest-i386-y wasnot enhanced but set twice.
This patch adds rtc-test again (and sorts both tests alphabetically)....
tests: Fix linker failure for fdc-test
When QEMU was built with the simple trace backend, linking failed:
LINK tests/fdc-testoslib-posix.o: In function `trace_qemu_memalign':qemu/bin/debug/x86/./trace.h:31: undefined reference to `trace3'oslib-posix.o: In function `trace_qemu_vmalloc':...
tests/Makefile: Add missing $(EXESUF)
qtest: Add floppy test
Let's start with testing media change.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
qtest: add m48t59 tests for Sparc
Add simple m48t59 qtests, enable test only for Sparc32and Sparc64. On PPC, the device is behind PCI bus.
tests: remove .SECONDARY special target
The special target should not be needed anymore, and caused (perhapsdue to a Make bug) a failure with "make -j2". In any case, themain makefile is a better place for such special targets ratherthan an included makefile....
qtest: fix out of tree build
Trace objects are also needed if tracing is enabled.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qtest: add rtc-test test-case
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
test makefile overhaul
This introduces new test reporting infrastructure based ongtester and gtester-report.
Also, all existing tests are moved to tests/, and tests/Makefileis reorganized to factor out the commonalities in the rules.
Signed-off-by: Anthony Liguori <aliguori@linux.vnet.ibm.com>...
qtest: add C version of test infrastructure
This also includes a qtest wrapper script to make it easier to launch qtesttests directly.
qapi: add strict mode to input visitor
While QMP in general is designed so that it is possible to ignoreunknown arguments, in the case of the QMP server it is better toreject them to detect bad clients. In fact, we're already doingthis at the top level in the argument checker. To extend this to...
test: add test-qmp-commands to make check
All the deps are here but the test was never added to the list of testsfor make check
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
test: remove qemu-ga reference
This was added by mistake a while back.
make check: Add qemu-iotests subset
Run the 'quick' group from qemu-iotests during 'make check'.
Add 'make check-block'
Runs the full qemu-iotests suite for various image formats.
qapi: add tests for string-based visitors
tests: Silence gtester in Makefile
This prettifies make output a little by avoiding a very long line.As gtester prints the checks when they are run, no information is lost.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
test: eliminate libcheck tests and have make check use gtester
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>