summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* test-iov: add iov_discard_front/back() testcasesStefan Hajnoczi2013-01-021-0/+150
| | | | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* target-mips: Fix for helpers for EXTR_* instructionsPetar Jovanovic2013-01-018-0/+185
| | | | | | | | | 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>
* target-mips: Fix incorrect reads and writes to DSPControl registerPetar Jovanovic2013-01-012-40/+24
| | | | | | | | | | | | 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>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-195-8/+8
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block: move include files to include/block/Paolo Bonzini2012-12-193-5/+5
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qapi: move include files to include/qobject/Paolo Bonzini2012-12-1913-23/+23
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* janitor: add guards to headersPaolo Bonzini2012-12-191-0/+5
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qapi: move inclusions of qemu-common.h from headers to .c filesPaolo Bonzini2012-12-197-0/+8
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qemu-iotests: Test concurrent cluster allocationsKevin Wolf2012-12-123-0/+379
| | | | | | | 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>
* tests: Add tests for fdsetsCorey Bryant2012-12-114-0/+147
| | | | | | 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>
* tests: avoid qemu_aio_flush() in test-thread-pool.cStefan Hajnoczi2012-12-111-6/+14
| | | | | | | | | | | | | 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>
* tests: use aio_poll() instead of aio_flush() in test-aio.cStefan Hajnoczi2012-12-111-16/+15
| | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-12-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Fix spelling in comments and documentationStefan Weil2012-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | target-xtensa: add s32c1i unit testsMax Filippov2012-12-082-0/+40
| | | | | | | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | target-xtensa: add SR accessibility unit testsMax Filippov2012-12-083-1/+92
|/ | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-mips: Fix incorrect shift for SHILO and SHILOVPetar Jovanovic2012-12-062-0/+38
| | | | | | | | | | | 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>
* target-mips: Fix incorrect code and test for INSVPetar Jovanovic2012-12-061-1/+1
| | | | | | | | | 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>
* rtc: Only call rtc_set_cmos when Register B SET flag is disabled.Alex Horn2012-11-271-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: make threadpool cancellation test looserPaolo Bonzini2012-11-271-2/+5
| | | | | | | | | | | 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>
* tests: add thread pool unit testsPaolo Bonzini2012-11-262-0/+215
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* tests: add AioContext unit testsPaolo Bonzini2012-11-262-0/+669
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'bonzini/build-urgent' into stagingAnthony Liguori2012-11-191-2/+2
|\ | | | | | | | | | | | | | | | | | | * 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>
| * tests: link in stubsPaolo Bonzini2012-11-191-2/+2
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | fdc-tests: add tests for VERIFY commandHervé Poussineau2012-11-141-3/+13
| | | | | | | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | fdc-test: Check READ IDKevin Wolf2012-11-141-0/+66
| | | | | | | | | | | | | | 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>
* | fdc: fix false FD_SR0_SEEKHervé Poussineau2012-11-141-3/+3
| | | | | | | | | | | | | | 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>
* | fdc-test: add tests for non-DMA READ commandHervé Poussineau2012-11-141-0/+98
| | | | | | | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | fdc-test: insert media before fuzzing registersHervé Poussineau2012-11-141-0/+1
| | | | | | | | | | | | | | 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>
* | fdc-test: split test_media_change() test, so insert part can be reusedHervé Poussineau2012-11-141-1/+8
| | | | | | | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | tests: allow qemu-iotests to be run against nbd backendNick Thomas2012-11-143-8/+38
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | qemu-iotests: qcow2: Test growing large refcount tableKevin Wolf2012-11-145-5/+134
|/ | | | | | | | | 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>
* tests/tcg: new test for i386 FPREM and FPREM1Catalin Patulea2012-11-102-0/+362
| | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'bonzini/threadpool' into stagingAnthony Liguori2012-11-011-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Merge remote-tracking branch 'origin/master' into threadpoolPaolo Bonzini2012-10-3115-13/+1022
| |\ | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | build: do not include main loop where it is not actually usedPaolo Bonzini2012-10-301-4/+4
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | janitor: move iovector functions out of cutils.cPaolo Bonzini2012-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | This removes the dependency of cutils.c on iov.c, and lets us remove iov.o from several builds. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | | target-mips: Add ASE DSP testcasesJia Liu2012-10-31487-0/+19151
| |/ |/| | | | | | | | | | | Add MIPS ASE DSP testcases. Signed-off-by: Jia Liu <proljc@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | tests/tcg: fix unused result warningsCatalin Patulea2012-10-302-7/+22
| | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-10-2911-4/+997
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: (32 commits) osdep: Less restrictive F_SEFL in qemu_dup_flags() qemu-iotests: add testcases for mirroring on-source-error/on-target-error qmp: add pull_event function mirror: add support for on-source-error/on-target-error iostatus: forward block_job_iostatus_reset to block job qemu-iotests: add mirroring test case mirror: implement completion qmp: add drive-mirror command mirror: introduce mirror job block: introduce BLOCK_JOB_READY event block: add block-job-complete block: rename block_job_complete to block_job_completed block: export dirty bitmap information in query-block block: introduce new dirty bitmap functionality block: add bdrv_open_backing_file block: add bdrv_query_stats block: add bdrv_query_info qemu-config: Add new -add-fd command line option monitor: Prevent removing fd from set during init monitor: Enable adding an inherited fd to an fd set ... Conflicts: vl.c Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * | qemu-iotests: add testcases for mirroring on-source-error/on-target-errorPaolo Bonzini2012-10-243-2/+259
| | | | | | | | | | | | | | | | | | | | | | | | The new options are tested with blkdebug on both the source and the target. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: add mirroring test casePaolo Bonzini2012-10-243-0/+368
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: Add 043 backing file chain infinite loop testStefan Hajnoczi2012-10-244-0/+172
| | | | | | | | | | | | | | | | | | | | | | | | This new test verifies that qemu-img info --backing-chain safely aborts when an image file has a backing file infinite loop. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: add relative backing file tests for block-commit (040)Jeff Cody2012-10-242-2/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | The previous block commit used absolute filenames for all block-commit images and commands; this adds relative filenames for the same tests. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | block: in commit, determine base image from the top imageJeff Cody2012-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies some code and error checking, and also fixes a bug. bdrv_find_backing_image() should only be passed absolute filenames, or filenames relative to the chain. In the QMP message handler for block commit, when looking up the base do so from the determined top image, so we know it is reachable from top. Some of the error messages put out by block-commit have changed slightly, which causes 2 tests cases for block-commit to fail. This patch updates the test cases to look for the correct error output. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: Test qemu-img operation on zero size imageKevin Wolf2012-10-243-0/+94
| | | | | | | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
* | | tests/tcg: fix a few warningsCatalin Patulea2012-10-272-2/+3
| |/ |/| | | | | | | Signed-off-by: Catalin Patulea <catalinp@google.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | tests: do not include tools-obj-yPaolo Bonzini2012-10-231-5/+5
|/ | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests/tcg: fix buildCatalin Patulea2012-10-194-14/+22
| | | | | | | | | | | | | | This broke when the tests were moved from tests/ to tests/tcg/. On x86_64 host/i386-linux-user non-kvm guest, test-i386 and test-mmap are broken, but at least they build. To build/run the tests: $ cd $BUILD_PATH/tests/tcg $ SRC_PATH=path/to/qemu make <target> Signed-off-by: Catalin Patulea <catalinp@google.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* rtc: implement century bytePaolo Bonzini2012-10-051-2/+30
| | | | | | | | | | | | | | | | | | | | | | Implement the century byte in the RTC emulation, and test that it works. This leads to some annoying compatibility code because we need to treat a value of 2000 for the base_year property as "use the century byte properly" (which would be a value of 0). The century byte will now be always-zero, rather than always-20, for the MIPS Magnum machine whose base_year is 1980. Commit 42fc73a (Support epoch of 1980 in RTC emulation for MIPS Magnum, 2009-01-24) correctly said: With an epoch of 1980 and a year of 2009, one could argue that [the century byte] should hold either 0, 1, 19 or 20. NT 3.50 on MIPS does not read the century byte. so I picked the simplest and most sensible implementation which is to return 0 for 1980-2079, 1 for 2080-2179 and so on. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud