From: Ian Jackson Subject: Re: [PATCH 2/2] ts-debian-hvm-install: fix guest memory size Date: Mon, 14 Apr 2014 15:45:40 +0100 Message-ID: <21323.62612.597934.567330@mariner.uk.xensource.com> References: <1397474223-24387-1-git-send-email-wei.liu2@citrix.com> <1397474223-24387-3-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397474223-24387-3-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: ian.campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Wei Liu writes ("[PATCH 2/2] ts-debian-hvm-install: fix guest memory size"): > Change the default memory size to 768MB, which is taken from > ts-redhat-install. It should be a safe size to make this test case run > on every host. ... > -our $ram_mb= 6000; > +our $ram_mb= 768; > our $disk_mb= 10000; > > our $guesthost= "$gn.guest.osstest"; > @@ -166,6 +166,14 @@ sub prep () { > }); > } > > +# If host has >5G free memory, create a guest with 5G memory to catch any error > +# that triggers cross 4G boundary > +our $host_freemem_mb = host_get_free_memory($ho, $toolstack); > +if ($host_freemem_mb > 5000) { > + $ram_mb = 5000; If the host has exactly 5000, this will result in failure. Also I don't like the separation of the two values for $ram_mb. The manifest constant at the top of the script is misleading given that the code might override it. I think you probably want to bury the magic constant(s) in with the setting code. Thanks, Ian.