mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 08:05:24 +00:00
80c1fea639
The TEST_CHAIN cases were storing the expected output (or rather data to generate the expected output) in code. This made the code really hard to follow and even harder to modify to add new cases. This patch modifies the code to store the expected output in text files (using the same generator as we've used to) and uses 'virTestCompareToFile' to check the outputs. The result is that the code is way simpler and doesn't require fiddling with 'testFileData' structs when adding new cases. Additionally this removes mixing of code and declaration so we can stop disabling the warning for this file. Another advantage is that the tests are now named so it's easier to figure out if one of them breaks. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
30 lines
509 B
Plaintext
30 lines
509 B
Plaintext
path:ABS_BUILDDIR/virstoragedata/wrap
|
|
backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2
|
|
capacity: 1024
|
|
encryption: 0
|
|
relPath:<null>
|
|
type:1
|
|
format:14
|
|
protocol:none
|
|
hostname:<null>
|
|
|
|
path:ABS_BUILDDIR/virstoragedata/qcow2
|
|
backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw
|
|
capacity: 1024
|
|
encryption: 0
|
|
relPath:<null>
|
|
type:1
|
|
format:14
|
|
protocol:none
|
|
hostname:<null>
|
|
|
|
path:ABS_BUILDDIR/virstoragedata/raw
|
|
backingStoreRaw: <null>
|
|
capacity: 0
|
|
encryption: 0
|
|
relPath:<null>
|
|
type:1
|
|
format:1
|
|
protocol:none
|
|
hostname:<null>
|