summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'sweil/for-1.1' into stagingAnthony Liguori2012-05-141-1/+1
|\ | | | | | | | | | | | | | | | | | | * sweil/for-1.1: qemu-doc: Use QEMU instead of qemu for product name qemu-doc: Fix executable name in examples qemu-doc: Add missing parameter in description of -D option configure: Use QEMU instead of Qemu fix some common typos qemu-timer: Fix wrong error message
| * fix some common typosJim Meyering2012-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were identified using: http://github.com/lyda/misspell-check and run like this to create a bourne shell script using GNU sed's -i option: git ls-files|grep -vF .bin | misspellings -f - |grep -v '^ERROR:' |perl \ -pe 's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/' Manually eliding the FP, "rela->real" and resolving "addres" to address (not "adders") we get this: sed -i '450s!thru!through!' Changelog sed -i '260s!neccessary!necessary!' coroutine-sigaltstack.c sed -i '54s!miniscule!minuscule!' disas.c sed -i '1094s!thru!through!' hw/usb/hcd-ehci.c sed -i '1095s!thru!through!' hw/usb/hcd-ehci.c sed -i '21s!unecessary!unnecessary!' qapi-schema-guest.json sed -i '307s!explictly!explicitly!' qemu-ga.c sed -i '490s!preceeding!preceding!' qga/commands-posix.c sed -i '792s!addres!address!' qga/commands-posix.c sed -i '6s!beeing!being!' tests/tcg/test-mmap.c Also, manually fix "arithmentic", spotted by Peter Maydell: sed -i 's!arithmentic!arithmetic!' coroutine-sigaltstack.c Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
* | tests/Makefile: Add missing $(EXESUF)Kevin Wolf2012-05-101-2/+2
| | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | stream: do not copy unallocated sectors from the basePaolo Bonzini2012-05-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Unallocated sectors should really never be accessed by the guest, so there's no need to copy them during the streaming process. If they are read by the guest during streaming, guest-initiated copy-on-read will copy them (we're in the base == NULL case, which enables copy on read). If they are read after we disconnect the image from the base, they will read as zeroes anyway. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | stream: add testcase for partial streamingPaolo Bonzini2012-05-102-3/+29
| | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | stream: fix sectors not allocated testPaolo Bonzini2012-05-102-4/+7
| | | | | | | | | | | | | | | | The test on sectors not allocated can fail if the L1/L2 tables are not on disk yet. Allow tests to shutdown the VM early. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | qemu-io: correctly print non-integer values as decimalsPaolo Bonzini2012-05-1012-4173/+4173
| | | | | | | | | | | | | | | | | | | | | | | | | | qemu-io's cvtstr function sometimes will incorrectly omit the decimal part of the number, and sometimes will incorrectly include it. This patch fixes both. The former is more serious, and can be seen in the patches to 027.out and 033.out. The changes to all other files were scripted with sed, so there were no "surprises" beyond 027.out and 033.out. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | qtest: Add floppy testKevin Wolf2012-05-102-0/+197
| | | | | | | | | | | | | | Let's start with testing media change. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
* | qtest: Add function to send QMP commandsKevin Wolf2012-05-102-27/+113
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
* | qemu-iotests: strip spaces from qemu-img/qemu-io/qemu command linesPaolo Bonzini2012-05-101-3/+3
|/ | | | | | | | | A trailing space is left when qemu-img has no arguments, for example if -nocache is not used. This becomes an empty argument after split() and causes qemu-io to fail. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Many parallel allocating I/O requestsKevin Wolf2012-05-023-0/+465
| | | | | | | This test case manages to let qcow2 abort because its cache is used up and it can't find free cache entries for new requests any more. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: ignore fragmentation information for qedDong Xu Wang2012-05-021-0/+1
| | | | | | | | | | We added image fragmentation statistics functions to qemu-img several days ago, those patches will cause "./check -qed" failed. This patch will ignore fragmentation statistics information of qed format, and then "./check -qed" will work. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: add block-stream speed value test caseStefan Hajnoczi2012-04-272-18/+71
| | | | | | | | | | | | | | | | | Add tests to exercise the InvalidParameter 'speed' error code path, as well as the regular success case for setting the speed. The block-stream 'speed' parameter allows the speed limit of the job to be applied immediately when the job starts instead of issuing a separate block-job-set-speed command later. If the parameter has an invalid value we expect to get an error and the job is not created. It turns out that cancelling a block job is a common operation in these test cases, let's extract a cancel_and_wait() function instead of duplicating the QMP commands. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qtest: Fix more format errors with qtest_sendfStefan Weil2012-04-261-3/+4
| | | | | | | | After adding GCC_FMT_ATTR to qtest_sendf, more format errors are reported by the compiler. These are fixed here. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori2012-04-231-2/+2
|\ | | | | | | | | * origin/master: qtest: fix memread and memwrite on 32 bit hosts
| * qtest: fix memread and memwrite on 32 bit hostsBlue Swirl2012-04-231-2/+2
| | | | | | | | | | | | | | | | Use PRIx64 to print 64 bit values to avoid truncation on 32 bit hosts. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2012-04-231-6/+6
|\ \ | | | | | | | | | | | | | | | * qmp/queue/qmp: qapi: g_hash_table_find() instead of GHashTableIter. qmp: make block job command naming consistent
| * | qmp: make block job command naming consistentStefan Hajnoczi2012-04-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The block streaming and job commands used '_' instead of '-' for reasons of compatibility with libvirt, which already included support for the '_' naming. However, the semantics of block_job_cancel have changed and libvirt now needs to handle the new semantics. Since the old semantics were never in a QEMU release we can still rename the commands to use '-' instead of '_'. Libvirt is also happy because the new name can be used to distinguish QEMU binaries that support the latest block-job-cancel semantics from those that include a downstream block_job_cancel command. Therefore, let's apply the QAPI/QMP naming rules to the block streaming and job commands. QEMU 1.1 will be the first release with these commands so no upstream users can break. Note that HMP commands are left with '_' because that is the convention there. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-04-2325-161/+798
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: (38 commits) qemu-iotests: Fix test 031 for qcow2 v3 support qemu-iotests: Add -o and make v3 the default for qcow2 qcow2: Zero write support qemu-iotests: Test backing file COW with zero clusters qemu-iotests: add a simple test for write_zeroes qcow2: Support for feature table header extension qcow2: Support reading zero clusters qcow2: Version 3 images qcow2: Ignore reserved bits in check_refcounts qcow2: Ignore reserved bits in refcount table entries qcow2: Simplify count_cow_clusters qcow2: Refactor qcow2_free_any_clusters qcow2: Ignore reserved bits in L1/L2 entries qcow2: Fail write_compressed when overwriting data qcow2: Ignore reserved bits in count_contiguous_clusters() qcow2: Ignore reserved bits in get_cluster_offset qcow2: Save disk size in snapshot header Specification for qcow2 version 3 qcow2: Fix refcount block allocation during qcow2_alloc_cluster_at() iotests: Resolve test failures caused by hostname ...
| * | qemu-iotests: Fix test 031 for qcow2 v3 supportKevin Wolf2012-04-203-26/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qcow2.py must be updated to work with version 3 images at all, the output has changed since the feature table extension has been added, and version 2 and version 3 images can't possibly have the same test output. Change the test case to completely ignore IMGOPTS and run the test for both compat=1.1 and compat=0.10 regardless of the ./check command line. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: Add -o and make v3 the default for qcow2Kevin Wolf2012-04-203-5/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an -o option to qemu-iotests, which is an option string that is passed through to qemu-img create -o... This allows testing different subformat with a command like './check -qcow2 -o compat=0.10'. For qcow2, if no compat option is specified, compat=1.1 is the new default. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: Test backing file COW with zero clustersKevin Wolf2012-04-203-0/+195
| | | | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: add a simple test for write_zeroesPaolo Bonzini2012-04-203-0/+103
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | iotests: Resolve test failures caused by hostnameAndreas Färber2012-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `hostname -s` may output an errror: hostname: Name or service not known This causes all tests to fail for `make check-block`. Suppress such error messages, letting the tests succeed. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | iotests: fix error in 005Dong Xu Wang2012-04-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | According comment, we should not read again, we will write. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: Test bdrv_close while AIO is in flightKevin Wolf2012-04-193-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the BlockDriverState is closed/freed without draining the AIO requests first, the request coroutines may work on invalid data and file descriptors or have some dangling pointers that cause segfaults. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * | qemu-iotests: Always filter cluster_size out in _make_test_imgKevin Wolf2012-04-1911-127/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some image formats do have a cluster size, others don't, but there are tests that work with both sets of images and currently we get failures because the qemu-img create output doesn't mention the cluster size for some formats. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
* | | Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori2012-04-234-0/+315
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (27 commits) target-arm: Move reset handling to arm_cpu_reset target-arm: Drop cpu_reset_model_id() target-arm: Move cache ID register setup to cpu specific init fns target-arm: Move OMAP cp15_i_{max,min} reset to cpu_state_reset target-arm: Move feature register setup to per-CPU init fns target-arm: Move iWMMXT wCID reset to cpu_state_reset target-arm: Drop JTAG_ID documentation target-arm: Move SCTLR reset value setup to per cpu init fns target-arm: Move CTR setup to per cpu init fns target-arm: Move MVFR* setup to per cpu init fns target-arm: Move FPSID config to cpu init fns target-arm: Move feature bit settings to CPU init fns target-arm: Add QOM subclasses for each ARM cpu implementation target-arm: remind to keep arm features in sync with linux-user/elfload.c tci: GETPC() macro must return an uintptr_t gdbstub: Synchronize CPU state unconditionally in gdb_set_cpu_pc softfloat: make USE_SOFTFLOAT_STRUCT_TYPES compile target-xtensa: add tests for LOOPNEZ and LOOPGTZ target-xtensa: fix LOOPNEZ/LOOPGTZ translation qtest: add m48t59 tests for Sparc ...
| * | target-xtensa: add tests for LOOPNEZ and LOOPGTZMax Filippov2012-04-211-0/+36
| | | | | | | | | | | | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
| * | qtest: add m48t59 tests for SparcBlue Swirl2012-04-212-0/+262
| | | | | | | | | | | | | | | | | | | | | Add simple m48t59 qtests, enable test only for Sparc32 and Sparc64. On PPC, the device is behind PCI bus. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
| * | qtest: add register fuzzing to RTC testBlue Swirl2012-04-191-0/+17
| |/ | | | | | | | | Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Add .gitignore for tests/David Gibson2012-04-201-0/+13
|/ | | | | | | | | | | | The new autotests in tests/ generate a number of files, both executable and source, which are not caught by the existing .gitignore files. This patch adds a new .gitignore in tests/ which covers these. [Changed 'rtc-test' to '*-test' so future tests do not need to be added to .gitignore on a case-by-case basis. Stefan] Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tests: remove .SECONDARY special targetPaolo Bonzini2012-04-141-2/+0
| | | | | | | | | | | | The special target should not be needed anymore, and caused (perhaps due to a Make bug) a failure with "make -j2". In any case, the main makefile is a better place for such special targets rather than an included makefile. Reported-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-xtensa: add test for IBREAK invalidationMax Filippov2012-04-141-0/+34
| | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-xtensa: add tests for LBEG/LEND invalidationMax Filippov2012-04-141-0/+50
| | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-xtensa: improve unit tests debuggingMax Filippov2012-04-142-0/+20
| | | | | | | | - add testcase announcement; - add global symbols for individual tests; - add host-debug-* makefile target. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* qemu-iotests: Fix call syntax for qemu-ioStefan Weil2012-04-053-6/+6
| | | | | | | | | | | | qemu-io requires options first, then fixed parameters. GNU getopt also allows options at the end, but POSIX getopt doesn't. Try "export POSIXLY_CORRECT=y" to get the POSIX behaviour with GNU getopt, too. Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Fix call syntax for qemu-imgStefan Weil2012-04-051-2/+7
| | | | | | | | | | | | qemu-img requires first options, then file name, then size. GNU getopt also allows options at the end, but POSIX getopt doesn't. Try "export POSIXLY_CORRECT=y" to get the POSIX behaviour with GNU getopt, too. Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Test unknown qcow2 header extensionsKevin Wolf2012-04-053-0/+149
| | | | | | | The immportant thing here is that header extensions don't get silently dropped when the header is rewritten, e.g. during a rebase. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: qcow2.pyKevin Wolf2012-04-051-0/+207
| | | | | | | | | | | This adds a tool that is meant to inspect and edit qcow2 files in a low-level way, that wouldn't be possible with qemu-img/io, for example by adding yet unknown extensions or flags. This way we can test whether qemu deals properly with future backwards compatible extensions. For now, let's start with the image header and header extensions. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* tests: fix out-of-tree building for lm32 targetMichael Walle2012-03-311-5/+8
| | | | Signed-off-by: Michael Walle <michael@walle.cc>
* qtest: avoid a warning with RTC testBlue Swirl2012-03-301-3/+3
| | | | | | | | | | | Avoid this warning on OpenBSD: CC tests/rtc-test.o /src/qemu/tests/rtc-test.c: In function 'check_time': /src/qemu/tests/rtc-test.c:171: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t' /src/qemu/tests/rtc-test.c:173: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t' Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qtest: fix out of tree buildBlue Swirl2012-03-301-0/+2
| | | | | | | 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-caseAnthony Liguori2012-03-302-0/+268
| | | | | | 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>
* qtest: add C version of test infrastructureAnthony Liguori2012-03-303-3/+746
| | | | | | | | | This also includes a qtest wrapper script to make it easier to launch qtest tests directly. 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 overhaulPaolo Bonzini2012-03-3014-44/+3336
| | | | | | | | | | | | This introduces new test reporting infrastructure based on gtester and gtester-report. Also, all existing tests are moved to tests/, and tests/Makefile is reorganized to factor out the commonalities in the rules. Signed-off-by: Anthony Liguori <aliguori@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qapi: add strict mode to input visitorPaolo Bonzini2012-03-271-1/+4
| | | | | | | | | | | | While QMP in general is designed so that it is possible to ignore unknown arguments, in the case of the QMP server it is better to reject them to detect bad clients. In fact, we're already doing this at the top level in the argument checker. To extend this to complex structures, add a mode to the input visitor where it checks for unvisited keys and raises an error if it finds one. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* test: add test-qmp-commands to make checkMichael Roth2012-03-261-0/+1
| | | | | | | | All the deps are here but the test was never added to the list of tests for 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 referenceMichael Roth2012-03-261-1/+1
| | | | | | | This was added by mistake a while back. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Add 'make check-block'Kevin Wolf2012-03-122-1/+27
| | | | | | Runs the full qemu-iotests suite for various image formats. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
OpenPOWER on IntegriCloud