summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* misc: Fix new typos in commentsStefan Weil2015-01-151-1/+1
| | | | | | | | | | | recieve -> receive suprise -> surprise Cc: Igor Mammedov <imammedo@redhat.com> Cc: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* tests/hd-geo-test.c: Remove unused test_image variablePeter Maydell2015-01-151-2/+0
| | | | | | | Remove unused variable test_image; this silences a clang warning. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* test-coroutine: avoid overflow on 32-bit systemsPaolo Bonzini2015-01-131-1/+1
| | | | | | | | | | unsigned long is not large enough to represent 1000000000 * duration there. Just use floating point. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 1417518350-6167-4-git-send-email-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: Add supported os parameter for python testsFam Zheng2015-01-131-1/+4
| | | | | | | | | | | If I understand correctly, qemu-iotests never meant to be portable. We only support Linux for all the shell cases, but didn't specify it for python tests. Now add this and default all the python tests as Linux only. If we cares enough later, we can override the parameter in individual cases. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: Add "_supported_os Linux" to 058Fam Zheng2015-01-131-0/+1
| | | | | | | | | | Other cases have this, and this test is not portable as well, as we want to add "make check-block" to "make check", it shouldn't fail on Mac OS X. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: Replace "/bin/true" with "true"Fam Zheng2015-01-133-3/+3
| | | | | | | The former is not portable because on Mac OSX it is /usr/bin/true. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* libqos: Convert malloc-pc allocator to a generic allocatorMarc Marí2015-01-135-299/+309
| | | | | | | | | | | | | | The allocator in malloc-pc has been extracted, so it can be used in every arch. This operation showed that both the alloc and free functions can be also generic. Because of this, the QGuestAllocator has been removed from is function to wrap the alloc and free function, and now just contains the allocator parameters. As a result, only the allocator initalizer and unitializer are arch dependent. Signed-off-by: Marc Marí <marc.mari.barcelo@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* iotests: Filter out "I/O thread spun..." warningMax Reitz2015-01-138-10/+12
| | | | | | | | | | | Filter out the "main loop: WARNING: I/O thread spun for..." warning from qemu output (it hardly matters for code specifically testing I/O). Furthermore, use _filter_qemu in all the custom functions which run qemu. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Test blockdev-backup in 055Fam Zheng2015-01-132-39/+176
| | | | | | | | | | | | | This applies cases on drive-backup on blockdev-backup, except cases with target format and mode. Also add a case to check source == target. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1418899027-8445-5-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
* iotests: Add test for relative backing file namesMax Reitz2015-01-133-0/+114
| | | | | | | | | | | | | | | | Sometimes, qemu does not have a filename to work with, so it does not know which directory to use for a backing file specified by a relative filename. Add a test which tests that qemu exits with an appropriate error message. Additionally, add a test for qemu-img create with a backing filename relative to the backed image's base directory while omitting the image size. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Speed up make check-blockFam Zheng2015-01-132-1/+2
| | | | | | | | | | | | Using /tmp, which is usually mounted as tmpfs, the quick group can be quicker. On my laptop (Lenovo T430s with Fedora 20), this reduces the time from 50s to 30s. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Remove 091 from quick groupFam Zheng2015-01-131-1/+1
| | | | | | | For the purpose of allowing running quick group on tmpfs. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* target-xtensa: test cross-page opcodeMax Filippov2014-12-171-13/+13
| | | | | | Alter cross-page TB test to also test cross-page opcode. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* Split the QEMU buffered file code outDr. David Alan Gilbert2014-12-161-1/+2
| | | | | | | | The splitting of qemu-file and addition of the buffered file landed at the same time; so now split the buffered file code out. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
* Start migrating migration code into a migration directoryDr. David Alan Gilbert2014-12-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | The migration code now occupies a fair chunk of the top level .c files, it seems time to give it it's own directory. I've not touched: arch_init.c - that's mostly RAM migration but has a few random other bits savevm.c - because it's built target specific This is purely a code move; no code has changed. - it fails checkpatch because of old violations, it feels safer to keep this as purely a move and fix those at some mythical future date. The xbzrle and vmstate tests are now only run for softmmu builds since they require files in the migrate/ directory which is only built for softmmu. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
* qemu-iotests: Remove traling whitespaces in *.outFam Zheng2014-12-1280-438/+438
| | | | | | | | | | | | This is simply: $ cd tests/qemu-iotests; sed -i -e 's/ *$//' *.out Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1418110684-19528-2-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* iotests: Fix test 039Max Reitz2014-12-122-8/+16
| | | | | | | | | | | | Test 039 used qemu-io -c abort for simulating a qemu crash; however, abort() generally results in a core dump and ulimit -c 0 is no reliable way of preventing that. Use "sigraise $(kill -l KILL)" instead to have it crash without a core dump. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 1418032092-16813-4-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* iotests: Filter for "Killed" in qemu-io outputMax Reitz2014-12-121-1/+1
| | | | | | | | | | _filter_qemu_io already filters out the process ID when qemu-io is aborted; the same should be done when it is killed. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 1418032092-16813-3-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* iotests: Add test for vmdk JSON file namesMax Reitz2014-12-122-0/+10
| | | | | | | | | | | Add a test for vmdk files which use a file with a JSON file name, and which then try to open extents. That should fail and the error message should at least try to look helpful. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 1417615043-26174-3-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: Skip 099 for VMDK subformats with desc fileFam Zheng2014-12-101-1/+2
| | | | | | | | | | VMDK extent parsing code doesn't handle the JSON file name, so the case fails for these subformats. Disabled them. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1417571370-19495-1-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qcow2: Flushing the caches in qcow2_close may failMax Reitz2014-12-103-0/+130
| | | | | | | | | | | | | | qcow2_cache_flush() may fail; if one of the caches failed to be flushed successfully to disk in qcow2_close() the image should not be marked clean, and we should emit a warning. This breaks the (qcow2-specific) iotests 026, 071 and 089; change their output accordingly. Cc: qemu-stable@nongnu.org Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* iotests: Add test for unsupported image creationMax Reitz2014-12-103-0/+92
| | | | | | | | | | | Add a test for creating and amending images (amendment uses the creation options) with formats not supporting creation over protocols not supporting creation. Cc: qemu-stable@nongnu.org Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* iotests: Only kill NBD server if it runsMax Reitz2014-12-101-1/+3
| | | | | | | | | | | | There may be NBD tests which do not create a sample image and simply test whether wrong usage of the protocol is rejected as expected. In this case, there will be no NBD server and trying to kill it during clean-up will fail. Cc: qemu-stable@nongnu.org Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* iotests: Specify qcow2 format for qemu-io in 059Max Reitz2014-12-101-2/+2
| | | | | | | | | | | There are two instances of iotest 059 using qemu-io on a qcow2 image. As of "qemu-iotests: Use qemu-io -f $IMGFMT" the iotests can no longer rely on $QEMU_IO doing probing, therefore the qcow2 format has to be specified explicitly here. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: 082: Filter the real disk sizeMichael Mueller2014-12-102-42/+21
| | | | | | | | | The real on-disk size of an image depends on things like the host filesystem. _img_info already filters it out, use the function in 082. Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: 060: Filter the real disk sizeKevin Wolf2014-12-103-5/+13
| | | | | | | | | The real on-disk size of an image depends on things like the host filesystem. _img_info already filters it out, use the function in 060. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Michael Mueller <mimu@linux.vnet.ibm.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* block: Don't probe for unknown backing file formatKevin Wolf2014-12-103-0/+75
| | | | | | | | | | | | | | | | | | If a qcow2 image specifies a backing file format that doesn't correspond to any format driver that qemu knows, we shouldn't fall back to probing, but simply error out. Not looking up the backing file driver in bdrv_open_backing_file(), but just filling in the "driver" option if it isn't there moves us closer to the goal of having everything in QDict options and gets us the error handling of bdrv_open(), which correctly refuses unknown drivers. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416935562-7760-4-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qcow2.py: Add required padding for header extensionsKevin Wolf2014-12-101-0/+4
| | | | | | | | | | | The qcow2 specification requires that the header extension data be padded to round up the extension size to the next multiple of 8 bytes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416935562-7760-3-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qcow2: Fix header extension size checkKevin Wolf2014-12-102-0/+4
| | | | | | | | | | | | | | | | | After reading the extension header, offset is incremented, but not checked against end_offset any more. This way an integer overflow could happen when checking whether the extension end is within the allowed range, effectively disabling the check. This patch adds the missing check and a test case for it. Cc: qemu-stable@nongnu.org Reported-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416935562-7760-2-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Test writing non-raw image headers to raw imageKevin Wolf2014-12-104-0/+364
| | | | | | | | | | This is forbidden if the raw driver was probed. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416497234-29880-10-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Fix stderr handling in common.qemuKevin Wolf2014-12-101-1/+2
| | | | | | | | | | | | | | | | | The original intention was to pipe stderr of qemu into $fifo_out. However, the redirections were specified in the wrong order for this. This patch fixes it. Now qemu's output on stderr can be retrieved with _send_qemu_cmd, which applies several useful filters on the output that were missing before. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416497234-29880-9-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qtests: Specify image format explicitlyKevin Wolf2014-12-1012-18/+21
| | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416497234-29880-5-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Add qemu-io format option in Python testsKevin Wolf2014-12-103-36/+36
| | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416497234-29880-4-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Use qemu-io -f $IMGFMTKevin Wolf2014-12-1010-24/+36
| | | | | | | | | | | | | | | | | | | This patch changes $QEMU_IO so that all tests by default pass a format argument to qemu-io. There are a few cases where -f $IMGFMT is not wanted because it selects the wrong driver or json: filenames including a driver are used. They are changed to use $QEMU_IO_PROG, which doesn't include any options. Tests 071 and 081 have output changes because now the actual request fails instead of reading the 2k probing buffer. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416497234-29880-3-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* tests: Use "command -v" instead of which(1) in shell scriptsFam Zheng2014-12-102-5/+5
| | | | | | | | | | | | | | | | When which(1) is not installed, we would complain "perl not found" because it's the first set_prog_path check. The error message is wrong. Fix it by using "command -v", a native way to query the existence of a command. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1416380832-9697-1-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* iotests: Plain blkdebug filename generationMax Reitz2014-12-102-1/+22
| | | | | | | | | | | | | Add one test whether blkdebug is able to generate a plain filename if given a configuration file and a file to be tested only; and add another test whether blkdebug is able to do the same without being given a configuration file. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1415697825-26678-3-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* blkdebug: Simplify and improve filename generationMax Reitz2014-12-101-2/+2
| | | | | | | | | | | | | | | | Instead of actually recreating the options from scratch, just reuse the options given for creating the BDS, which are the configuration file name and additional options. In case there are no additional options we can thus create a plain filename. This obviously results in a different output for qemu-iotest 099 which exactly tests this filename generation. Fix it up as well. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1415697825-26678-2-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block/qapi: Add cache information to query-blockKevin Wolf2014-12-102-0/+26
| | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* iotests: Use -qmp-pretty in 067Max Reitz2014-12-102-58/+723
| | | | | | | | | | | 067 invokes query-block, resulting in a reference output with really long lines (which may pose a problem in email patches and always poses a problem when the output changes, because it is hard to see what has actually changed). Use -qmp-pretty to mitigate this issue. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* iotests: _filter_qmp for pretty JSON outputMax Reitz2014-12-101-1/+3
| | | | | | | | | _filter_qmp should be able to correctly filter out the QMP version object for pretty JSON output. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* target-i386: move generic memory hotplug methods to DSDTsPaolo Bonzini2014-11-244-0/+0
| | | | | | | | | | This makes it simpler to keep the SSDT byte-for-byte identical for a given machine type, which is a goal we want to have for 2.2 and newer types. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Merge remote-tracking branch 'remotes/xtensa/tags/20141110-xtensa' into stagingPeter Maydell2014-11-101-0/+51
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xtensa fixes for 2.2: - fix entry opcode register window checking and add unit test. # gpg: Signature made Mon 10 Nov 2014 15:01:47 GMT using RSA key ID F83FA044 # gpg: Good signature from "Max Filippov <max.filippov@cogentembedded.com>" # gpg: aka "Max Filippov <jcmvbkbc@gmail.com>" * remotes/xtensa/tags/20141110-xtensa: target-xtensa: add entry overflow test target-xtensa: add missing window check for entry Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-xtensa: add entry overflow testMax Filippov2014-11-101-0/+51
| | | | | | | | | | | | | | Check that entry instruction raises window overflow exception when PS.CALLINC points to live registers. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* | block/vdi: Limit maximum size even futherMax Reitz2014-11-092-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The block layer read and write functions do not like requests which are bigger than INT_MAX bytes. Since the VDI bmap is read and written in a single operation, its size is therefore limited accordingly. This reduces the maximum VDI image size supported by QEMU to half of what it currently is (down to approximately 512 TB). The VDI test 084 has to be adapted accordingly. Actually, one could clearly see that it was broken from the "Could not open 'TEST_DIR/t.IMGFMT': Invalid argument" line for an image which was supposed to work just fine. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de>
* | iotests: Add test for non-existing backing fileMax Reitz2014-11-063-0/+57
|/ | | | | | | | | | | Test the error message when a COW file is about to be created which is supposed to inherit the size of its backing file, while the backing file given does not actually exist. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* vhost-user-test: Fix 'make check' broken on glib < 2.26Gonglei2014-11-051-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 89b516d8, some logics is turbid and breaks 'make check' as below errors: tests/vhost-user-test.c: In function '_cond_wait_until': tests/vhost-user-test.c:154: error: 'G_TIME_SPAN_SECOND' undeclared (first use in this function) tests/vhost-user-test.c:154: error: (Each undeclared identifier is reported only once tests/vhost-user-test.c:154: error: for each function it appears in.) tests/vhost-user-test.c: In function 'read_guest_mem': tests/vhost-user-test.c:192: warning: implicit declaration of function 'g_get_monotonic_time' tests/vhost-user-test.c:192: warning: nested extern declaration of 'g_get_monotonic_time' tests/vhost-user-test.c:192: error: 'G_TIME_SPAN_SECOND' undeclared (first use in this function) make: *** [tests/vhost-user-test.o] Error 1 First, vhost-usr-test.c rely on glib-compat.h because of using G_TIME_SPAN_SECOND [glib < 2.26] and g_get_monotonic_time(), but vhost-usr-test.c defined QEMU_GLIB_COMPAT_H, which make glib-compat.h will not be included. Second, if we remove QEMU_GLIB_COMPAT_H definability in vhost-usr-test.c, then we will get below warnings: tests/vhost-user-test.c: In function 'read_guest_mem': tests/vhost-user-test.c:190: warning: passing argument 1 of 'g_mutex_lock' from incompatible pointer type tests/vhost-user-test.c:234: warning: passing argument 1 of 'g_mutex_unlock' from incompatible pointer type That's because glib-compat.h redefine the g_mutex_lock/unlock function. Those functions' arguments is CompatGMutex/CompatGCond, but vhost-user-test.c is using GMutex/GCond, which cause the type is not consistent. We can rerealize those functions of vhost-user-test.c, which need a lots of patches. Let's simply address it, and leave this file alone. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Message-id: 1415149259-6188-1-git-send-email-arei.gonglei@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2014-11-031-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pc, virtio, misc bugfixes A bunch of minor bugfixes all over the place. changes from v2: added cpu hotplug rework added default vga type switch more fixes changes from v1: fix for test re-generation script add missing acks to two patches Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 03 Nov 2014 16:33:13 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: (28 commits) vga: flip qemu 2.2 pc machine types from cirrus to stdvga vga: add default display to machine class vhost-user: fix mmap offset calculation hw/i386/acpi-build.c: Fix memory leak in acpi_build_tables_cleanup() smbios: Encode UUID according to SMBIOS specification pc: Add pc_compat_2_1() function hw/virtio/vring/event_idx: fix the vring_avail_event error hw/pci: fixed hotplug crash when using rombar=0 with devices having romfile hw/pci: fixed error flow in pci_qdev_init -machine vmport=off: Allow disabling of VMWare ioport emulation acpi/cpu-hotplug: introduce helper function to keep bit setting in one place cpu-hotplug: rename function for better readability qom/cpu: remove the unused CPU hot-plug notifier pc: Update rtc_cmos in pc_cpu_plug pc: add cpu hotplug handler to PC_MACHINE acpi:piix4: convert cpu hotplug to hotplug_handler API acpi:ich9: convert cpu hotplug to hotplug_handler API acpi/cpu: add cpu hotplug callback function to match hotplug_handler API acpi: create separate file for TCPA log tests: fix rebuild-expected-aml.sh for acpi-test rename ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * tests: fix rebuild-expected-aml.sh for acpi-test renamePaolo Bonzini2014-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | This is now called bios-tables-test. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell2014-11-0319-22/+492
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging # gpg: Signature made Mon 03 Nov 2014 11:50:53 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: (53 commits) block: declare blockjobs and dataplane friends! block: let commit blockjob run in BDS AioContext block: let mirror blockjob run in BDS AioContext block: let stream blockjob run in BDS AioContext block: let backup blockjob run in BDS AioContext block: add bdrv_drain() blockjob: add block_job_defer_to_main_loop() blockdev: add note that block_job_cb() must be thread-safe blockdev: acquire AioContext in blockdev_mark_auto_del() blockdev: acquire AioContext in do_qmp_query_block_jobs_one() block: acquire AioContext in generic blockjob QMP commands iotests: Expand test 061 block/qcow2: Simplify shared L2 handling in amend block/qcow2: Make get_refcount() global block/qcow2: Implement status CB for amend qemu-img: Fix insignificant memleak qemu-img: Add progress output for amend block: Add status callback to bdrv_amend_options() block: qemu-iotest 107 supports NFS iotests: Add test for qcow2's bdrv_make_empty ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | iotests: Expand test 061Max Reitz2014-11-033-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some tests for progress output to 061. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Benoît Canet <benoit.canet@nodalink.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Message-id: 1414404776-4919-8-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
OpenPOWER on IntegriCloud