- 23 3月, 2018 3 次提交
-
-
由 Peter Krempa 提交于
The 'simple' monitor tests were quite useless, since the code did not even check whether the correct command was called. This patch uses the QAPI schema validator to validate that the arguments are in format according to the schema. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Prepare for testing of the schema of used commands by changing few arguments to values which will not be rejected. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Add a function which will allow to test whether a JSON object conforms to the QAPI schema. This greatly helps when developing formatters for new JSON objects and will help make sure that the code will not break in cases which have unit tests but were actually not function-tested (mostly various disk access protocols). Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 19 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
There is a long standing hack to pass a virConnectPtr into the qemuMonitorStartCPUs method, so that when the text monitor prompts for a disk password, we can lookup virSecretPtr objects. This causes us to have to pass a virConnectPtr around through countless methods up the call chain....except some places don't have any virConnectPtr available so have always just passed NULL. We can finally fix this disastrous design by using virGetConnectSecret() to open a connection to the secret driver at time of use. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 06 2月, 2018 1 次提交
-
-
由 John Ferlan 提交于
Add a @detach parameter to the API in order allow running the QEMU code as a thread. Reviewed-by: Jiri Denemark <jdenemar redhat com>
-
- 03 11月, 2017 7 次提交
-
-
由 Andrea Bolognani 提交于
Right-aligning backslashes when defining macros or using complex commands in Makefiles looks cute, but as soon as any changes is required to the code you end up with either distractingly broken alignment or unnecessarily big diffs where most of the changes are just pushing all backslashes a few characters to one side. Generated using $ git grep -El '[[:blank:]][[:blank:]]\\$' | \ grep -E '*\.([chx]|am|mk)$$' | \ while read f; do \ sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \ done Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Jiri Denemark 提交于
We handle incremental storage migration in a different way. The support for this new (as of QEMU 2.10) parameter is only needed for full coverage of migration parameters used by QEMU. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
We already support several ways of setting migration bandwidth and this is not adding another one. With this patch we are able to read and write this parameter using query-migrate-parameters and migrate-set-parameters in one call with all other parameters. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
The parameters used "migrate" prefix which is pretty redundant and qemuMonitorMigrationParams structure is our internal representation of QEMU migration parameters and it is supposed to use names which match QEMU names. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
We already support setting the maximum downtime with a dedicated virDomainMigrateSetMaxDowntime API. This patch does not implement another way of setting the downtime by adding a new public migration parameter. It just makes sure any parameter we are able to get from a QEMU monitor by query-migrate-parameters can be passed back to QEMU via migrate-set-parameters. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
The second CHECK macro was used for string parameters. Let's rename it to CHECK_STR and move it up to have all checks in one place. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
The first CHECK macro in the test is used for checking integer values. Let's make it a bit more generic to be usable for any numeric type and use it for a new CHECK_INT macro. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 20 10月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
The only remaining user of qemuMonitorGetMigrationCapability is our test suite. Let's replace qemuMonitorGetMigrationCapability with qemuMonitorGetMigrationCapabilities there and drop the unused function. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 17 10月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
When migration fails, QEMU may provide a description of the error in the reply to query-migrate QMP command. We can fetch this error and use it instead of the generic "unexpectedly failed" message. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 28 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Prior to qemu 2.5 the node names would not be generated, thus would be missing from 'query-blockstats' and 'query-named-block-nodes'. Test that the code correctly detects nothing. Additionally make sure that a VM without disks does not cause problems. The test case change is necessary as our test file checker does not play well with empty files.
-
- 27 7月, 2017 14 次提交
-
-
由 Peter Krempa 提交于
Test storage was created on a rhel/centos 7 node using targetcli. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Test file created by: qemu-img create -f luks /var/lib/libvirt/images/luks 10M \ -o key-secret=asdf --object secret,id=asdf,format=raw,data=asdf Used in libvirt as: <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/luks'/> <target dev='vda' bus='virtio'/> <encryption format='luks'> <secret type='passphrase' uuid='9b2c831a-fdb9-4c09-873c-1959580589e1'/> </encryption> </disk> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
qemu 2.9 returns an extra layer in the backing data if a block job is active. Add a test case to see whether our code properly detects and ignores such layer. The test data was prepared by creating a backing chain of qcow2 images (with qemu-img and with libvirt's snapshot feature). One of the layers was then merged back by doing a block-commit: virsh blockcommit VM hda --top /var/lib/libvirt/images/b and then a block-copy job was started and kept in synchronized phase: virsh blockcopy VM hda /tmp/tgt.img --transient job Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Add the blockstats data and fix the expected output. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Add the blockstats data and fix the expected output. Test data was created as: qemu-img create -f qcow2 img0 10M qemu-img create -f qcow2 -o "backing_fmt=qcow2,backing_file=img0" img1 qemu-img create -f qcow2 -o "backing_fmt=qcow2,backing_file=img1" img2 ... Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
With the new approach we are actually able to correctly detect node names for the two instances of the same backing file. Test images were created as: qemu-img create -f qcow2 /var/lib/libvirt/images/base.qcow2 10M qemu-img create -f qcow2 \ -o "backing_fmt=qcow2,backing_file=/var/lib/libvirt/images/base.qcow2 \ /var/lib/libvirt/images/a.qcow2 qemu-img create -f qcow2 \ -o "backing_fmt=qcow2,backing_file=/var/lib/libvirt/images/base.qcow2 \ /var/lib/libvirt/images/b.qcow2 and then used for two separate disks. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Store the 'drv' field both for the storage node and for the format node and format them in the test case. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
We can now iterate the hash table and print all detected backing chains. This simplifies calling of the test cases. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Remove the complex and unreliable code which inferred the node name hierarchy only from data returned by 'query-named-block-nodes'. It turns out that query-blockstats contain the full hierarchy of nodes as perceived by qemu so the inference code is not necessary. In query blockstats, the 'parent' object corresponds to the storage behind a storage volume and 'backing' corresponds to the lower level of backing chain. Since all have node names this data can be really easily used to detect node names. In addition to the code refactoring the one remaining test case needed to be fixed along. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
To simplify the refactoring patches disable the tests. This will allow adding test data later. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Extract the test prefix path into a variable and reuse virTestLoadFileJSON to load the sample json files rather than doing it manually. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
The node name and backing file name can be inferred from the hierarchy. This will also help when converting to detect node names using query-blockstats data. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Rename 'json' and related variables to 'nodeNameJson'. Also rename the test files along. This is a preparation for modifying how we detect node names which will also require data from 'query-blockstats'. Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Test cases named '1' and '2' differed only in the length of the backing chain, so remove test case '2' and rename test '1' to 'basic'. Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 11 7月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
On domain startup, bind host or bind service can be omitted and we will format a working command line. Extend this to hotplug as well and specify the service to QEMU even if the host is missing. https://bugzilla.redhat.com/show_bug.cgi?id=1452441
-
- 10 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
vcpu properties gathered from query-hotpluggable cpus need to be passed back to qemu. As qemu did not use the node-id property until now and libvirt forgot to pass it back properly (it was parsed but not passed around) we did not honor this. This patch adds node-id to the structures where it was missing and passes it around as necessary. The test data was generated with a VM with following config: <numa> <cell id='0' cpus='0,2,4,6' memory='512000' unit='KiB'/> <cell id='1' cpus='1,3,5,7' memory='512000' unit='KiB'/> </numa> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452053
-
- 05 4月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Pass the data by reference rather than everything on the stack. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 04 4月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
We use the "vir" prefix pretty consistently in our APIs, both external and internal, which made these macros stood out.
-
- 27 3月, 2017 5 次提交
-
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
oVirt uses relative names with directories in them. Test such configuration. Also tests a snapshot done with _REUSE_EXTERNAL and a relative backing file pre-specified in the qcow2 metadata.
-
由 Peter Krempa 提交于
Since we have to match the images by filename a common backing image will break the detection process. Add a test case to see that the code correctly did not continue the detection process.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
The code is rather magic so a test case will help making sure that everything works well. The first case is a simple backing chain.
-
- 25 3月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Add the fields to support setting tls-creds and tls-hostname during a migration (either source or target). Modify the query migration function to check for the presence and set the field for future consumers to determine which of 3 conditions is being met (NULL, present and set to "", or present and sent to something). These correspond to qemu commit id '4af245dc3' which added support to default the value to "" and allow setting (or resetting) to "" in order to disable. This reset option allows libvirt to properly use the tls-creds and tls-hostname parameters. Modify code paths that either allocate or use stack space in order to call qemuMigrationParamsClear or qemuMigrationParamsFree for cleanup. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 17 3月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
qemuMonitorGetGuestCPU can now optionally create CPU data from filtered-features in addition to feature-words. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-