Commit Graph

7 Commits

Author SHA1 Message Date
Peter Krempa
4f7aaa1b7b virstoragetest: Reinstate testing of images without 'backing_fmt'
There are important security implications when we'd misprobe those
images. This commit reinstates the tests removed by commit 979d1ba3ae
since 'qemu-img' refused to format them.

With the new testing approach with stored images we won't run into that
problem.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-09 15:29:00 +02:00
Peter Krempa
8f36cf91ac virstoragetest: Use preformatted qcow2 image for testing relative paths
More preparation for eliminating image rewriting.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-09 15:29:00 +02:00
Peter Krempa
229a6d6992 virstoragetest: Convert symlink and relative image testing use preformatted images
Use prepared test images instead to simplify and clarify the code
instead of rewriting existing images multiple times.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-09 15:29:00 +02:00
Peter Krempa
df020845d5 virstoragetest: Use preformatted file for testing missing backing store
Similarly to previous ones, this one doesn't need to be created by
qemu-img in order for the test to make sense.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-09 15:29:00 +02:00
Peter Krempa
80412bfbeb virstoragetest: Use pre-formatted file for non-path extraction test
This one doesn't require using qemu-img either.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-09 15:29:00 +02:00
Peter Krempa
325fce82d1 virstoragetest: Use a pre-formatted QED file for testing backing store extraction
The QED format isn't really being developed any more. Use a
pre-formatted image to test the existing code. In this instance we
switch to using a relative backing path for simplicity.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-09 15:29:00 +02:00
Peter Krempa
df94a4e907 virstoragetest: Test backing chain loops with hardcoded images
Provide the images for the self and mutual backing image loop cases in
the repository rather than formatting them with qemu-img.

This makes the code more readable and also decouples the backing chain
tests from each other.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-09 15:29:00 +02:00