- 20 5月, 2020 22 次提交
-
-
由 Peter Krempa 提交于
qemuxml2argv test suite is way more comprehensive than the hotplug suite. Since we share the code paths for monitor and command line hotplug we can easily test the properties of devices against the QAPI schema. To achieve this we'll need to skip the JSON->commandline conversion for the test run so that we can analyze the pure properties. This patch adds flags for the comand line generator and hook them into the JSON->commandline convertor for -netdev. An upcoming patch will make use of this new infrastructure. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Now that all code paths generate JSON props we can remove the conversion to command line arguments and back in the monitor code. Note that the test which is removed in this commit will be replaced by a stronger testsuite later. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
There are multiple steps of setting up the domain definition prior to formatting the command line for the tests. Extract it to a separate function so that it's self-contained and also will allow re-running the command line formatting which will be necessary for QMP schema validation tests. 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 提交于
'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>
-
- 18 5月, 2020 1 次提交
-
-
由 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>
-
- 14 5月, 2020 1 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 13 5月, 2020 4 次提交
-
-
由 Ján Tomko 提交于
This is not yet supported by virtiofsd. Fixes #23 a.k.a. https://gitlab.com/libvirt/libvirt/-/issues/23Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Chris Jester-Young 提交于
Signed-off-by: NChris Jester-Young <cky@cky.nz> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Chris Jester-Young 提交于
Signed-off-by: NChris Jester-Young <cky@cky.nz> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Chris Jester-Young 提交于
This capability flags support for `-device pvscsi`, which provides the VMware paravirtual SCSI controller. Signed-off-by: NChris Jester-Young <cky@cky.nz> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
- 12 5月, 2020 12 次提交
-
-
由 Peter Krempa 提交于
Remember the preferred placement of <auth> and <encryption> for a disk source across libvirtd restarts. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Modern way to store <auth> and <encryption> of a <disk> is under <source>. This was added to mirror how <backingStore> handles these and in fact they are relevant to the source rather than to any other part of the disk. Historically we allowed them to be directly under <disk> and we need to keep compatibility. This wasn't a problem until introduction of -blockdev in qemu using of <auth> or <encryption> plainly wouldn't work with backing chains. Now that it works in backing chains and can be moved back and forth using snapshots/block-commit we need to ensure that the original placement is properly kept even if the source changes. To achieve the above semantics we need to store the preferred placement with the disk definition rather than the storage source definitions and also ensure that the modern way is chosen when the VM started with <source/encryption> only in the backing store. https://bugzilla.redhat.com/show_bug.cgi?id=1822878Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Historically the virtio-blk frontend by default enabled SCSI emulation and tried to do SCSI command passthrough. As this was enabled by default there's a fallback mechanism in place in cases when the backend doesn't support SCSI for any reason. This is not the case when disk type=lun is used with 'scsi-block' via 'virtio-scsi'. We did not restrict configurations when the user picks 'qcow2' or any other format as format of the disk, in which case the emulation is disabled as such configuration doesn't make sense. This patch unifies the approach so that 'raw' is required both when used via 'virtio-blk' and 'virtio-scsi' so that the user is presented with the expected configuration. Note that use of <disk type='lun'> is already very restrictive as it requires a block device or iSCSI storage. Additionally the scsi emulation is now deprecated by qemu with virtio-blk as it conflicts with virtio-1 and the alternative is to use 'virtio-scsi' which performs better and is along for a very long time. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
The property was deprecated. Don't format it based on the new capability if the user didn't explicitly request it. https://bugzilla.redhat.com/show_bug.cgi?id=1829550Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Historically the 'scsi' passthrough feature of virtio-blk-pci was enabled by default. Libvirt was disabling it due to security implications outlined in libvirt commit v0.9.9-4-g177db087 if it was not explicitly requested. In qemu commit v2.4.0-1566-ged65fd1a27 the default value was changed to disabled in preparation for virtio-1. Starting from QEMU-5.0 the 'scsi' property was also deprecated. There replacement for the functionality is to use 'virtio-scsi' for the purpose. This isn't a direct replacement though. Add capability named QEMU_CAPS_VIRTIO_BLK_SCSI_DEFAULT_DISABLED which allows us to stop formatting the 'scsi=' property if it's disabled by default and not requested so that we don't use deprecated features. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Help QEMU in deprecation of -drive if=none without the need to refactor all old boards. Stop masking out -blockdev support when -drive if=sd needs to be used. We achieve this by forbidding blockjobs and special-casing all other code paths. Blockjobs are sacrificed in this case as SD cards are a corner case for some ARM boards and are thus not used commonly. https://bugzilla.redhat.com/show_bug.cgi?id=1821692Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
We can't set the type of the device on the 'sd' bus and realistically a cdrom doesn't even make sense there. Forbid it. Note that the output of in disk-cdrom-bus-other.x86_64-latest.args switched to blockdev as it's no longer locked out due to use of a disk on 'sd' bus. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
The 'vexpress-a9' ARM board supports the native 'sd' bus as well as virtio. Add a test case for proving that upcoming changes to handling of 'sd' work. This config was also tested with real qemu and the qemu process starts correctly. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
In case of 'sd' cards we'll use pre-blockdev code also if qemu supports blockdev. In that specific case we'll need to mask out blockdev support for 'sd' disks. Plumb in a boolean to allow it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Remove the function and passing of 'def' through the callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Previously we've validated it in qemuCheckDiskConfig which was directly called from the command line generator. Move the checks to the validator where they belong. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Move the code from qemuCheckDiskConfigBlkdeviotune in src/qemu/qemu_commandline.c to qemuValidateDomainDeviceDefDiskBlkdeviotune. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-