[libvirt] [libvirt-tck PATCH] domain: Relax the checks matching disk sizes

Erik Skultety posted 1 patch 4 years, 7 months ago
Failed in applying to current master (apply log)
scripts/domain/121-block-info.t | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [libvirt-tck PATCH] domain: Relax the checks matching disk sizes
Posted by Erik Skultety 4 years, 7 months ago
There may be some preallocation going on depending on what host
filesystem is in place which may mess up the numbers we expect mainly in
allocation, so let's stick with exact matching of the capacity and
relaxing the checks on allocation and physical size as commit 30beeb2e
did.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
---
 scripts/domain/121-block-info.t | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/domain/121-block-info.t b/scripts/domain/121-block-info.t
index bfff48c..d9d644e 100644
--- a/scripts/domain/121-block-info.t
+++ b/scripts/domain/121-block-info.t
@@ -98,8 +98,8 @@ ok_domain(sub { $dom = $conn->create_domain($xml) }, "Create domain");
 $xml = $dom->get_xml_description();
 
 is($dom->get_block_info($dst2,0)->{capacity}, 1024*1024*50, "Get disk capacity info");
-is($dom->get_block_info($dst2,0)->{allocation}, 1024*1024, "Get disk allocation info");
-is($dom->get_block_info($dst2,0)->{physical}, 1024*1024*50, "Get disk physical info");
+ok($dom->get_block_info($dst2,0)->{allocation} >= 1024*1024, "Get disk allocation info");
+ok($dom->get_block_info($dst2,0)->{physical} >= 1024*1024*50, "Get disk physical info");
 
 
 is($dom->get_block_info($dst,0)->{capacity}, 1024*1024*50, "Get disk capacity info");
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-tck PATCH] domain: Relax the checks matching disk sizes
Posted by Daniel P. Berrangé 4 years, 7 months ago
On Tue, Sep 24, 2019 at 05:31:18PM +0200, Erik Skultety wrote:
> There may be some preallocation going on depending on what host
> filesystem is in place which may mess up the numbers we expect mainly in
> allocation, so let's stick with exact matching of the capacity and
> relaxing the checks on allocation and physical size as commit 30beeb2e
> did.
> 
> Signed-off-by: Erik Skultety <eskultet@redhat.com>
> ---
>  scripts/domain/121-block-info.t | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list