- 20 5月, 2020 25 次提交
-
-
由 Peter Krempa 提交于
Add a variant similar to virJSONValueObjectAppendString which also formats more complex value strings with printf syntax. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
The helper returns a list of arguments of a virCommand. This will be useful in tests where we'll inspect certain already formatted arguments. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
In some cases we use 'on/off' for command line arguments. Add a switch which will select the preferred spelling for a specific usage. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Allow reusing this for formatting of netdev_add arguments into -netdev. We need to be able to skip the 'type' property as it's used without the prefix by our generator. Add infrastructure which allows skipping property with a specific name. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
In qemu the argument of 'ipv6-net' is split up into 'ipv6-prefix' and 'ipv6-prefixlen'. Additionally now that 'netdev_add' was qapified, only the real properties are allowed. Switch to using them explicitly. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
The output of the function is fed as argument to '-device' command line argument or 'device_add' monitor command except for 'guestfwd' channels where it needs to be fed to -netdev/netdev_add. This is confusing and error prone. Split it up since the caller needs to know which command/option to use anyways, so the caller can call the appropriate function without any magic. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Both active branches create the same backend chardev. Since there is no other case, extract it before the switch so that we don't have to duplicate it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Cover all cases of the enum. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
There's just one caller that always passes '1'. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
'tftp' storage protocol was supported by qemu until 2.7.0. Add an interlock when blockdev is used and drop the test case for it as it's IMO not worth adding another test file just for that. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Make our QMP schema validator reject any use of schema entries which were deprecated by QEMU except for those whitelisted. This will allow us to catch this before qemu actually removed what we'd still use. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
"migrate_set_downtime", "migrate_set_speed", and "query-migrate-cache-size" were marked as deprecated in the QMP schema in qemu 5.0. Since libvirt still actively uses them we must not mark them as okay to be missing, but still mark them as deprecated, so that we can add tests for deprecated commands. The replacement of the command usage in libvirt is tracked by: https://bugzilla.redhat.com/show_bug.cgi?id=1829543 https://bugzilla.redhat.com/show_bug.cgi?id=1829544 https://bugzilla.redhat.com/show_bug.cgi?id=1829545Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Modify the generated test cases for the 'cpu-add' and 'change' command which are deprecated by qemu. We now use device-add and blockdev-change-media instead so we are okay if they will be removed. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The command was replaced with 'query-cpus-fast' which is always used when detected by the capabilities so we can allow our test usage of the deprecated command even if it will be removed from the schema. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Separate the test for the newer command into a new function. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
For sanity-chcecking of deprecated commands which are still used on some old code paths which used the simple generated test cases add a mechanism to mark them as deprecated so schema checking can be skipped. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
We have a few cases validating that the code behaves correctly in pre-modern hotplug era. This is controled by the 'modern' flag for the test. Since 'cpu-add' command is now deprecated in qemu, there is a modern replacement for it, and the test output is checked against expected commands we can skip schema validation for the legacy command. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Some test cases are used to validate interactions with old qemu. We need to skip validation of deprecation with those once it will be added. In case of commands which were already replaced by code based on capabilities we can skip the full validation once the command is removed. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Refactor the code so that we pass in the repeated 'schema' and 'debug' arguments via a new struct testQEMUSchemaValidateCtxt. This will simplify adding new parameters in the future. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Refactor all cleanup to avoid manual clearing, unnecessary labels and return value variables. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Upcoming patches will add validation which rejects objects with the 'deprecated' feature in the QMP schema. To support tests which deal with legacy properties in case when a command or argument is marked as deprecated or removed by qemu qemuMonitorTestSkipDeprecatedValidation will allow configuring the tests to ignore such errors. In case of commands/features which are not yet replaced, the 'allowRemoved' bool should not be set to provide a hard notification once qemu drops the command. Note that at this point 'allowRemoved' only includes whole commands, but not specific properties. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
We no longer return the error via the monitor, so the function no longer returns '1'. Remove the mention from comment and fix callers to stop looking for the return value of '1'. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Remove the ad-hoc command validation in favor of the new helper. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The new helper splits out all steps necessary to validate a QMP command against the schema. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Only tests expected to fail should allow unused commads as the normal tests will consume all of them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 19 5月, 2020 4 次提交
-
-
由 Liao Pingfang 提交于
Remove the installation instructions from README.rst, and add the link to compiling.html. Signed-off-by: NLiao Pingfang <liao.pingfang@zte.com.cn> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
The qemu.conf change broke our augeas test: qemu/test_libvirtd_qemu.aug:96.3-203.1:exception thrown in test qemu/test_libvirtd_qemu.aug:96.8-.34:exception: Iterated lens matched less than it should Lens: ../../src/qemu/libvirtd_qemu.aug:170.13-.43: Last match: ../../src/qemu/libvirtd_qemu.aug:18.52-.113: Not matching: ../../src/qemu/libvirtd_qemu.aug:12.19-.31: Error encountered at 48:27 (1615 characters into string) <\n "/dev/ptmx", "/dev/kvm"|=|,\n]\nsave_image_format = "raw> Fixes: ab5ba570Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Paolo Bonzini 提交于
The RTC and HPET modes for the QEMU emulation tick have been dropped almost 9 years ago, in commit 25f3151ece1d5881826232bebccc21b588d4e03e. Do not allow them in the devices cgroup policy. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
Although the original patches to support controllers with hotplug='off' were checking during hotplug/attach requests that the device was being plugged into a PCI controller that didn't have hotplug disabled, but I forgot to do the same for device detach (the main impetus for adding the feature was to prevent unplugs originating from within the guest, so it slipped my mind). So although the guest OS was ultimately unable to honor the unplug request, libvirt could still be used to make such a request, and since device attach/detach are asynchronous operations, the caller to libvirt would receive a success status back (the device would stubbornly/correctly remain in the domain status XML however) This patch remedies that, by looking at the controller for the device in the detach request, and immediately failing the operation if that controller has hotplug=off. Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 18 5月, 2020 8 次提交
-
-
由 Michal Privoznik 提交于
If the mirror destination is not a file but a NVMe disk, then call qemuHostdevReAttachOneNVMeDisk() to reattach the NVMe back to the host. This would be done by blockjob code when the job finishes, but in this case the job won't finish - QEMU is killed meanwhile. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1825785Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
In v5.10.0-rc1~42 (which was later fixed in v6.0.0-rc1~487) I am removing XATTRs for a file that QEMU is mirroring a disk into but it is killed meanwhile. Well, we can call qemuSecurityRestoreImageLabel() which will not only remove XATTRs but also use them to restore the original owner of the file. This would be done by blockjob code when the job finishes, but in this case the job won't finish - QEMU is killed meanwhile Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Yi Li 提交于
Use g_new0 to allocate and remove NULL checks from callers and the lock will release properly Signed-off-by: NYi Li <yili@winhong.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
In previous commit we started tracking whether QEMU supports '-numa mem='. This is tied to the machine type because migration from '-numa mem=' to '-numa memdev' is impossible (or vice versa). But since it's tied to a machine type (where migration from one to another is also unsupported) we can allow QEMU to get rid of the deprecated command line. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1783355Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
When building -numa command line there is a for() loop that builds '-numa memdev=' for each guest NUMA node. And also records in a local variable whether any of memory-object-* backends must be used to satisfy desired config. Well, instead of checking in each iteration whether corresponding capabilities are set, we can do swap if() and for() and check only once. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
There is 'numa-mem-supported' machine attribute which specifies whether '-numa mem=' is supported. Store it in our capabilities as it will be used in later commits when building the command line. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
The AppArmor secdriver does not use labels to grant access to resources. Therefore, it doesn't use XATTRs and hence it lacks implementation of .domainMoveImageMetadata callback. This leads to a harmless but needless error message appearing in the logs: virSecurityManagerMoveImageMetadata:476 : this function is not supported by the connection driver: virSecurityManagerMoveImageMetadata Closes: https://gitlab.com/libvirt/libvirt/-/issues/25Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 15 5月, 2020 3 次提交
-
-
由 Michal Privoznik 提交于
s/enther/enter/ in the function documentation. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-