]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Fixed low memory constraint
authorPeenu Singh <peenu.singh@citrix.com>
Fri, 9 Oct 2015 08:46:35 +0000 (08:46 +0000)
committerPeenu Singh <peenu.singh@citrix.com>
Fri, 9 Oct 2015 08:46:35 +0000 (08:46 +0000)
exec/testcases/xenserver/tc/balloon.py

index 14a66e28ea833dc7fe9dffdd6c100c0705929831..a723106900dc8226c4e8da95f3131531768e9581 100755 (executable)
@@ -218,7 +218,7 @@ class _BalloonSmoketest(_BalloonPerfBase):
         # All Linux distros behave differently on memory balloon up.
         # Check the type and accordingly set the class variables
         if [d for d in self.EARLY_PV_LINUX.split(",") if re.match(d,self.DISTRO)]:
-            log("This is a early PV guest and it cannot balloon up beyond initial memory allocation")
+            log("This is an early PV guest and it cannot balloon up beyond initial memory allocation")
             self.balloonUpInitialAlloc = False
         elif self.guest.isHVMLinux():
             log("This is HVM PV guest and we need to consider the constraint for 10 MB video memory")
@@ -260,7 +260,7 @@ class _BalloonSmoketest(_BalloonPerfBase):
         # 32-bit pv-ops guests cannot balloon up to more than 10x the amount of low memory 
         if not self.guest.windows and self.lowMemoryConstraint:
             lowMemory = self.guest.getLowMemory()
-            self.maxSupported = lowMemory * 10
+            self.maxSupported = min(lowMemory * 10, self.maxSupported)
             xenrt.TEC().logverbose("Due to low memory constraint, Capping maximum memory to %s" % (self.maxSupported))
 
     def preLogs(self):