- Sep 19, 2017
-
-
Thomas Huth authored
We can use the drive_del test on s390x, too, to check that adding and deleting also works fine with the virtio-ccw bus. But we have to make sure that we use the devices with the "-ccw" suffix instead of the "-pci" suffix for the virtio-ccw transport on s390x. Introduce a helper function called qvirtio_get_dev_type() that returns the correct string for the current architecture. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <1504190408-11143-1-git-send-email-thuth@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
Paolo Bonzini authored
The pixman submodule does not exist anymore, and its removal broke docker-based tests. Fix it. Cc: Fam Zheng <famz@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alistair Francis authored
Convert any remaining uses of fprintf(stderr, "warning:"... to use warn_report() instead. This helps standardise on a single method of printing warnings to the user. All of the warnings were changed using this command: find ./* -type f -exec sed -i 's|fprintf(.*".*warning[,:] |warn_report("|Ig' {} + The #include lines and chagnes to the test Makefile were manually updated to allow the code to compile. Signed-off-by:
Alistair Francis <alistair.francis@xilinx.com> Message-Id: <2c94ac3bb116cc6b8ebbcd66a254920a69665515.1503077821.git.alistair.francis@xilinx.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Using two libraries (libqemuutil.a and libqemustub.a) would sometimes result in circular dependencies. To avoid these issues let's just combine both into a single library that functions as both. Signed-off-by:
Alistair Francis <alistair.francis@xilinx.com> Message-Id: <54e6458745493d10901964624479a7d9a872f481.1503077821.git.alistair.francis@xilinx.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This test provides its own mocks, so do not use the "standard" stubs in libqemustub.a or the event loop implementation in libqemuutil.a. This is required on OS X, which otherwise brings in qemu-timer.o, async.o and main-loop.o from libqemuutil.a. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
this fixes running 'make check-unit' without running 'make all' beforehand: $ make check-unit ... GTESTER tests/test-qga ** ERROR:tests/test-qga.c:73:fixture_setup: assertion failed (error == NULL): Failed to execute child process "/build/qemu/qemu-ga" (No such file or directory) (g-exec-error-quark, 8) make: *** [check-tests/test-qga] Error 1 Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170911210129.5874-1-f4bug@amsat.org> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Complete the transition by renaming this header, which was shared by block/iscsi.c and the SCSI emulation code. Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 18, 2017
-
-
Mao Zhongyi authored
Convert floppy_drive_init() to realize and rename it to floppy_drive_realize(). Cc: John Snow <jsnow@redhat.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Max Reitz <mreitz@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by:
Mao Zhongyi <maozy.fnst@cn.fujitsu.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: 87119b34f32e2acf7166165fb5d8e6fca787b3bc.1505737465.git.maozy.fnst@cn.fujitsu.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
Mao Zhongyi authored
Replace init with realize in IDEDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Cc: John Snow <jsnow@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Max Reitz <mreitz@redhat.com> Signed-off-by:
Mao Zhongyi <maozy.fnst@cn.fujitsu.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: c4d27b4b5d9e37468e63e35214ce4833ca271542.1505737465.git.maozy.fnst@cn.fujitsu.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
- Sep 15, 2017
-
-
Eric Blake authored
hmp() passes its string argument through the sprintf() family; with a proper attribute, gcc -Wformat warns us when we do something dangerous like passing a non-constant format string. Fortunately, all our strings were safe, but checking whether the string can contain an unintended % is easy to avoid and therefore worth doing. Signed-off-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Eric Blake authored
Prior to commit 063c23d9, we were tracking a list of parallel qtest objects, in order to safely clean up a SIGABRT handler only after the last connection quits. But when we switched to more of glib's infrastructure, the list became dead code that is never assigned to. Signed-off-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Eric Blake authored
Don't open-code something that has a convenient helper available. Signed-off-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Eric Blake authored
Back when the test was introduced, in commit 62c39b30, the test was set up to run qemu-ga directly on the host performing the test, and defaults to limiting itself to safe commands. At the time, it was envisioned that setting QGA_TEST_SIDE_EFFECTING in the environment could cover a few more commands, while noting the potential danger of those side effects running in the host. But this has NEVER been tested: if you enable the environment variable, the test WILL fail. One obvious reason: if you are not running as root, you'll probably get a permission failure when trying to freeze the file systems, or when changing system time. Less obvious: if you run the test as root (wow, you're brave), you could end up hanging if the test tries to log things to a temporarily frozen filesystem. But the cutest reason of all: if you get past the above hurdles, the test uses invalid JSON in test_qga_fstrim() (missing '' around the dictionary key 'minimum'), and will thus fail an assertion in qmp_fd(). Rather than leave this untested time-bomb in place, rip it out. Hopefully, as originally envisioned, we can find an opportunity to test an actual sandboxed guest where the guest-agent has full permissions and will not unduly affect the host running the test - if so, 'git revert' can be used if desired, for salvaging any useful parts of this attempt. Signed-off-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
Broken with commit b4ba67d9 ("libqos: Change PCI accessors to take opaque BAR handle") a while ago, but nobody noticed since the tests are not run by default: The msix_pba_bar is not correctly initialized anymore if bir_pba has the same value as bir_table. With this fix, "make check SPEED=slow" should work fine again. Fixes: b4ba67d9 Tested-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
The user can currently still cause an abort() if running certain tests (like the prom-env-test) without setting the QTEST_QEMU_BINARY first. A similar problem has been fixed with commit 7c933ad6 already, but forgot to also take care of the qtest_get_arch() function, so let's introduce a proper wrapper around getenv("QTEST_QEMU_BINARY") that can be used in both locations now. Buglink: https://bugs.launchpad.net/qemu/+bug/1713434 Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
The problem with puv3 has been fixed with 0ac241bc ('unicore32: abort when entering "x 0" on the monitor') and the problem with tricore_testboard has been fixed with b190f477 ('qemu-system-tricore: segfault when entering "x 0" on the monitor'). Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
A lot of tests provide code for adding and removing a device via the device_add and device_del QMP commands. Maintaining this code in so many places is cumbersome and error-prone (some of the code parts check the responses for device deletion in an incorrect way, for example, we've got to deal with both, error code and DEVICE_DEL event here). So let's provide some proper generic functions for adding and removing a device instead. The code for correctly unplugging a device has been taken from a patch from Peter Xu. Reviewed-by:
Peter Xu <peterx@redhat.com> Tested-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Sep 14, 2017
-
-
Laurent Vivier authored
and add a test case of dump-guest-memory without "[begin length]" parameters. Signed-off-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Message-Id: <20170913142036.2469-5-lvivier@redhat.com> Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
- Sep 08, 2017
-
-
Marc-André Lureau authored
Commit e10e798c switched to libvhost-user which lacked support for resuming the avail_idx based on used_idx. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1485867 Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Sep 06, 2017
-
-
Eric Blake authored
Rather than open-coding our own read/write-all functions, we can make use of the recently-added qio code. It slightly changes the error message in one of the iotests. Signed-off-by:
Eric Blake <eblake@redhat.com> Message-Id: <20170905191114.5959-4-eblake@redhat.com> Reviewed-by:
Daniel P. Berrange <berrange@redhat.com>
-
Dr. David Alan Gilbert authored
It's legal to loadvm twice, modify the existing save/loadvm test to do it twice. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170825141940.20740-3-dgilbert@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Manos Pitsidianakis authored
Reviewed-by:
Alberto Garcia <berto@igalia.com> Signed-off-by:
Manos Pitsidianakis <el13635@mail.ntua.gr> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Sep 05, 2017
-
-
Juan Quintela authored
Just make sure that nr_tables is size_t not int. Once there, do the assert in the right place and be sure that we don't have a division by zero. Suggested-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Juan Quintela <quintela@redhat.com> Tested-by:
Cleber Rosa <crosa@redhat.com> -- Drop the s/g_new0/g_malloc0/ change. Avoid division by zero with assert (danp)
-
Juan Quintela authored
We were using -1 instead of the real size because the functions check what is bigger, size in bytes or the size of the iov. Recent gcc's barf at this. Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Tested-by:
Cleber Rosa <crosa@redhat.com> -- Remove comments about this feature. Fix missing -1.
-
Daniel P. Berrangé authored
The 194 test has a lot of code that assumes a simple image file. Rewriting this to work with luks is possible, but non-trivial, so blacklist the luks format for now. Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Message-Id: <20170901105434.3288-3-berrange@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Tested-by:
Fam Zheng <famz@redhat.com> [eblake: commit message typo fixed] Reviewed-by:
Kashyap Chamarthy <kchamart@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Eric Blake <eblake@redhat.com>
-
Daniel P. Berrangé authored
The LUKS driver requires extra args to QEMU to setup passwords. The _launch_qemu function takes care of this, so convert the test to use this function and use correct -drive syntax Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Message-Id: <20170901105434.3288-2-berrange@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Tested-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Eric Blake <eblake@redhat.com>
-
Philippe Mathieu-Daudé authored
tests/vhost-user-test keeps failing on build-system since Aug 15: ERROR:tests/vhost-user-test.c:835:test_flags_mismatch: child process (/i386/vhost-user/flags-mismatch/subprocess [4836]) failed unexpectedly ... ERROR:tests/vhost-user-test.c:807:test_connect_fail: child process (/x86_64/vhost-user/connect-fail/subprocess [58910]) failed unexpectedly Suggested-by:
Peter Maydell <peter.maydell@linaro.org> Suggested-by:
Daniel P. Berrange <berrange@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20170905180602.28698-1-f4bug@amsat.org Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Manos Pitsidianakis authored
ThrottleGroup is converted to an object. This will allow the future throttle block filter drive easy creation and configuration of throttle groups in QMP and cli. A new QAPI struct, ThrottleLimits, is introduced to provide a shared struct for all throttle configuration needs in QMP. ThrottleGroups can be created via CLI as -object throttle-group,id=foo,x-iops-total=100,x-.. where x-* are individual limit properties. Since we can't add non-scalar properties in -object this interface must be used instead. However, setting these properties must be disabled after initialization because certain combinations of limits are forbidden and thus configuration changes should be done in one transaction. The individual properties will go away when support for non-scalar values in CLI is implemented and thus are marked as experimental. ThrottleGroup also has a `limits` property that uses the ThrottleLimits struct. It can be used to create ThrottleGroups or set the configuration in existing groups as follows: { "execute": "object-add", "arguments": { "qom-type": "throttle-group", "id": "foo", "props" : { "limits": { "iops-total": 100 } } } } { "execute" : "qom-set", "arguments" : { "path" : "foo", "property" : "limits", "value" : { "iops-total" : 99 } } } This also means a group's configuration can be fetched with qom-get. Signed-off-by:
Manos Pitsidianakis <el13635@mail.ntua.gr> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Alberto Garcia <berto@igalia.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Manos Pitsidianakis authored
timer_cb() needs to know about the current Aio context of the throttle request that is woken up. In order to make ThrottleGroupMember backend agnostic, this information is stored in an aio_context field instead of accessing it from BlockBackend. Reviewed-by:
Alberto Garcia <berto@igalia.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Manos Pitsidianakis <el13635@mail.ntua.gr> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Manos Pitsidianakis authored
This commit eliminates the 1:1 relationship between BlockBackend and throttle group state. Users will be able to create multiple throttle nodes, each with its own throttle group state, in the future. The throttle group state cannot be per-BlockBackend anymore, it must be per-throttle node. This is done by gathering ThrottleGroup membership details from BlockBackendPublic into ThrottleGroupMember and refactoring existing code to use the structure. Reviewed-by:
Alberto Garcia <berto@igalia.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Manos Pitsidianakis <el13635@mail.ntua.gr> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Daniel P. Berrangé authored
The TLS I/O channel test had mistakenly used && instead of || when checking for handshake completion. As a result it could terminate the handshake process before it had actually completed. This was harmless before but changes in GNUTLS 3.6.0 exposed this bug and caused the test suite to fail. Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Daniel P. Berrange <berrange@redhat.com>
-
Daniel P. Berrangé authored
These functions wait until they are able to read / write the full requested data buffer(s). Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Daniel P. Berrange <berrange@redhat.com>
-
Stefan Hajnoczi authored
Switch from atexit.register() to a more elegant idiom of declaring resources in a with statement: with FilePath('monitor.sock') as monitor_path, VM() as vm: ... The files and VMs will be automatically cleaned up whether the test passes or fails. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20170824072202.26818-4-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
The scratch/ (TEST_DIR) directory is not automatically cleaned up after test execution. It is the responsibility of tests to remove any files they create. A nice way of doing this is to declare files at the beginning of the test and automatically remove them with a context manager: with iotests.FilePath('test.img') as img_path: qemu_img(...) qemu_io(...) # img_path is guaranteed to be deleted here Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20170824072202.26818-3-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Sep 04, 2017
-
-
Marc-André Lureau authored
Now that all usages have been converted to user lookup helpers. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20170822132255.23945-14-marcandre.lureau@redhat.com> [Rebased, superfluous local variable dropped, missing check-qom-proplist.c update added] Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-17-git-send-email-armbru@redhat.com>
-
Marc-André Lureau authored
Currently, a FOO_lookup is an array of strings terminated by a NULL sentinel. A future patch will generate enums with "holes". NULL-termination will cease to work then. To prepare for that, store the length in the FOO_lookup by wrapping it in a struct and adding a member for the length. The sentinel will be dropped next. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20170822132255.23945-13-marcandre.lureau@redhat.com> [Basically redone] Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-16-git-send-email-armbru@redhat.com> [Rebased]
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-14-git-send-email-armbru@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Markus Armbruster authored
The next commit will put it to use. May look pointless now, but we're going to change the FOO_lookup's type, and then it'll help. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-13-git-send-email-armbru@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Markus Armbruster authored
Currently, the FOO_lookup[] generated for QAPI enum types are terminated by a NULL sentinel. A future patch will generate enums with "holes". NULL-termination will cease to work then. To prepare for that, replace "have we reached the sentinel?" predicates by "have we reached the FOO__MAX value?" predicates. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-12-git-send-email-armbru@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Markus Armbruster authored
The lookup tables have a sentinel, no need to make callers pass their size. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-3-git-send-email-armbru@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> [Rebased, commit message corrected]
-