From 529431004d449465d3c21d86bab3c2091a934feb Mon Sep 17 00:00:00 2001 From: Peenu Singh Date: Tue, 20 Oct 2015 05:09:34 +0000 Subject: [PATCH] More code changes --- exec/testcases/xenserver/tc/balloon.py | 11 ++++++----- exec/xenrt/config.py | 6 +++--- exec/xenrt/lib/xenserver/guest.py | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/exec/testcases/xenserver/tc/balloon.py b/exec/testcases/xenserver/tc/balloon.py index 0464efe60..8b2612aa1 100755 --- a/exec/testcases/xenserver/tc/balloon.py +++ b/exec/testcases/xenserver/tc/balloon.py @@ -18,8 +18,8 @@ class _BalloonPerfBase(xenrt.TestCase): LIMIT_TO_30GB = True HAP = "NPT" - def __init__(self): - xenrt.TestCase.__init__(self, "_BalloonPerfBase") + def __init__(self, tcid="_BalloonPerfBase"): + super(_BalloonPerfBase, self).__init__(self, tcid=tcid) self.distro = "win7sp1-x86" self.arch = "x86-32" @@ -160,8 +160,8 @@ class _BalloonSmoketest(_BalloonPerfBase): HAP = None EARLY_PV_LINUX = "rhel5\d*,rhel6\d*,centos5\d*,centos6\d*,sl5\d,sl6\d,debian60" - def __init__(self): - _BalloonPerfBase.__init__(self, "_BalloonSmoketest") + def __init__(self, tcid="_BalloonSmoketest"): + super(_BalloonSmoketest, self).__init__(self, tcid) self.balloonUpInitialAlloc = True self.lowMemoryConstraint = False self.allowedTargetMismatch = 0 @@ -362,7 +362,8 @@ class _BalloonSmoketest(_BalloonPerfBase): step("Set dynamic-min=dynamic-max=min, static-max=max") self.guest.setMemoryProperties(None, minMem, minMem, maxMem) else: - #Guests cannot balloon up from inital memory allocation(early PV guests) + #Guests cannot balloon up beyond initial dynamic-min + #Assign dynamic-min = max memory so that we can balloon down to min and perform the test step("Set dynamic-min=dynamic-max=static-max=max") self.guest.setMemoryProperties(None, maxMem, maxMem, maxMem) diff --git a/exec/xenrt/config.py b/exec/xenrt/config.py index 4ab5062a1..c20fc8530 100755 --- a/exec/xenrt/config.py +++ b/exec/xenrt/config.py @@ -679,7 +679,7 @@ class Config(object): self.config["VERSION_CONFIG"]["Boston"]["LATEST_rhel4"] = "rhel48" self.config["VERSION_CONFIG"]["Boston"]["LATEST_rhel5"] = "rhel56" self.config["VERSION_CONFIG"]["Boston"]["LATEST_rhel6"] = "rhel6" - self.config["VERSION_CONFIG"]["Boston"]["NON_BALLOONABLE_PV_LINUX"] = "rhel5,rhel6,centos5,centos6,sl5,sl6,oel5,oel6,debian60" + self.config["VERSION_CONFIG"]["Boston"]["NON_BALLOONABLE_PV_LINUX"] = ["rhel5","rhel6","centos5","centos6","sl5","sl6","oel5","oel6","debian60"] self.config["VERSION_CONFIG"]["Boston"]["DOM0_PARTITIONS"] = {1:4*xenrt.GIGA, 2:4*xenrt.GIGA, 3:"*"} self.config["VERSION_CONFIG"]["Boston"]["INTERNAL_RPU_HOTFIX"] = "XS62E006.xsupdate" @@ -863,7 +863,7 @@ class Config(object): self.config["VERSION_CONFIG"]["Tampa"]["GENERIC_LINUX_OS_64"] = "centos57" self.config["VERSION_CONFIG"]["Tampa"]["TILE_WIN_DISTRO"] = "ws08sp2-x86" self.config["VERSION_CONFIG"]["Tampa"]["TILE_LINUX_DISTRO"] = "centos57" - self.config["VERSION_CONFIG"]["Tampa"]["NON_BALLOONABLE_PV_LINUX"] = "rhel5,rhel6,centos5,centos6,sl5,sl6,oel5,oel6,debian60" + self.config["VERSION_CONFIG"]["Tampa"]["NON_BALLOONABLE_PV_LINUX"] = ["rhel5","rhel6","centos5","centos6","sl5","sl6","oel5","oel6","debian60"] self.config["VERSION_CONFIG"]["Tampa"]["EXPECTED_CRASHDUMP_FILES"] = "xen-crashdump-analyser.log,xen.log,dom0.log" self.config["VERSION_CONFIG"]["Tampa"]["V6_DBV"] = "2010.0521" self.config["VERSION_CONFIG"]["Tampa"]["IDLE_VMs_DOM0_CPU_Utilize"] = "260" @@ -1117,7 +1117,7 @@ class Config(object): self.config["VERSION_CONFIG"]["Creedence"]["TEMPLATE_NAME_CPS_2008R2_64"] = "Citrix XenApp on Windows Server 2008 R2 (64-bit),Citrix XenApp x64 on Windows Server 2008 R2 x64" self.config["VERSION_CONFIG"]["Creedence"]["TEMPLATE_NAME_SDK"] = "Xen API SDK" self.config["VERSION_CONFIG"]["Creedence"]["HVM_LINUX"] = "rhel7\d*,centos7\d*,oel7\d*,ubuntu1404,debian80,debiantesting,ubuntudevel,sl7\d*,fedora.*" - self.config["VERSION_CONFIG"]["Creedence"]["NON_BALLOONABLE_PV_LINUX"] = "rhel5,rhel6,centos5,centos6,sl5,sl6,oel5,oel6,debian60" + self.config["VERSION_CONFIG"]["Creedence"]["NON_BALLOONABLE_PV_LINUX"] = ["rhel5","rhel6","centos5","centos6","sl5","sl6","oel5","oel6","debian60"] self.config["VERSION_CONFIG"]["Creedence"]["NMAP_ALLOWED_PORTS"] = "tcp/22 tcp/443 tcp/80 (tcp/1311)" self.config["VERSION_CONFIG"]["Creedence"]["CLI_SERVER_FLAG"] = "-s" self.config["VERSION_CONFIG"]["Creedence"]["DOM0_DISTRO"] = "centos51" diff --git a/exec/xenrt/lib/xenserver/guest.py b/exec/xenrt/lib/xenserver/guest.py index 81d6d67b7..dd77c25d6 100755 --- a/exec/xenrt/lib/xenserver/guest.py +++ b/exec/xenrt/lib/xenserver/guest.py @@ -295,7 +295,7 @@ class Guest(xenrt.GenericGuest): distro=self.distro vms = self.getHost().lookup("NON_BALLOONABLE_PV_LINUX", None) if distro and vms: - for d in vms.split(","): + for d in vms: if re.match(d, distro): return True return False -- 2.39.5