[libvirt-tck PATCH] 121-block-info.t: allow for greater capacity/allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't be too picky about the actual size and allocation. The size needs
to be correct but it's o.k. for allocation and size to be bigger. Debian
Wheezy's qemu adds 4096 bytes.
---
 scripts/domain/121-block-info.t |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/domain/121-block-info.t b/scripts/domain/121-block-info.t
index dad00c6..4c3fafc 100644
--- a/scripts/domain/121-block-info.t
+++ b/scripts/domain/121-block-info.t
@@ -103,8 +103,8 @@ is($dom->get_block_info($dst2,0)->{physical}, 1024*1024, "Get disk physical info
 
 
 is($dom->get_block_info($dst,0)->{capacity}, 1024*1024*50, "Get disk capacity info");
-is($dom->get_block_info($dst,0)->{allocation}, 1024*1024*50, "Get disk allocation info");
-is($dom->get_block_info($dst,0)->{physical}, 1024*1024*50, "Get disk physical info");
+ok($dom->get_block_info($dst,0)->{allocation} >= 1024*1024*50, "Get disk allocation info");
+ok($dom->get_block_info($dst,0)->{physical} >= 1024*1024*50, "Get disk physical info");
 
 diag "Test block_resize";
 lives_ok(sub {$dom->block_resize($dst, 512*50)}, "resize to 512*50 KB");
@@ -112,8 +112,8 @@ $st = stat($path);
 is($st->size, 512*1024*50, "size is 25M");
 
 is($dom->get_block_info($dst,0)->{capacity}, 1024*512*50, "Get disk capacity info");
-is($dom->get_block_info($dst,0)->{allocation}, 1024*512*50, "Get disk allocation info");
-is($dom->get_block_info($dst,0)->{physical}, 1024*512*50, "Get disk physical info");
+ok($dom->get_block_info($dst,0)->{allocation} >= 1024*512*50, "Get disk allocation info");
+ok($dom->get_block_info($dst,0)->{physical} >= 1024*512*50, "Get disk physical info");
 
 lives_ok(sub {$dom->block_resize($dst, 1024*50)}, "resize to 1024*50 KB");
 $st = stat($path);
-- 
1.7.10.4

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]