summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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 '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>
* make check: Add qemu-iotests subsetKevin Wolf2012-03-122-0/+22
| | | | | | Run the 'quick' group from qemu-iotests during 'make check'. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Mark some tests as quickKevin Wolf2012-03-121-12/+12
| | | | | | | | This creates a new test group 'quick' for some test case that take at most a couple of seconds each, so that the group can be run during a quick 'make check' Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Merge branch 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensaBlue Swirl2012-03-032-0/+224
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa: target-xtensa: add breakpoint tests target-xtensa: add DEBUG_SECTION to overlay tool target-xtensa: add DBREAK data breakpoints exec: let cpu_watchpoint_insert accept larger watchpoints exec: fix check_watchpoint exiting cpu_loop exec: add missing breaks to the watch_mem_write target-xtensa: add ICOUNT SR and debug exception target-xtensa: implement instruction breakpoints target-xtensa: add DEBUGCAUSE SR and configuration target-xtensa: fetch 3rd opcode byte only when needed target-xtensa: implement info tlb monitor command target-xtensa: define TLB_TEMPLATE for MMU-less cores
| * target-xtensa: add breakpoint testsMax Filippov2012-02-202-0/+224
| | | | | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* | qemu-iotests: Test rebase with short backing fileKevin Wolf2012-02-292-0/+6
| | | | | | | | | | | | | | | | This tests that qemu-img rebase doesn't assume that the backing file has the same size as the image, but considers that it can be smaller. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | qemu-iotests: 026: Reduce output changes for cache=none qcow2Kevin Wolf2012-02-292-2/+8
| | | | | | | | | | | | | | | | | | | | qemu-iotests supports the -nocache option which makes the tests run with cache=none. For blkdebug tests with qcow2 this means that we may see test results that differ from cache=writethrough. This patch makes the diff a bit smaller and therefore easier to review. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | qemu-iotests: Filter out DOS line endingsKevin Wolf2012-02-291-1/+7
| | | | | | | | | | | | | | | | This one makes it possible to run qemu-iotests on a Windows build using Wine and get somewhat meaningful results. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | test: add image streaming testsStefan Hajnoczi2012-02-293-0/+157
| | | | | | | | | | | | | | | | | | This patch adds a test suite for the image streaming feature. It exercises the 'block_stream', 'block_job_cancel', 'block_job_set_speed', and 'query-block-jobs' QMP commands. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | qemu-iotests: add iotests Python moduleStefan Hajnoczi2012-02-291-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Block layer tests that involve QMP commands rather than qemu-img or qemu-io are not well-suited for shell scripting. This patch adds a Python module which allows tests to be written in Python instead. The basic API is: VM - class for launching and interacting with a VM QMPTestCase - abstract base class for tests that use QMP qemu_img() - wrapper function for invoking qemu-img qemu_io() - wrapper function for invoking qemu-io imgfmt - the image format under test (e.g. qcow2, qed) test_dir - scratch directory path for temporary files main() - entry point for running tests Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | qemu-iotests: export TEST_DIR for non-bash testsStefan Hajnoczi2012-02-291-0/+2
| | | | | | | | | | | | | | | | | | Since qemu-iotests may need to create large image files it is possible to specify the test directory. The TEST_DIR variable needs to be exported so non-bash tests can make use of it. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | Merge qemu-iotests into for-anthonyKevin Wolf2012-02-2369-0/+153385
|\ \
| * | qemu-iotests: common.config: Allow use of arbitrary qemu* pathsLucas Meneghel Rodrigues2012-02-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we might want to test arbitrary qemu, qemu-img and qemu-io paths, allow users to specify environment variable values for QEMU_PROG, QEMU_IMG_PROG and QEMU_IO_PROG so the testsuite will use those values rather than find them on PATH. Obviously, if such env variables are not set prior to script execution, normal detection mechanism takes place. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: check: print relevant path informationLucas Meneghel Rodrigues2012-02-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Print the paths of the programs under test (qemu, qemu-img and qemu-io). Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: test loading internal snapshotsKevin Wolf2012-02-233-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | Test loading internal snapshots where the L1 table of the snapshot is smaller than the current L1 table. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: Update filter for default cluster sizeKevin Wolf2012-02-232-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until recently, qemu-img create displayed cluster_size=0 for the default cluster size. It is changed to display the real cluster size now, which results in the cluster size not being filtered out any more. If the cluster size is specified explicitly in CLUSTER_SIZE, keep the output, and if using the default, filter it out. This mostly restores the old behaviour of the test cases; test 015 must be fixed to use CLUSTER_SIZE instead of using extra_img_options for it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: add qed support to 025 image resize testStefan Hajnoczi2012-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QED now supports the truncate (aka resize) operation for growing images. Update test 025 so it runs for QED. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: Update rbd supportJosh Durgin2012-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | rbd implements bdrv_truncate, so test 025 will work. Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: common.config: Fix no $TEST_DIR directoryMitnick Lyu2012-02-231-1/+5
| | | | | | | | | | | | | | | | | | | | | mkdir $TEST_DIR on common.config first run Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: only run 016 for file and sheepdog protocolsChristoph Hellwig2012-02-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 016 writes past EOF which isn't support by most protocols, so limit it to file and sheepdog, which explicitly support it. Pointed out by Josh Durgin <josh.durgin@dreamhost.com>. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: Use zero-based offsets for IO patternsStefan Hajnoczi2012-02-2312-1863/+1873
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The io_pattern style functions have the following loop: for i in `seq 1 $count`; do echo ... $(( start + i * step )) ... done Offsets are 1-based so start=1024, step=512, count=4 yields: 1536, 2048, 2560, 3072 Normally we expect: 1024, 1536, 2048, 2560 Most tests ignore this detail, which means that they perform I/O to a slightly different range than expected by the test author. Later on things got less innocent and tests started trying to compensate for the 1-based indexing. This included negative start values in test 024 and my own attempt with count-1 in test 028! The end result is that tests that use io_pattern are hard to reason about and don't work the way you'd expect. It's time to clean this mess up. This patch switches io_pattern to 0-based offsets. This requires adjusting the golden outputs since I/O ranges are now shifted and output differs. Verifying these output diffs is easy, however. Each diff hunk moves one I/O from beyond the end of the pattern range to the beginning. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: add support for rbd and sheepdog protocolsMORITA Kazutaka2012-02-2331-4/+89
| | | | | | | | | | | | | | | | | | | | | | | | This patch introduces tests for protocols other than file, and initially supports rbd and sheepdog. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: filter IMGFMT correctly in 019Stefan Hajnoczi2012-02-233-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test 019 can be run with qcow2 and qed image formats. Replace the specific image format value with "IMGFMT" so the golden output does not hardcode qcow2 or qed. This patch also includes a typo fix for "occurrences". Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: README: Fix spellingStefan Weil2012-02-231-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: add support for qed formatStefan Hajnoczi2012-02-239-9/+16
| | | | | | | | | | | | | | | Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | qemu-iotests: filter TEST_DIR correctly in 019Christoph Hellwig2012-02-232-3/+3
| | | | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: fix 019 golden outputKevin Wolf2012-02-221-15/+562
| | | | | | | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
OpenPOWER on IntegriCloud