Compare also the detected format of the backing file
('backingStoreRawFormat' field) into the output data for comparison with
others. Since the ToString function can't convert VIR_STORAGE_FILE_AUTO
use also the numeric value.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
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>