aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2013-01-12build: fold trace-obj-y into libqemuutil.aPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: move base QAPI files to libqemuutil.aPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: move QAPI definitions for QEMU out of qapi-obj-yPaolo Bonzini
There is no reason why for example qemu-ga should include all the definitions for the QEMU monitor. However, there are a few that are needed (qapi_free_SocketAddress, qapi_free_InetSocketAddress, ErrorClass_lookup). These should be moved to a separate "core" .json schema that goes into libqemuutil.a. For now, make this clearer by moving the qapi-*.o definitions out of libqemuutil.a. Once the above refactoring is done, qga-obj-y should not include anymore qapi-types.o and qapi-visit.o. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: move qobject files to qobject/ and libqemuutil.aPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: move files away from tools-obj-y, common-obj-y, user-obj-yPaolo Bonzini
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 include unused modules. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: move util-obj-y to libqemuutil.aPaolo Bonzini
Use a static library to eliminate repetition in the linking rules. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: rename oslib-obj-y to util-obj-yPaolo Bonzini
This prepares the creation of libqemuutil.a in the next patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12stubs: fully replace qemu-tool.c and qemu-user.cPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-10m48t59-test: don't touch watchdogGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-10rtc-test: skip year-2038 overflow check in case time_t is 32bit onlyGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-08target-mips: Fix helper and tests for dot/cross-dot product instructionsPetar Jovanovic
Helper function for dpa_w_ph, dpax_w_ph, dps_w_ph and dpsx_w_ph incorrectly defines halfword vector elements as unsigned values. This results in wrong output which is not triggered in the tests as they also follow this logic. Signed-off-by: Petar Jovanovic <petarj@mips.com> Reviewed-by: Eric Johnson <ericj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-06tests: add gcov supportBlue Swirl
Add support for compiling for GCOV test coverage, enabled with '--enable-gcov' during configure. Test coverage will be reported after each test. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-02test-iov: add iov_discard_front/back() testcasesStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-01target-mips: Fix for helpers for EXTR_* instructionsPetar Jovanovic
The change removes some unnecessary and incorrect code for EXTR_S.H. Further, it corrects the mask for shift value in the EXTR_ instructions. It also extends the existing tests so they trigger the issues corrected with the change. Signed-off-by: Petar Jovanovic <petarj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-01target-mips: Fix incorrect reads and writes to DSPControl registerPetar Jovanovic
Upper 4 bits of ccond (bits 31..28 ) of DSPControl register are not used in the MIPS32 architecture. They are used in the MIPS64 architecture. For MIPS32 these bits must be written as zero, and return zero on read. The change fixes writes (WRDSP) and reads (RDDSP) to the register. It also fixes the tests that use these instructions, and makes them smaller and simpler. Signed-off-by: Petar Jovanovic <petarj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19block: move include files to include/block/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qapi: move include files to include/qobject/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19janitor: add guards to headersPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qapi: move inclusions of qemu-common.h from headers to .c filesPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-12qemu-iotests: Test concurrent cluster allocationsKevin Wolf
This adds some first tests for qcow2's dependency handling when two parallel write requests access the same cluster. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-12-11tests: Add tests for fdsetsCorey Bryant
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-12-11tests: avoid qemu_aio_flush() in test-thread-pool.cStefan Hajnoczi
We need to eliminate calls to qemu_aio_flush() since the function is being removed. Most callers will use bdrv_drain_all() instead but test-thread-pool.c is lower level. Since the test uses the global AioContext we can loop on qemu_aio_wait() to wait for aio and bh activity to complete. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-12-11tests: use aio_poll() instead of aio_flush() in test-aio.cStefan Hajnoczi
There has been confusion between various aio wait and flush functions. It's time to get rid of qemu_aio_flush() but in the aio test cases we really do want this low-level functionality. Therefore declare a local wait_for_aio() helper for the test cases. Drop the aio_flush() test case. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-12-10Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori
* stefanha/trivial-patches: pc_sysfw: Plug memory leak on pc_fw_add_pflash_drv() error path qemu-options: Fix space at EOL Fix spelling in comments and documentation Clean up pci_drive_hot_add()'s use of BlockInterfaceType arm: a9mpcore: remove un-used ptimer_iomem field target-sparc: Remove t0, t1 from CPUSPARCState target-m68k: Remove t1 from CPUM68KState target-alpha: Remove t0, t1 from CPUAlphaState s390x: Spelling fixes (endianess -> endianness, occured -> occurred) Fix comments (adress -> address, layed -> laid, wierd -> weird) Fix spelling (prefered -> preferred) configure: Remove stray debug output sd: Send debug printfery to stderr not stdout Conflicts: configure Resolve spelling conflict in configure. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-08target-xtensa: add s32c1i unit testsMax Filippov
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-08target-xtensa: add SR accessibility unit testsMax Filippov
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-07Fix spelling in comments and documentationStefan Weil
These spelling bugs were found by codespell: supressing -> suppressing transfered -> transferred Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-12-06target-mips: Fix incorrect shift for SHILO and SHILOVPetar Jovanovic
helper_shilo has not been shifting an accumulator value correctly for negative values in 'shift' field. Minor optimization for shift=0 case. This change also adds tests that will trigger issue and check for regressions. Signed-off-by: Petar Jovanovic <petarj@mips.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Eric Johnson <ericj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-12-06target-mips: Fix incorrect code and test for INSVPetar Jovanovic
Content of register rs should be shifted for pos before applying a mask. This change contains both fix for the instruction and to the existing test. Signed-off-by: Petar Jovanovic <petarj@mips.com> Reviewed-by: Eric Johnson <ericj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-11-27rtc: Only call rtc_set_cmos when Register B SET flag is disabled.Alex Horn
This bug occurs when the SET flag of Register B is enabled. When an RTC data register (i.e. any of the ten time/calender CMOS bytes) is set, the data is (as expected) correctly stored in the cmos_data array. However, since the SET flag is enabled, the function rtc_set_time is not invoked. As a result, the field base_rtc in RTCState remains uninitialized. This causes a problem on subsequent writes which can end up overwriting data. To see this, consider writing data to Register A after having written data to any of the RTC data registers; the following figure illustrates the call stack for the Register A write operation: +- cmos_io_port_write +-- check_update_timer +---- get_next_alarm +------ rtc_update_time In rtc_update_time, get_guest_rtc calculates the wrong time and overwrites the previously written RTC data register values. Signed-off-by: Alex Horn <alex.horn@cs.ox.ac.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-27tests: make threadpool cancellation test looserPaolo Bonzini
The cancellation test is failing on the buildbots. While the failure merits a little more investigation to understand what is going on, the logs show that the failure is not impacting the coverage provided by the test. Hence, loosen a bit the assertions in a way that should let the test proceed and hopefully pass. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-26tests: add thread pool unit testsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-26tests: add AioContext unit testsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-19Merge remote-tracking branch 'bonzini/build-urgent' into stagingAnthony Liguori
* bonzini/build-urgent: Makefile: Add missing dependency (fix parallel builds) tests: link in stubs libcacard: link in stubs libcacard: make unnesting rules available to Makefile.objs Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-19tests: link in stubsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-14fdc-tests: add tests for VERIFY commandHervé Poussineau
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-11-14fdc-test: Check READ IDKevin Wolf
ST0 shouldn't include 0x20 (FD_SR0_SEEK) after READ ID. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Tested-by: Hervé Poussineau <hpoussin@reactos.org>
2012-11-14fdc: fix false FD_SR0_SEEKHervé Poussineau
Do not always set FD_SR0_SEEK, as callers already set it if needed. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-11-14fdc-test: add tests for non-DMA READ commandHervé Poussineau
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-11-14fdc-test: insert media before fuzzing registersHervé Poussineau
A media will be required for future fdc tests. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-11-14fdc-test: split test_media_change() test, so insert part can be reusedHervé Poussineau
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-11-14tests: allow qemu-iotests to be run against nbd backendNick Thomas
To do this, we start a qemu-nbd process at _make_test_img and kill it in _cleanup_test_img. $TEST_IMG is changed to point at the TCP server. We also remove the checks for existence of binaries from common.config - they're duplicated in common, and we can make the qemu-nbd check conditional on $IMGPROTO being "nbd" if we do it there. Signed-off-by: Nick Thomas <nick@bytemark.co.uk> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-11-14qemu-iotests: qcow2: Test growing large refcount tableKevin Wolf
Actually writing all the content with 512 byte sector size would take forever, therefore build the image file with a Python script and use qemu-io for the last write that actually triggers the refcount table growth. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-11-10tests/tcg: new test for i386 FPREM and FPREM1Catalin Patulea
This is setting the stage for a cleanup of FPREM and FPREM1 helpers while being sure that they behave same as bare metal. The test constructs operands using combinations of corner cases for the floating-point bitfields and prints operands, result and FPU status word for FPREM and FPREM1. The outputs can then be compared between bare metal and QEMU. The 'run-test-i386-fprem' make target does just that. Signed-off-by: Catalin Patulea <catalinp@google.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-01Merge remote-tracking branch 'bonzini/threadpool' into stagingAnthony Liguori
* bonzini/threadpool: (39 commits) raw-win32: implement native asynchronous I/O raw-posix: move linux-aio.c to block/ raw-win32: add emulated AIO support raw-posix: rename raw-posix-aio.h, hide unavailable prototypes raw: merge posix-aio-compat.c into block/raw-posix.c block: switch posix-aio-compat to threadpool threadpool: do not take lock in event_notifier_ready aio: add generic thread-pool facility qemu-thread: add QemuSemaphore linux-aio: use event notifiers aio: clean up now-unused functions main-loop: use aio_notify for qemu_notify_event main-loop: use GSource to poll AIO file descriptors aio: call aio_notify after setting I/O handlers aio: add aio_notify aio: make AioContexts GSources aio: add Win32 implementation aio: prepare for introducing GSource-based dispatch aio: add non-blocking variant of aio_wait aio: test node->deleted before calling io_flush ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-10-31target-mips: Add ASE DSP testcasesJia Liu
Add MIPS ASE DSP testcases. Signed-off-by: Jia Liu <proljc@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-10-31Merge remote-tracking branch 'origin/master' into threadpoolPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-30tests/tcg: fix unused result warningsCatalin Patulea
With i386-linux-user target on x86_64 host, this does not introduce any new test failures. Signed-off-by: Catalin Patulea <catalinp@google.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-30build: do not include main loop where it is not actually usedPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>