- 28 5月, 2014 1 次提交
-
-
由 Fam Zheng 提交于
We should allow testing this on tmpfs. Any cache setting in iotests should try to obey $CACHEMODE. The cache mode is still "none" by default but overridable Signed-off-by: NFam Zheng <famz@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 25 5月, 2014 2 次提交
-
-
由 Michael Walle 提交于
Instead of the lm32-sys device, use semihosting to print to the host console and exit the test. Signed-off-by: NMichael Walle <michael@walle.cc>
-
由 Michael Walle 提交于
Make test cases independent from from each other. Eg. if a test case needs a specific value in register A, don't rely on the fact that it is already set by the preceding test case. Signed-off-by: NMichael Walle <michael@walle.cc>
-
- 19 5月, 2014 10 次提交
-
-
由 Peter Lieven 提交于
this patch tries to optimize zero write requests by automatically using bdrv_write_zeroes if it is supported by the format. This significantly speeds up file system initialization and should speed zero write test used to test backend storage performance. I ran the following 2 tests on my internal SSD with a 50G QCOW2 container and on an attached iSCSI storage. a) mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/vdX QCOW2 [off] [on] [unmap] ----- runtime: 14secs 1.1secs 1.1secs filesize: 937M 18M 18M iSCSI [off] [on] [unmap] ---- runtime: 9.3s 0.9s 0.9s b) dd if=/dev/zero of=/dev/vdX bs=1M oflag=direct QCOW2 [off] [on] [unmap] ----- runtime: 246secs 18secs 18secs filesize: 51G 192K 192K throughput: 203M/s 2.3G/s 2.3G/s iSCSI* [off] [on] [unmap] ---- runtime: 8mins 45secs 33secs throughput: 106M/s 1.2G/s 1.6G/s allocated: 100% 100% 0% * The storage was connected via an 1Gbit interface. It seems to internally handle writing zeroes via WRITESAME16 very fast. Signed-off-by: NPeter Lieven <pl@kamp.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Like qcow2 since commit 6d33e8e7, error out on invalid lengths instead of silently truncating them to 1023. Also don't rely on bdrv_pread() catching integer overflows that make len negative, but use unsigned variables in the first place. Cc: qemu-stable@nongnu.org Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
A huge image size could cause s->l1_size to overflow. Make sure that images never require a L1 table larger than what fits in s->l1_size. This cannot only cause unbounded allocations, but also the allocation of a too small L1 table, resulting in out-of-bounds array accesses (both reads and writes). Cc: qemu-stable@nongnu.org Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Too large L2 table sizes cause unbounded allocations. Images actually created by qemu-img only have 512 byte or 4k L2 tables. To keep things consistent with cluster sizes, allow ranges between 512 bytes and 64k (in fact, down to 1 entry = 8 bytes is technically working, but L2 table sizes smaller than a cluster don't make a lot of sense). This also means that the number of bytes on the virtual disk that are described by the same L2 table is limited to at most 8k * 64k or 2^29, preventively avoiding any integer overflows. Cc: qemu-stable@nongnu.org Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Kevin Wolf 提交于
Huge values for header.cluster_bits cause unbounded allocations (e.g. for s->cluster_cache) and crash qemu this way. Less huge values may survive those allocations, but can cause integer overflows later on. The only cluster sizes that qemu can create are 4k (for standalone images) and 512 (for images with backing files), so we can limit it to 64k. Cc: qemu-stable@nongnu.org Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
-
由 Fam Zheng 提交于
The test test_stream_pause in this class uses vm.pause_drive, which requires a blkdebug driver on top of image, otherwise it's no-op and the test running is undeterministic. So add it. Signed-off-by: NFam Zheng <famz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
The shell script attempts to suppress core dumps like this: old_ulimit=$(ulimit -c) ulimit -c 0 $QEMU_IO arg... ulimit -c "$old_ulimit" This breaks the test hard unless the limit was zero to begin with! ulimit sets both hard and soft limit by default, and (re-)raising the hard limit requires privileges. Broken since it was added in commit dc68afe0. Could be fixed by adding -S to set only the soft limit, but I'm not sure how portable that is in practice. Simply do it in a subshell instead, like this: (ulimit -c 0; exec $QEMU_IO arg...) Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Add a test for the JSON protocol driver. Signed-off-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Add some test cases for qdict_join(). Signed-off-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Jeff Cody 提交于
This adds a test for VHDX images created by Microsoft's tool, Disk2VHD. VHDX images created by this tool have 2 identical header sections, with identical sequence numbers. This makes sure we detect VHDX images with identical headers, and do not flag them as corrupt. Signed-off-by: NJeff Cody <jcody@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 16 5月, 2014 3 次提交
-
-
由 Benoît Canet 提交于
The purpose of this change is to help create a json file containing common definitions; each bit of generated C code must be emitted only one time. A second history global to all QAPISchema instances has been added to detect when a file is included more than one time and skip these includes. It does not act as a stack and the changes made to it by the __init__ function are propagated back to the caller so it's really a global state. Signed-off-by: NBenoit Canet <benoit@irqsave.net> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Markus Armbruster 提交于
We commonly use the error API like this: err = NULL; foo(..., &err); if (err) { goto out; } bar(..., &err); Every error source is checked separately. The second function is only called when the first one succeeds. Both functions are free to pass their argument to error_set(). Because error_set() asserts no error has been set, this effectively means they must not be called with an error set. The qapi-generated code uses the error API differently: // *errp was initialized to NULL somewhere up the call chain frob(..., errp); gnat(..., errp); Errors accumulate in *errp: first error wins, subsequent errors get dropped. To make this work, the second function does nothing when called with an error set. Requires non-null errp, or else the second function can't see the first one fail. This usage has also bled into visitor tests, and two device model object property getters rtc_get_date() and balloon_stats_get_all(). With the "accumulate" technique, you need fewer error checks in callers, and buy that with an error check in every callee. Can be nice. However, mixing the two techniques is confusing. You can't use the "accumulate" technique with functions designed for the "check separately" technique. You can use the "check separately" technique with functions designed for the "accumulate" technique, but then error_set() can't catch you setting an error more than once. Standardize on the "check separately" technique for now, because it's overwhelmingly prevalent. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Markus Armbruster 提交于
When visit_start_struct() fails, visit_end_struct() must not be called. Three out of four visit_type_TestStruct() call it anyway. As far as I can tell, visit_start_struct() doesn't actually fail there. Fix them anyway. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 15 5月, 2014 1 次提交
-
-
由 Peter Maydell 提交于
This reverts commit f915db07. This commit is broken because it does not account for the build tree and the source tree being different, and can cause build failures for out-of-tree builds. Revert it until we can identify a better solution to the problem. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1400153676-30180-1-git-send-email-peter.maydell@linaro.org Acked-by: NKevin Wolf <kwolf@redhat.com>
-
- 14 5月, 2014 1 次提交
-
-
由 Juan Quintela 提交于
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case where the ".fields" indentation was wrong: .fields = (VMStateField []) { and .fields = (VMStateField []) { Change all the combinations to: .fields = (VMStateField[]){ The biggest problem (appart from aesthetics) was that checkpatch complained when we copy&pasted the code from one place to another. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 10 5月, 2014 4 次提交
-
-
由 Jeff Cody 提交于
This is an initial, simple live migration test from one running VM to another, using monitor commands. This is also an example of using the new common.qemu functions for controlling multiple running qemu instances, for tests that need a live qemu vm. Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Jeff Cody 提交于
The new functionality of common.qemu implements the QEMU control and communication functionality that was originally in test 085. This removes that now-duplicate functionality, and uses the common.qemu functions. The QEMU commandline changes slightly due to this; in addition to monitor and qmp i/o options, the new QEMU commandline from inside common.qemu now introduces -machine accel=qtest. Reviewed-by: NBenoit Canet <benoit@irqsave.net> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Jeff Cody 提交于
This creates some common functions for bash language qemu-iotests to control, and communicate with, a running QEMU process. 4 functions are introduced: 1. _launch_qemu() This launches the QEMU process(es), and sets up the file descriptors and fifos for communication. You can choose to launch each QEMU process listening for either QMP or HMP monitor. You can call this function multiple times, and save the handle returned from each. The returned handle is in $QEMU_HANDLE. You must copy this value. Commands 2 and 3 use the handle received from _launch_qemu(), to talk to the appropriate process. 2. _send_qemu_cmd() Sends a command string, specified by $2, to QEMU. If $3 is non-NULL, _send_qemu_cmd() will wait to receive $3 as a required result string from QEMU. Failure to receive $3 will cause the test to fail. The command can optionally be retried $qemu_cmd_repeat number of times. Set $qemu_error_no_exit to not force the test the fail on exit; in this case, $QEMU_STATUS[$1] will be set to -1 on failure. 3. _timed_wait_for() Waits for a response, for up to a default of 10 seconds. If $2 is not seen in that time (anywhere in the response), then the test fails. Primarily used by _send_qemu_cmd, but could be useful standalone, as well. To prevent automatic exit (and therefore test failure), set $qemu_error_no_exit to a non-NULL value. If $silent is a non-NULL value, then output to stdout will be suppressed. 4. _cleanup_qemu() Kills the running QEMU processes, and removes the fifos. Signed-off-by: NJeff Cody <jcody@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Kevin Wolf 提交于
The immediately visible effect of this patch is that it fixes committing a temporary snapshot to its backing file. Previously, it would fail with a "permission denied" error because bdrv_inherited_flags() forced the backing file to be read-only, ignoring the r/w reopen of bdrv_commit(). The bigger problem this revealed is that the original open flags must actually only be applied to the temporary snapshot, and the original image file must be treated as a backing file of the temporary snapshot and get the right flags for that. Reported-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 09 5月, 2014 9 次提交
-
-
由 Markus Armbruster 提交于
visit_type_TestStruct() does nothing when called with an error set. Callers shouldn't do that, and no caller does. Drop the superfluous test. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Fam Zheng 提交于
Signed-off-by: NFam Zheng <famz@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Fam Zheng 提交于
This will return cluster_size and needs_compressed_writes to caller, if all the extents have the same value (or there's only one extent). Otherwise return -ENOTSUP. cluster_size is only reported for sparse formats. Signed-off-by: NFam Zheng <famz@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Max Reitz 提交于
Currently, QEMU's iotests rely on /usr/bin/env to start the correct Python (that is, at least Python 2.4, but not 3). On systems where Python 3 is the default, the user has no clean way of making the iotests use the correct binary. This commit makes the iotests use the Python selected by configure. Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Lluís Vilanova 提交于
The primitive uses JSON syntax, and include paths are relative to the file using the directive: { 'include': 'path/to/file.json' } Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Lluís Vilanova 提交于
Use an explicit input file on the command-line instead of reading from standard input. It also outputs the proper file name when there's an error. Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Lluís Vilanova 提交于
Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Lluís Vilanova 提交于
Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 08 5月, 2014 1 次提交
-
-
由 Peter Maydell 提交于
The test_path binary is (unlike the other test binaries in tests/tcg) actually intended to be compiled with the same compiler used to build the main QEMU executables. It actually #includes a number of the QEMU source files in an attempt to unit-test the util/path.c functions, and so if it is not compiled with the same compiler used by configure to set CONFIG_ settings then it is liable to fail to build. Fix the makefile to build it with the default C compiler rules, not CC_I386, and fix the test itself not to include a lot of unnecessary trace related source files which cause the build to fail if the trace backend is anything other than 'simple'. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 06 5月, 2014 8 次提交
-
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Test both the ich6 and the ich9 version (cf. q35 config) and all the codecs. Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
POSIX specifies that address_len shall on output specify the length of the stored address; it does not however specify whether it may get updated on failure as well to, e.g., zero. In case EINTR occurs, re-initialize the variable to the desired value. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
We're not using the GLib infrastructure here, to allow cleaning up the sockets. Still, knowing why a certain test run failed can be valuable. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
In practice this seems very unlikely, so cleanup is neglected, as done for bind(). Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-