- 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 8 次提交
-
-
由 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 提交于
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 提交于
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>
-
- 13 12月, 2019 5 次提交
-
-
由 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>
-
- 04 9月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
Actually test that the full range is available. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 25 7月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
In case when the backing store can be represented with something simpler such as a URI we can use it rather than falling back to the json: pseudo-protocol. In cases when it's not worth it (e.g. with the old ugly NBD or RBD strings) let's switch to json. The function is exported as we'll need it when overwriting the ugly strings qemu would come up with during blockjobs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 18 7月, 2019 3 次提交
-
-
由 Peter Krempa 提交于
Test the output against the schema and also against what we expect. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
To allow using -blockdev with blockjobs QEMU needs to reopen files in read-write mode when modifying the backing chain. To achieve this we need to use 'auto-read-only' for the backing files rather than the normal 'read-only' property. That way qemu knows that the files need to be reopened. Note that the format drivers (e.g. qcow2) are still opened with the read-only property enabled when being a member of the backing chain since they are supposed to be immutable unless a block job is started. QEMU v4.0 (since commit 23dece19da4) allows also dynamic behaviour for auto-read-only which allows us to use sVirt as we only grant write permissions to files when doing a blockjob. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add testing of the host specification part so that we can be sure that no image/host specific data will be present. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 10 7月, 2018 1 次提交
-
-
由 Peter Krempa 提交于
To allow using -blockdev with RBD we need to support the recently added RBD authentication. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 05 6月, 2018 3 次提交
-
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
To keep feature parity, we need to be able to format the PR manager alias when using blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The next patch will forbid the old qcow2 encryption completely. Remove it from the tests. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 23 5月, 2018 1 次提交
-
-
由 Peter Krempa 提交于
Reference the storage via node name rather than inlining it. This is the approach that will be used with -blockdev/blockdev-add since it allows more control and is more future proof. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 07 5月, 2018 12 次提交
-
-
由 Peter Krempa 提交于
Make sure that 'host_device' is generated for type='block'. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
The test cases would correspond to the following -drive command lines: dir-fat-cache.xml: -drive file=fat:/var/somefiles,if=none,id=drive-dummy,readonly=on,cache=directsync -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=off file-backing_basic-cache-directsync.xml: -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=directsync -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=off file-backing_basic-cache-none.xml: -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=none -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=on file-backing_basic-cache-unsafe.xml: -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=unsafe -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=on file-backing_basic-cache-writeback.xml: -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=writeback -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=on file-backing_basic-cache-writethrough.xml: -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=writethrough -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=off network-qcow2-backing-chain-cache-unsafe.xml: -drive file=rbd:rbdpool/rbdimg:id=testuser-rbd:auth_supported=cephx\;none: mon_host=host1.example.com\;host2.example.com, file.password-secret=node-a-s-secalias,format=qcow2, if=none,id=drive-dummy,cache=directsync -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=off Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
The test cases would correspond to the following -drive command lines: file-backing_basic-detect.xml: -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,detect-zeroes=on -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-backing_basic-unmap-detect.xml: -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap,detect-zeroes=unmap -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-backing_basic-unmap-ignore.xml: -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=ignore,detect-zeroes=on -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-backing_basic-unmap.xml: -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
iscsi and rbd support authentication of the connection. Combine it with encryption of qcow2. The top level disk image would generate the following '-drive' cmdline: -drive file=rbd:rbdpool/rbdimg:id=testuser-rbd:auth_supported=cephx\;none: mon_host=host1.example.com\;host2.example.com, file.password-secret=node-a-s-secalias,encrypt.format=luks, encrypt.key-secret=node-b-f-encalias,format=qcow2, if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
Add tests for backing chain handling, including a very long chain which is fully specified in the XML and an unterminated chain. The top level disk image would generate the following '-drive': file-qcow2-backing-chain-encryption.xml: -drive file=/var/lib/libvirt/images/a,encrypt.format=luks, encrypt.key-secret=node-b-f-encalias,format=qcow2,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-qcow2-backing-chain-noopts.xml: -drive file=/var/lib/libvirt/images/rhel7.3.1507297895,format=qcow2,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-qcow2-backing-chain-unterminated.xml: -drive file=/var/lib/libvirt/images/rhel7.3.1507297895,format=qcow2,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
Apart from adding test data add a function which sets up fake secrets for the test. The top level disk image would generate the following '-drive' cmdline: -drive file=/path/luks.img,key-secret=test1-encalias,format=luks,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
Test that the 'aio' option is applied correctly for the 'file' protocol backend and across the backing chain. The top level disk image would generate the following '-drive' cmdline: file-backing_basic-aio_threads: -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,aio=threads -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-raw-aio_native: -drive file=/path/to/i.img,format=raw,if=none,id=drive-dummy,cache=none,aio=native -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=on Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
Test mapping of the 'FAT' disk format to 'vvfat' in qemu. The top level disk image would generate the following '-drive' cmdline: dir-fat-readonly.xml: -drive file=fat:/var/somefiles,if=none,id=drive-dummy,readonly=on -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy dir-fat-floppy.xml -drive file=fat:floppy:/var/somefiles,if=none,id=drive-dummy,readonly=on Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
Formats supporting backing chain such as qed, vmdk, don't have any other parameters than the backing store and 'qcow' has only encryption params which will be tested extra. Add this test case so they are covered since any further test cases will mainly care about 'qcow2' and 'raw'. The top level disk image would generate the following '-drive' cmdline: -drive file=/var/lib/libvirt/images/a,format=qed,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
Similarly to the 'raw' case add tests for bochs, cloop, dmg, ploop, vdi vhd, and vpc. Covering all supported non-backing formats. Note that the JSON name for 'ploop' maps to 'parallels' and 'vhd' maps to 'vhdx'. Files added here would result in the followint configs: file-bochs-noopts.xml: -drive file=/path/to/i.img,format=bochs,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-cloop-noopts.xml: -drive file=/path/to/i.img,format=cloop,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-dmg-noopts.xml: -drive file=/path/to/i.img,format=dmg,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-ploop-noopts.xml: -drive file=/path/to/i.img,format=ploop,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-vdi-noopts.xml: -drive file=/path/to/i.img,format=vdi,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-vhd-noopts.xml: -drive file=/path/to/i.img,format=vhd,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-vpc-noopts.xml: -drive file=/path/to/i.img,format=vpc,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
Test the JSON props generator with a very simple 'raw' image with no other options. The node-names for the image are 31 bytes long so that we validate our node name detector. The top level disk image would generate the following '-drive' cmdline: -drive file=/var/lib/libvirt/images/i.img,format=raw,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
Add a test infrastructure that will allow testing the JSON object generator used for generating data to use with blockdev-add. The resulting disk including the backing chain is validated to conform to the QAPI schema and the expected output files. The first test cases make sure that libvirt will not allow nodenames exceeding 31 chars. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-