From d2958856b3c6d709b5d1be83413e8863ac4c87e3 Mon Sep 17 00:00:00 2001 From: Alastair Tse Date: Thu, 9 Nov 2006 16:20:26 +0000 Subject: [PATCH] [XM-TEST] Relax craete_mem*_pos checks to allow a 2MB less than expected. Now that xm list outputs the real system memory allocation, this can be 1-2MB less than expected. Signed-off-by: Alastair Tse --- tools/xm-test/tests/create/07_create_mem64_pos.py | 2 +- tools/xm-test/tests/create/08_create_mem128_pos.py | 2 +- tools/xm-test/tests/create/09_create_mem256_pos.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/xm-test/tests/create/07_create_mem64_pos.py b/tools/xm-test/tests/create/07_create_mem64_pos.py index ae2f84adb1..1a27d55722 100644 --- a/tools/xm-test/tests/create/07_create_mem64_pos.py +++ b/tools/xm-test/tests/create/07_create_mem64_pos.py @@ -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) diff --git a/tools/xm-test/tests/create/08_create_mem128_pos.py b/tools/xm-test/tests/create/08_create_mem128_pos.py index 0d50006b36..85d35173c7 100644 --- a/tools/xm-test/tests/create/08_create_mem128_pos.py +++ b/tools/xm-test/tests/create/08_create_mem128_pos.py @@ -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) diff --git a/tools/xm-test/tests/create/09_create_mem256_pos.py b/tools/xm-test/tests/create/09_create_mem256_pos.py index c926d62de8..28db3dade2 100644 --- a/tools/xm-test/tests/create/09_create_mem256_pos.py +++ b/tools/xm-test/tests/create/09_create_mem256_pos.py @@ -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) -- 2.30.2