- 13 6月, 2019 2 次提交
-
-
由 Andrea Bolognani 提交于
We optionally include QEMU and LXC support in this test and depending on which is enabled (if either is enabled at all) we need to link in different objects. Right now we implicitly depend on the fact that qemu_LDADDS is empty when QEMU is not enabled to get the correct set of objects, but it's better to be explicit about it. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
由 Andrea Bolognani 提交于
We want all test programs using qemu_LDADDS to also use LDADDS, and cputest is the only existing exception. We can't just replace GNULIB_LIBS with LDADDS though, even though the latter is a superset of the former, because that would result in a linking error due to including the same object twice: /usr/bin/ld: ../src/libvirt_probes.o:.../src/libvirt_probes.o.dtrace-temp.c:141: multiple definition of `libvirt_object_new_semaphore'; ../src/libvirt_probes.o:.../src/libvirt_probes.o.dtrace-temp.c:141: first defined here To work around this, we include both qemu_LDADDS and LDADDS when QEMU support is enabled, and just LDADDS otherwise. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
- 12 6月, 2019 12 次提交
-
-
由 Peter Krempa 提交于
When specifying extra params for spcie TLS verification, it's necessary to pass a weird URI to it. Let's add a test for this case where the TLS string contains a space. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Determine whether the test has failed after running all the cases so that we don't need to rerun it multiple times to see all problems. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
VIR_TEST_DEBUG can be easily made verbose in the tests. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use VIR_TEST_VERBOSE instead. This fixes the following syntax check problem: tests/qemumonitorjsontest.c:1409: virReportError(VIR_ERR_INTERNAL_ERROR, "arr should have been cleared"); Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
The upcoming virDomainBackup() API needs to take advantage of the ability to expose a bitmap as part of nbd-server-add for a pull-mode backup (this is the recently-added QEMU_CAPS_NBD_BITMAP capability). Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
The upcoming virDomainBackup() API needs to take advantage of various qcow2 bitmap manipulations as the basis to virDomainCheckpoints and incremental backups. Add four functions to expose block-dirty-bitmap-{add,enable,disable,merge} (this is the recently-added QEMU_CAPS_BITMAP_MERGE capability). Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
Add two capabilities for testing features required for the upcoming virDomainBackupBegin: use block-dirty-bitmap-merge as the generic witness of bitmap support needed for checkpoints (since all of the bitmap management functionalities were finalized in the same qemu 4.0 release), and the bitmap parameter to nbd-server-add for pull-mode backup support. Even though both capabilities are likely to be present or absent together (that is, it is unlikely to encounter a qemu that backports only one of the two), it still makes sense to keep two capabilities as the two uses are orthogonal (full backups don't require checkpoints, push mode backups don't require NBD bitmap support, and checkpoints can be used for more than just incremental backups). Existing code is not affected by the new capabilities. Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
Migration always uses a TCP socket for NBD servers, because we don't support same-host migration. But upcoming pull-mode incremental backup needs to also support a Unix socket, for retrieving the backup from the same host. Support this by plumbing virStorageNetHostDef through the monitor calls, since that is a nice reusable struct that can track both TCP and Unix sockets. Update qemumonitorjsontest to verify both forms of the QMP command. Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
Time to remove the cleanup labels rendered useless in the previous patch. There are still plenty of other tests that could be further simplified, but I've already spent enough time in this file for now. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
The DO_TEST() macro in qemumonitorjsontest.c was not passing the schema through, which meant that we were not validating any of those tests for correct usage according to the schema. In the process of mechanically altering tests to pass the schema through, use VIR_AUTOPTR on all of the affected test instances. The next patch will do some further cleanups that it exposes. Tested by using this hack, where the test mistakenly passed pre-patch, but correctly diagnosed the garbage post-patch: | diff --git i/src/qemu/qemu_monitor_json.c w/src/qemu/qemu_monitor_json.c | index 53a7de8b77..86d8450814 100644 | --- i/src/qemu/qemu_monitor_json.c | +++ w/src/qemu/qemu_monitor_json.c | @@ -1532,7 +1532,8 @@ qemuMonitorJSONGetStatus(qemuMonitorPtr mon, | if (reason) | *reason = VIR_DOMAIN_PAUSED_UNKNOWN; | | - if (!(cmd = qemuMonitorJSONMakeCommand("query-status", NULL))) | + if (!(cmd = qemuMonitorJSONMakeCommand("query-status", | + "s:garbage", "foo", NULL))) | return -1; | | if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) Suggested-by: NPeter Krempa <pkrempa@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
Simplify the GEN_TEST_FUNC() and target of the DO_TEST_SIMPLE() macros by using autoptr support. Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
Upcoming tests are going to use VIR_AUTOPTR to simplify test cleanup. Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
- 07 6月, 2019 4 次提交
-
-
由 Peter Krempa 提交于
Pass in the schema since it works with the 'file' test now. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Pass in the schema data from the caller if QMP schema testing is desired. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
In case when we are testing a QMP command we can try to schema check it so that we catch inconsistencies. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Use VIR_AUTOFREE and get rid of the cleanup section. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 05 6月, 2019 1 次提交
-
-
由 Erik Skultety 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1717090Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 04 6月, 2019 3 次提交
-
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The qemuTestParseCapabilitiesArch call would eventually lead to the host CPU being probed via virCPUGetHost. Let's divert this to a mocked version already used by the qemuxml2argvtest. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The function is renamed as virQEMUCapsProbeHostCPU and it does not get the list of allowed CPU models from qemuCaps anymore. This is responsibility is moved to the caller. The result is just a very thin wrapper around virCPUGetHost mostly required mocking in tests. The generic function is used in place of a direct call to virCPUGetHost in virQEMUCapsInitHostCPUModel to make sure tests don't accidentally probe host CPU. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 03 6月, 2019 7 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1426162 Turns out, some aarch64 systems have SMBIOS info. That means we can use dmidecode to fetch some information. If that fails, fall back to the old behaviour. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Michal Privoznik 提交于
There's nothing x86 specific about this function. Rename the function so that it has DMI suffix which enables it to be reused on different arches (as using X86 from say ARM would look suspicious). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
This test case uses (anonimized) data pulled from a GIGABYTE R120-T34 server. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
We have a single mock dmidecode script right now, but we're going to add another one soon, so we need to make sure its name contains the test case name as a prefix, just like we already do with all data files. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1575526Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
SMMUv3 is an IOMMU implementation for ARM virt guests. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
This capability can be used to figure out whether the QEMU binary at hand supports the machine type property we need in order to enable SMMUv3 IOMMU support. Unfortunately we can't avoid probing the RISC-V binaries along with the ARM ones, since both architectures have their own 'virt' machine type. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 30 5月, 2019 1 次提交
-
-
由 Jim Fehlig 提交于
openSUSE Factory is in the process of enabling Link Time Optimization [0] and stumbled upon missing symbols when linking libqemutestdriver libtool: link: gcc -shared -fPIC -DPIC ../src/libvirt_qemu_probes.o \ -Wl,--whole-archive ../src/.libs/libvirt_driver_qemu_impl.a \ ../src/.libs/libvirt_driver_network_impl.a \ ../src/.libs/libvirt_driver_storage_impl.a -Wl,--no-whole-archive \ -lcap-ng -lgnutls -lnl-route-3 -lnl-3 -ldbus-1 -lselinux -lapparmor \ /usr/lib/libxml2.so -ldl -lz -llzma -lm -lblkid -ltirpc \ -fstack-protector-strong -O2 -fstack-protector-strong -flto=16 -g -O2 \ -fstack-protector-strong -flto=16 -g \ -Wl,-soname -Wl,libqemutestdriver.so -o .libs/libqemutestdriver.so ... /usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `mdir_name' /usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `rpl_ioctl' /usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `rpl_pipe2' /usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `recvfd' /usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `c_strcasecmp' The missing symbols are provided by GNUlib. Add it when linking libqemutestdriver. [0] https://en.opensuse.org/openSUSE:LTOSigned-off-by: NJim Fehlig <jfehlig@suse.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 23 5月, 2019 2 次提交
-
-
由 Daniel P. Berrangé 提交于
Creating firewall rules for the virtual networks causes the kernel to load the conntrack module. This imposes a significant performance penalty on Linux network traffic. Thus we want to only take that hit if we actually have virtual networks running. We need to create global firewall rules during startup in order to "upgrade" rules for any running networks created by older libvirt. If no running networks are present though, we can safely delay setup until the time we actually start a network. Reviewed-by: NJim Fehlig <jfehlig@suse.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
Device validation should not have to wait until command line generation time. Moving the code to a separate function also allows us to avoid some unnecessary repetition. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 22 5月, 2019 3 次提交
-
-
由 Andrea Bolognani 提交于
Make sure validation is working as intended by trying to use Intel IOMMU with the i440fx machine type, though we know it's a q35-only feature, and expecting an error to be returned. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
We can drop the intel-iommu-machine test case while doing so, since it is supposed to showcase how we generate different command lines for older QEMU versions and we can do that using a single input file now. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
Remove a bunch of irrelevant devices and make sure all input files explicitly opt out of USB controllers: the latter change will help later, when we start using DO_TEST_CAPS_*(). Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 21 5月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
Split out the 'shallow' and 'reuse' flags as booleans rather than passing in flags and constructing them in irrelevant APIs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Split out the 'shallow' flag as a boolean argument rather than passing in flags and constructing them in irrelevant APIs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 17 5月, 2019 3 次提交
-
-
由 Michal Privoznik 提交于
If an FD is passed into a child using: virCommandPassFD(cmd, fd, VIR_COMMAND_PASS_FD_CLOSE_PARENT); then the parent should refrain from touching @fd thereafter. This is even documented in virCommandPassFD() comment. The reason is that either at virCommandRun()/virCommandRunAsync() or virCommandFree() time the @fd will be closed. Closing it earlier, e.g. right after virCommandPassFD() call might result in undesired results. Another thread might open a file and receive the same FD which is then unexpectedly closed by virCommandFree() or virCommandRun(). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
Since we know the full list of machine types supported by the QEMU binary when probing machine type properties, we can save some work (and eventually test suite churn, as more architecture-specific machine types need to be probed) by only probing machines that we know exist. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Andrea Bolognani 提交于
Now that we're probing machine type properties using the latest machine type rather than the "spapr-machine" parent, we can finally discover properties that are not available on all machine types. This commit refreshes replies for QEMU 4.0.0 as well as 3.1.0 to show not only that we're actually discovering new machine type properties this way, but also that the number of available machine type properties increases with each subsequent QEMU release. If qom-list-properties had been available in QEMU 2.10.0, we could now drop the explicit version number checks for the QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT and QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT capabilities, but unfortunately it wasn't, so we have to keep them around still. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-