3401e20 qemu: Don't mangle the storage format for type='dir'

Authored and Committed by mkletzan 6 years ago
    qemu: Don't mangle the storage format for type='dir'
    
    Our backing probing code handles directory file types properly in
    virStorageFileGetMetadataRecurse(), by that I mean it leaves them
    alone.  However its caller, the virStorageFileGetMetadata() resets the
    type to raw before probing, without even checking the type.  We need
    to special-case TYPE_DIR in order to achieve desired results.
    
    Also, in order to properly test this, we need to stop resetting format
    of volumes in tests for TYPE_DIR (probably the reason why we didn't
    catch that and why the test data didn't need to be modified).
    
    Partially-resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1443434
    
    Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
    
        
file modified
+9 -3
file modified
+9 -2