[pve-devel] [PATCH qemu-server 1/2] add tests for qemu_img_convert

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Oct 17 12:12:16 CEST 2019


On 10/17/19 12:09 PM, Dominik Csapak wrote:
> On 10/17/19 9:26 AM, Thomas Lamprecht wrote:
>> On 10/16/19 11:27 AM, Dominik Csapak wrote:
>>> ...
>>> +my $tests = {
>>> +    qcow2raw => [
>>> +    "local:$vmid/vm-$vmid-disk-0.qcow2", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 0, [
>>> +        "/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "qcow2", "-O", "raw",
>>> +        "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2", "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw"
>>> +    ]
>>> +    ],
>>
>> can e have an explicit separation of command and expected result already in
>> the test data structure representation?
>>
>> something like:
>>
>> qcow2raw => {
>>    cmd => [],
>>    expected => ...,
>> }
> 
> sure but i would it do like this:
> 
> [
>      {
>         name => 'testname',
>         test => [...],
>         expected => [...],
>     },
>     ...
> ]
> 
> that way we have control about the order of the tests...

yes, works for me.





More information about the pve-devel mailing list