- 16 3月, 2020 6 次提交
-
-
由 Peter Krempa 提交于
We currently don't model the 'ssh' protocol properties properly and since it seems impossible for now (agent path passed via environment variable). To allow libguestfs to work as it used in pre-blockdev era we must carry the properties over to the command line. For this instance we just store it internally and format it back. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add testing of the interpretation of the JSON pseudo-protocol backing store into JSON structs for blockdev. This will be used to test JSON pseudo-URIs used by libguestfs while actually also validating the output against the QMP schema. Since libguestfs uses obsolete/undocumented values the outputs will differ and a benefit is that modern output is used now. The example test case covers the fields and values used by libguestfs when using the https driver. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The test was invoking the JSON formatter with the 'legacy' flag thus formatting bunch of obsolete JSON blockdev definitions. We also should test the modern ones. Add a boolean and re-run all the tests in both cases. Additionally for any modern invocation we should also validate that the output conforms to the QAPI schema. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Move lookup of the schema root earlier so that multiple functions can use it for validation. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Multiple tests require the schema. Extract the loading into a separate variable to avoid issues with ownership of the pointer. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add support for parsing the recently added fields from backing file pseudo-protocol strings. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 21 2月, 2020 1 次提交
-
-
由 Collin Walling 提交于
There are some architectures that support capabilities that others do not (e.g. s390x supports cpu comparison and baseline via QEMU). Let's make testQEMUSchemaLoad accept a string to specify the schema to load based on the specified arch. Signed-off-by: NCollin Walling <walling@linux.ibm.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 14 2月, 2020 1 次提交
-
-
由 Peter Krempa 提交于
Add a set of test data to see whether the backing store strings are formatted reasonably. Note that we don't support direct creation of such images so those tests are not enabled. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 04 2月, 2020 12 次提交
-
-
由 Peter Krempa 提交于
Use some of the existing bitmap data to add tests for qemuBlockBitmapsHandleBlockcopy. As the output depends on the ordering in the hash table we must also install the "virdeterministichash" mock preload library. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add a case where a bitmap spanning multiple images is missing one of the intermediate components. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add a validator which checks that a bitmap spanning multiple backing chain members doesn't look broken. The current rules are that no intermediate birmaps are missing (unfortunately it's hard to know whether the topmost or bottommost bitmap is missing) and none of the components is inconsistent. We can obviously improve it over time. The validator is also tested against the existing bitmap data we have for the backup merging test as well as some of the existing broken bitmap synthetic test cases. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use the glib allocation function that never returns NULL and remove the now dead-code checks from all callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Allow qemu access to modify backing files in case when we want to delete a checkpoint. This patch adds tracking of which images need to be relabelled when calculating the transaction, the code to relabel them and rollback. To verify that stuff works we also output the list of images to relabel into the test case output files in qemublocktest. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use the synthetic test data to verify that the algorithm correctly picks bitmaps to merge when the bitmap is changed along with the image itself. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add test cases for merging various pairs of bitmaps when snapshots were created together with checkpoints. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Allow deleting of checkpoints when snapshots were created along. The code tracks and modifies the checkpoint list so that backups can still be taken with such a backing chain. This unfortunately requires to rename few bitmaps (by copying and deleting them) in some cases. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add a faked qemu output which would simulate scenario where libvirt would take a snapshot and checkpoint simultaneously. This is visible in libvirt-2-format node where bitmap 'c' appears, but bitmap 'b' which is active in the previous layer is not present. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add all intermediate steps and deletion of the current checkpoint on a flat (single-image) disk image. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add test infrastructure and a basic test for bitmap deletion. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Always trim the full specified suffix. All of the callers outside of tests were passing either strlen or the actual length of the string. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
- 29 1月, 2020 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Currently it is possible to start a domain which have disks in same iotune group and at the same time having different iotune params. Both params set are passed to qemu in command line and the one that is passed later down command line is get actually set. Let's prohibit such configurations. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 13 1月, 2020 1 次提交
-
-
由 Peter Krempa 提交于
Historically there are two places where we format authentication and encryption for a disk. The logich which formats it for backing files was flawed though and didn't format it at all. This worked if the image became a backing file through the means of a snapshot but not directly. Force formatting of the source and encryption for any non-disk case to fix the issue. This caused problems in many places as we use the formatter to copy the definition. Effectively any copy lost the secret definition. https://bugzilla.redhat.com/show_bug.cgi?id=1789310 https://bugzilla.redhat.com/show_bug.cgi?id=1788898Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 13 12月, 2019 6 次提交
-
-
由 Ján Tomko 提交于
As of commit 2a00ef6e which was released in v5.2.0, we require YAJL to build the QEMU driver. Remove the checks from code that requires the QEMU driver or checks that also check for WITH_QEMU. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Add test code which will crawl a fake internal list of checkpoints and generate the list of bitmaps for merging to gather the final bitmap for the backup. The initial tests cover the basic case of all bitmaps being present in the top layer of the backing chain. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Add test data gathered from a run of qemu after creating bitmaps and snapshots together in various combinations. The following sequence of commands was used to achieve the configuration: virsh checkpoint-create-as VM --name a virsh snapshot-create-as VM --disk-only virsh snapshot-create-as VM --disk-only virsh checkpoint-create-as VM --name b virsh checkpoint-create-as VM --name c virsh snapshot-create-as VM --disk-only virsh checkpoint-create-as VM --name d virsh snapshot-create-as VM --disk-only virsh checkpoint-create-as VM --name current Note that VM was restarted after these operations to allow renumbering of the bitmaps in a more human-readable way. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
The real data gathered for the 'basic' test case don't exercise some fields. Add a copy with a few values modified manually. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Test the extraction of data about changed block tracking bitmaps. The first test case adds a simple scenario of multiple bitmaps in one layer. The test data will be also later reused for testing the code that determines which bitmaps to merge for an incremental backup. The sequence of bitmaps was created by the libvirt checkpoint API with the following sequence of commands: virsh checkpoint-create-as VM --name a virsh checkpoint-create-as VM --name b virsh checkpoint-create-as VM --name c virsh checkpoint-create-as VM --name d virsh checkpoint-create-as VM --name current Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 09 12月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Currently the disk and chardev seclabels are validated immediately at the time their data is parsed. This forces the parser to fill in the top level secmodel at time of parsing which is an undesirable thing. This validation conceptually should be done in the post-parse phase instead. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 12 11月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 25 10月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
The function now does not return an error so we can drop it fully. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 21 10月, 2019 3 次提交
-
-
由 Peter Krempa 提交于
The function does not do anything that could fail. Remove the return value. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Peter Krempa 提交于
qemuDomainPrepareDiskSourceData historically prepared everything but we've split out the majority of the functionality so that it sets up predominately only according to the configuration of the disk. There was one leftover bit of setting the gluster debug level from the config. Split this out into a separate function so that qemuDomainPrepareDiskSourceData only prepares based on the disk. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Ján Tomko 提交于
Replace all occurrences of if (VIR_STRDUP(a, b) < 0) /* effectively dead code */ with: a = g_strdup(b); Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 10月, 2019 5 次提交
-
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Now that all the types using VIR_AUTOUNREF have a cleanup func defined to virObjectUnref, use g_autoptr instead of VIR_AUTOUNREF. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOPTR aliases to g_autoptr. Replace all of its use by the GLib macro version. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOFREE is just an alias for g_autofree. Use the GLib macros directly instead of our custom aliases. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOCLEAN is just an alias for g_auto. Use the GLib macros directly instead of our custom aliases. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 06 9月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
Pass in backing store explicitly to qemuBlockStorageSourceGetBlockdevProps and fix the callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-