[XM-TEST] Relax craete_mem*_pos checks to allow a 2MB less than
authorAlastair Tse <atse@xensource.com>
Thu, 9 Nov 2006 16:20:26 +0000 (16:20 +0000)
committerAlastair Tse <atse@xensource.com>
Thu, 9 Nov 2006 16:20:26 +0000 (16:20 +0000)
expected.

Now that xm list outputs the real system memory allocation, this can
be 1-2MB less than expected.

Signed-off-by: Alastair Tse <atse@xensource.com>
tools/xm-test/tests/create/07_create_mem64_pos.py
tools/xm-test/tests/create/08_create_mem128_pos.py
tools/xm-test/tests/create/09_create_mem256_pos.py

index ae2f84adb11b782407c84ca89698b5aad297cd62..1a27d55722b85c10497b731844a10a4bf8e2c0fd 100644 (file)
@@ -42,7 +42,7 @@ if eyecatcher1 != "True":
        FAIL("Failed to verify that a 64MB domain started")
 
 eyecatcher2 = getDomMem(domain_mem64.getName())
-if eyecatcher2 != 64:
+if eyecatcher2 not in range(62, 65):
        FAIL("Started domain with 64MB, but it got %i MB" % eyecatcher2)
 
 #stop the domain (nice shutdown)
index 0d50006b36798db8bf489eb96827c0cd5c6a6240..85d35173c73aa82210601c974e838f9086a76f59 100644 (file)
@@ -42,7 +42,7 @@ if eyecatcher1 != "True":
        FAIL("Failed to verify that a 128MB domain started")
 
 eyecatcher2 = getDomMem(domain_mem128.getName())
-if eyecatcher2 != 128:
+if eyecatcher2 not in range(126, 129):
        FAIL("Started domain with 128MB, but it got %i MB" % eyecatcher2)
 
 #stop the domain (nice shutdown)
index c926d62de80a98cd0fcc618910831b7283a078f6..28db3dade21b3c5d1283a06b0b04ce666d6fa91a 100644 (file)
@@ -42,7 +42,7 @@ if eyecatcher1 != "True":
        FAIL("Failed to verify that a 256MB domain started")
 
 eyecatcher2 = getDomMem(domain_mem256.getName())
-if eyecatcher2 != 256:
+if eyecatcher2 not in range(254, 257):
        FAIL("Started domain with 256MB, but it got %i MB" % eyecatcher2)
 
 #stop the domain (nice shutdown)