summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* hw: move headers to include/Paolo Bonzini2013-04-082-2/+2
| | | | | | | | | Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* test-visitor-serialization: Fix some memory leaksStefan Berger2013-04-051-1/+11
| | | | | | | This patch fixes some of the memory leaks in test-visitor-serialization but not all of them. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qcow2: Gather clusters in a looping loopKevin Wolf2013-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Instead of just checking once in exactly this order if there are dependendies, non-COW clusters and new allocation, this starts looping around these. This way we can, for example, gather non-COW clusters after new allocations as long as the host cluster offsets stay contiguous. Once handle_dependencies() is extended so that COW areas of in-flight allocations can be overwritten, this allows to continue with gathering other clusters (we wouldn't be able to do that without this change because we would have missed a possible second dependency in one of the next clusters). This means that in the typical sequential write case, we can combine the COW overwrite of one cluster with the allocation of the next cluster as soon as something like Delayed COW gets actually implemented. It is only by avoiding splitting requests this way that Delayed COW actually starts improving performance noticably. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qcow2: Improve check for overlapping allocationsKevin Wolf2013-03-281-5/+5
| | | | | | | | | The old code detected an overlapping allocation even when the allocations didn't actually overlap, but were only adjacent. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qcow2: Fix "total clusters" number in bdrv_checkKevin Wolf2013-03-281-1/+1
| | | | | | | | | | | | | | | This should be based on the virtual disk size, not on the size of the image. Interesting observation: With some VM state stored in the image file, percentages higher than 100% are possible, even though snapshots themselves are ignored. This is a qcow2 bug to be fixed another day: The VM state should be discarded in the active L2 tables after completing the snapshot creation. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: More concurrent allocation scenariosKevin Wolf2013-03-282-1/+124
| | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* Merge branch 'for-upstream' of git://github.com/mwalle/qemuBlue Swirl2013-03-234-1/+61
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-upstream' of git://github.com/mwalle/qemu: configure: rename OpenGL feature to GLX configure: proper OpenGL/GLX probe target-lm32: use HELPER() macro target-lm32: flush tlb after clearing env target-lm32: remove dead code target-lm32: fix cmpgui and cmpgeui opcodes tests: tcg: lm32: add more test cases target-lm32: don't log cpu state in translation lm32_uart: fix receive buffering milkymist-uart: fix receive buffering lm32-dis: fix NULL pointer dereference target-lm32: fix debug memory access
| * tests: tcg: lm32: add more test casesMichael Walle2013-03-184-1/+61
| | | | | | | | | | | | Esp. for testing zero/sign extend in compare operations. Signed-off-by: Michael Walle <michael@walle.cc>
* | qemu-iotests: add 052 BDRV_O_SNAPSHOT testStefan Hajnoczi2013-03-193-0/+75
|/ | | | | | | | Check that writes to an image opened with BDRV_O_SNAPSHOT do not modify the underlying image file. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* target-mips: fix rndrashift_short_acc and code for EXTR_ instructionsPetar Jovanovic2013-03-173-0/+92
| | | | | | | | | | | | | Fix for rndrashift_short_acc to set correct value to higher 64 bits. This change also corrects conditions when bit 23 of the DSPControl register is set. The existing test files have been extended with several examples that trigger the issues. One bug/example in the test file for EXTR_RS_W has been found and reported by Klaus Peichl. Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* qemu-iotests: use -nographic in test case 007Stefan Hajnoczi2013-03-151-4/+3
| | | | | | | | | | | | | | | A comment explains that -nographic hangs test case 007. This is no longer the case so add -nographic. This makes the test suite faster and more pleasant to run since no windows pop up. I am not sure exactly when -nographic starting working for this case but there is no fundamental reason why graphics are needed here. Make sure the serial port is not on stdio, it would conflict with the monitor. Also remove unnecessary trailing whitespace on these lines. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: add tests for rebasing zero clustersPaolo Bonzini2013-03-153-0/+93
| | | | | | | | | | | If zero clusters are erroneously treated as unallocated, "qemu-img rebase" will copy the backing file's contents onto the cluster. The bug existed also in image streaming, but since the root cause was in qcow2's is_allocated implementation it is enough to test it with qemu-img. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* threadpool: drop global thread poolStefan Hajnoczi2013-03-151-23/+21
| | | | | | | | | | | | | | | | | | Now that each AioContext has a ThreadPool and the main loop AioContext can be fetched with bdrv_get_aio_context(), we can eliminate the concept of a global thread pool from thread-pool.c. The submit functions must take a ThreadPool* argument. block/raw-posix.c and block/raw-win32.c use aio_get_thread_pool(bdrv_get_aio_context(bs)) to fetch the main loop's ThreadPool. tests/test-thread-pool.c must be updated to reflect the new thread_pool_submit() function prototypes. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
* rtc-test: Fix test failures with recent glibCole Robinson2013-03-081-2/+2
| | | | | | | | | | | | | As of glib 2.35.4, glib changed its logic for ordering test cases: https://bugzilla.gnome.org/show_bug.cgi?id=694487 This was causing failures in rtc-test. Group the reordered test cases into their own suite, which maintains the original ordering. CC: qemu-stable@nongnu.org Signed-off-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* target-mips: fix DSP overflow macro and affected routinesPetar Jovanovic2013-03-042-12/+46
| | | | | | | | | | | | | | | The previous implementation incorrectly used same macro to detect overflow for addition and subtraction. This patch makes distinction between these two, and creates separate macros. The affected routines are changed accordingly. This change also includes additions to the existing tests for SUBQ_S_PH and SUBQ_S_W that would trigger the fixed issue, and it removes dead code from the test file. The last test case in subq_s_w.c is a bug found/reported/ isolated by Klaus Peichl from Dolby. Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2013-02-2611-9/+459
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Paolo Bonzini (7) and others # Via Kevin Wolf * kwolf/for-anthony: (22 commits) pc: add compatibility machine types for 1.4 blockdev: enable discard by default qemu-nbd: add --discard option blockdev: add discard suboption to -drive block: implement BDRV_O_UNMAP block: complete all IOs before .bdrv_truncate coroutine: trim down nesting level in perf_nesting test coroutine: move pooling to common code qemu-iotests: Test qcow2 image creation options qemu-iotests: Add qemu-img compare test qemu-img: Add compare subcommand qemu-img: Add "Quiet mode" option block: Add synchronous wrapper for bdrv_co_is_allocated_above block: refuse negative iops and bps values block: use Error in do_check_io_limits() qcow2: support compressed clusters in BlockFragInfo qemu-img: add compressed clusters to BlockFragInfo qemu-img: fix missing space in qemu-img check output qcow2: record fragmentation statistics during check qcow2: introduce check_refcounts_l1/l2() flags ...
| * coroutine: trim down nesting level in perf_nesting testPaolo Bonzini2013-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | 20000 nested coroutines require 20 GB of virtual address space. Only nest 1000 of them so that the test (only enabled with "-m perf" on the command line) runs on 32-bit machines too. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-iotests: Test qcow2 image creation optionsKevin Wolf2013-02-223-0/+336
| | | | | | | | | | | | | | | | | | | | | | Just create lots of images and try out each of the creation options that qcow2 provides (except backing_file/fmt for now) I'm not totally happy with the behaviour of qemu-img in each of the cases, but let's be explicit and update the test when we do change things later. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-iotests: Add qemu-img compare testMiroslav Rezanina2013-02-223-0/+110
| | | | | | | | | | | | | | | | Simple test for qemu-img compare to check it's working correctly. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * qemu-img: add compressed clusters to BlockFragInfoStefan Hajnoczi2013-02-222-1/+2
| | | | | | | | | | | | | | | | Show how many clusters are compressed. This can be used to monitor how many compressed clusters remain and whether to recompress the image. Suggested-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * qemu-img: find the image end offset during checkFederico Simoncelli2013-02-225-8/+11
| | | | | | | | | | | | | | | | | | | | This patch adds the support for reporting the image end offset (in bytes). This is particularly useful after a conversion (or a rebase) where the destination is a block device in order to find the first unused byte at the end of the image. Signed-off-by: Federico Simoncelli <fsimonce@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori2013-02-261-0/+664
|\ \ | | | | | | | | | | | | | | | | | | # By Markus Armbruster # Via Luiz Capitulino * luiz/queue/qmp: check-qjson: More thorough testing of UTF-8 in strings
| * | check-qjson: More thorough testing of UTF-8 in stringsMarkus Armbruster2013-02-211-0/+664
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Test cases are scraped from Markus Kuhn's UTF-8 decoder capability and stress test at http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt Unfortunately, both JSON parser and formatter misbehave right now. This test expects current, incorrect results. They're all clearly marked, and are to be replaced by correct ones as the bugs get fixed. See comments in new utf8_string() for details. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | target-mips: fix for sign-issue in MULQ_W helperPetar Jovanovic2013-02-232-2/+2
| | | | | | | | | | | | | | | | | | | | Correct sign-propagation before multiplication in MULQ_W helper. The change also fixes previously incorrect expected values in the tests for MULQ_RS.W and MULQ_S.W. Signed-off-by: Petar Jovanovic <petarj@mips.com> Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-mips: fix for incorrect multiplication with MULQ_S.PHPetar Jovanovic2013-02-231-0/+15
| | | | | | | | | | | | | | | | The change corrects sign-related issue with MULQ_S.PH. It also includes extension to the already existing test which will trigger the issue. Signed-off-by: Petar Jovanovic <petarj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | Merge branch 'eflags3' of git://github.com/rth7680/qemuBlue Swirl2013-02-231-5/+5
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'eflags3' of git://github.com/rth7680/qemu: (61 commits) target-i386: Use movcond to implement shiftd. target-i386: Discard CC_OP computation in set_cc_op also target-i386: Use movcond to implement rotate flags. target-i386: Use movcond to implement shift flags. target-i386: Add CC_OP_CLR target-i386: Implement tzcnt and fix lzcnt target-i386: Use clz/ctz for bsf/bsr helpers target-i386: Implement ADX extension target-i386: Implement RORX target-i386: Implement SHLX, SARX, SHRX target-i386: Implement PDEP, PEXT target-i386: Implement MULX target-i386: Implement BZHI target-i386: Implement BLSR, BLSMSK, BLSI target-i386: Implement BEXTR target-i386: Implement ANDN target-i386: Implement MOVBE target-i386: Decode the VEX prefixes target-i386: Tidy prefix parsing target-i386: Use CC_SRC2 for ADC and SBB ...
| * test-i386: make it compile with a recent gccPaolo Bonzini2013-02-181-2/+2
| | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * test-i386: QEMU_PACKED is not defined herePaolo Bonzini2013-02-181-3/+3
| | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2013-02-211-0/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Alin Tomescu (1) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: .gitignore: Ignore optionrom/*.asm ppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.c Add some missing qtest binaries to .gitignore xilinx_axienet.c: Assert no error when making link Remove forward declaration of non-existant variable
| * | Add some missing qtest binaries to .gitignoreDavid Gibson2013-02-211-0/+7
| |/ | | | | | | | | | | | | | | These binaries are generated during make check on at least some configurations, so att them to .gitignore. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | rtc-test: add testcases for alarms in 12hour modePaolo Bonzini2013-02-181-3/+199
| | | | | | | | | | | | | | | | | | | | | | Trying (unsuccessfully) to break the device model as mentioned in https://bugs.launchpad.net/qemu/+bug/1090558. At least if someone tries to fix that, it won't break what works... Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1357922817-17584-3-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | rtc-test: always set register B in its entiretyPaolo Bonzini2013-02-181-27/+9
|/ | | | | | | | Eliminate dependencies between one test and the others. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1357922817-17584-2-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qtest: Add MMIO supportAndreas Färber2013-02-184-28/+250
| | | | | | | | | | | | | Introduce [qtest_]{read,write}[bwlq]() libqtest functions and corresponding QTest protocol commands to replace local versions in libi2c-omap.c. Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b(). Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1361051043-27944-4-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* libqtest: Introduce qtest_qmpv() and convert remaining macroAndreas Färber2013-02-182-5/+29
| | | | | | | | | | | | | In order to convert qmp() macro to an inline function, expose a qtest_qmpv() function, reused by qtest_qmp(). We can't apply GCC_FMT_ATTR() since fdc-test is using zero-length format strings, which would result in warnings treated as errors. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1361051043-27944-3-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* libqtest: Convert macros to functions and clean up documentationAndreas Färber2013-02-181-50/+110
| | | | | | | | | | | | | | | | | libqtest.h provides a number of shortcut macros to avoid tests feeding it the QTestState they operate on. Most of these can easily be turned into static inline functions, so let's do that for clarity. This avoids getting off-by-one error messages when passing wrong args. Some macros had a val argument but documented @value argument. Fix this. While touching things, enforce gtk-doc markup for return values and for referencing types. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1361051043-27944-2-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* tests: Add unit tests for mulu64 and muls64Richard Henderson2013-02-172-1/+75
| | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* libi2c-omap: Fix endianness dependencyAndreas Färber2013-02-111-23/+53
| | | | | | | | | | | | | | | | The libqos driver for omap_i2c currently does not work on Big Endian. Introduce helpers for reading from and writing to 16-bit armel registers. This fixes tmp105-test failures on ppc. To prepare for a QTest-level endianness solution, poison mem{read,write} and always use the helpers. Adopt the expected signatures. To avoid an unused variable warning, assert the STAT Single Byte Data bit but, due to it not getting cleared, only it being set when len == 1. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Message-id: 1360600914-5448-3-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* libqtest: Fix documentation copy&paste errorsAndreas Färber2013-02-111-6/+0
| | | | | | | | The [qtest_]in[bwl]() functions/macros don't have a value argument. Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1360604139-16797-1-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* tests/test-string-input-visitor: Handle errors provoked by fuzz testPeter Maydell2013-02-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | It's OK and expected for visitors to return errors when presented with the fuzz test's random data. Since the fuzzer doesn't care about errors, we pass in NULL rather than an Error**. This fixes a bug in the fuzzer where it was passing the same Error** into each visitor, with the effect that once one visitor returned an error, each later visitor would notice that it had been passed in an Error** representing an already set error, and do nothing. For the case of visit_type_str() we also need to handle the case where an error means that the visitor doesn't set our char*. We initialize the pointer to NULL so we can safely g_free() it regardless of whether the visitor allocated a string for us or not. This fixes a problem where this test failed the MacOSX malloc() consistency checks and might segfault on other platforms [due to calling free() on an uninitialized pointer variable when visit_type_str() failed.]. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* cutils: unsigned int parsing functionsEduardo Habkost2013-02-042-0/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are lots of duplicate parsing code using strto*() in QEMU, and most of that code is broken in one way or another. Even the visitors code have duplicate integer parsing code[1]. This introduces functions to help parsing unsigned int values: parse_uint() and parse_uint_full(). Parsing functions for signed ints and floats will be submitted later. parse_uint_full() has all the checks made by opts_type_uint64() at opts-visitor.c: - Check for NULL (returns -EINVAL) - Check for negative numbers (returns -EINVAL) - Check for empty string (returns -EINVAL) - Check for overflow or other errno values set by strtoll() (returns -errno) - Check for end of string (reject invalid characters after number) (returns -EINVAL) parse_uint() does everything above except checking for the end of the string, so callers can continue parsing the remainder of string after the number. Unit tests included. [1] string-input-visitor.c:parse_int() could use the same parsing code used by opts-visitor.c:opts_type_int(), instead of duplicating that logic. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sparc: disable qtest in make checkAnthony Liguori2013-02-011-2/+2
| | | | | | | | | | | | | | | We've seen this repeatedly in buildbot but I can now reliably reproduce it myself too. With a few hundred runs of 'make check', qemu-system-sparc will hang consuming 100% CPU. I've attached GDB to the hung process and unfortunately, I can't get anything useful out of GDB (RIP is not a valid simple and there is nothing else on the stack). At any rate, since this only manifests in qemu-system-sparc and it doesn't appear to be a qtest specific problem, I think we should disable it until the problem is resolved. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori2013-02-015-2/+148
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Kevin Wolf (7) and others # Via Stefan Hajnoczi * stefanha/block: block/raw-posix: Build fix for O_ASYNC vmdk: Allow space in file name parallels: Fix bdrv_open() error handling dmg: Use g_free instead of free dmg: Fix bdrv_open() error handling vpc: Fix bdrv_open() error handling cloop: Fix bdrv_open() error handling bochs: Fix bdrv_open() error handling sheepdog: pass vdi_id to sheep daemon for sd_close() vmdk: Allow selecting SCSI adapter in image creation block: Adds mirroring tests for resized images block: Fix is_allocated_above with resized files qemu-iotests: Add regression test for b7ab0fea
| * block: Adds mirroring tests for resized imagesVishvananda Ishaya2013-02-012-2/+50
| | | | | | | | | | | | | | | | | | | | This test verifies two mirroring issues are fixed with resized images: * sync='top' creates an image that is the proper size * sync='full' doesn't cause an assertion failure and crash qemu Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * qemu-iotests: Add regression test for b7ab0feaKevin Wolf2013-02-013-0/+98
| | | | | | | | | | | | | | | | It turned out that the change in b7ab0fea was actually a real qcow2 corruption fix. This is a reproducer for the bug. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | libqtest: Wait for the right child PID after killing QEMUEduardo Habkost2013-02-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running "make check" with gcov enabled, we get the following message: hw/tmp105.gcda:cannot open data file, assuming not executed The problem happens because: * tmp105-test exits before QEMU exits, because waitpid() at qtest_quit() fails; * waitpid() fails because there's another process already waiting for the QEMU process; * The process that is already waiting for QEMU is the child created by qtest_init() to run system(); * qtest_quit() is incorrectly waiting for the QEMU PID directly instead of the child created by qtest_init(). This fixes the problem by sending SIGTERM to QEMU, but waiting for the child process created by qtest_init() (that exits immediately after QEMU exits). Reported-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Add XBZRLE testingOrit Wasserman2013-02-012-0/+199
|/ | | | | | | | 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>
* target-mips: fix incorrect test for MTHLIPPetar Jovanovic2013-01-311-1/+1
| | | | | | | | | The pos field in the DSPControl register is not correctly initialized. Per documentation, the result of MTHLIP is unpredictable if the value of the pos field before the execution is greater than 32. Signed-off-by: Petar Jovanovic <petarj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* tests: Fix {rtc, m48t59}-test build on illumosAndreas Färber2013-01-302-0/+4
| | | | | | | | | Struct tm does not have tm_gmtoff field on illumos. Fix the build by not zero-initializing these fields on Solaris. Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori2013-01-283-1/+119
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * afaerber/qom-cpu: (37 commits) kvm: Pass CPUState to kvm_on_sigbus_vcpu() cpu: Unconditionalize CPUState fields target-m68k: Use type_register() instead of type_register_static() target-unicore32: Use type_register() instead of type_register_static() target-openrisc: Use type_register() instead of type_register_static() target-unicore32: Catch attempt to instantiate abstract type in cpu_init() target-openrisc: Catch attempt to instantiate abstract type in cpu_init() target-m68k: Catch attempt to instantiate abstract type in cpu_init() target-arm: Catch attempt to instantiate abstract type in cpu_init() target-alpha: Catch attempt to instantiate abstract type in cpu_init() qom: Introduce object_class_is_abstract() target-unicore32: Detect attempt to instantiate non-CPU type in cpu_init() target-openrisc: Detect attempt to instantiate non-CPU type in cpu_init() target-m68k: Detect attempt to instantiate non-CPU type in cpu_init() target-alpha: Detect attempt to instantiate non-CPU type in cpu_init() target-arm: Detect attempt to instantiate non-CPU type in cpu_init() cpu: Add model resolution support to CPUClass target-i386: Remove setting tsc-frequency from x86_def_t target-i386: Set custom features/properties without intermediate x86_def_t target-i386: Remove vendor_override field from CPUX86State ... Conflicts: tests/Makefile Resolved simple conflict caused by lack of context in Makefile Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * target-i386: Topology & APIC ID utility functionsEduardo Habkost2013-01-273-1/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/ The code should be compatible with AMD's "Extended Method" described at: AMD CPUID Specification (Publication #25481) Section 3: Multiple Core Calcuation as long as: - nr_threads is set to 1; - OFFSET_IDX is assumed to be 0; - CPUID Fn8000_0008_ECX[ApicIdCoreIdSize[3:0]] is set to apicid_core_width(). Unit tests included. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
OpenPOWER on IntegriCloud