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

Erik Skultety eskultet at redhat.com
Tue Sep 24 15:31:18 UTC 2019


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 at 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




More information about the libvir-list mailing list