From: Jason Wang <jasowang@redhat.com>
To: Yolkfull Chow <yzhou@redhat.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [Autotest] [Autotest PATCH] KVM test: Fixup memory size shown in 'GB' in get_memory_size
Date: Sat, 26 Dec 2009 15:39:42 +0800 [thread overview]
Message-ID: <4B35BDBE.70501@redhat.com> (raw)
In-Reply-To: <4B35BC68.9090405@redhat.com>
Sorry for the noise, please ignore this mail.
> Applied, thanks
>
>> In guest RHEL-3.9 $mem_chk_cmd will catch memory size in GB which
>> will be computed wrongly in get_memory_size. This patch fix the problem.
>>
>> Thanks akong for pointing this out.
>>
>> Signed-off-by: Yolkfull Chow <yzhou@redhat.com>
>> ---
>> client/tests/kvm/kvm_vm.py | 6 +++++-
>> 1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
>> index cc314d4..7229b79 100755
>> --- a/client/tests/kvm/kvm_vm.py
>> +++ b/client/tests/kvm/kvm_vm.py
>> @@ -854,7 +854,11 @@ class VM:
>> mem_size = 0
>> for m in mem:
>> mem_size += int(m)
>> - if not "MB" in mem_str:
>> + if "GB" in mem_str:
>> + mem_size *= 1024
>> + elif "MB" in mem_str:
>> + pass
>> + else:
>> mem_size /= 1024
>> return int(mem_size)
>> return None
>>
>>
>
> _______________________________________________
> Autotest mailing list
> Autotest@test.kernel.org
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
>
prev parent reply other threads:[~2009-12-26 7:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-25 5:23 [Autotest PATCH] KVM test: Fixup memory size shown in 'GB' in get_memory_size Yolkfull Chow
2009-12-26 7:34 ` Jason Wang
2009-12-26 7:39 ` Jason Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B35BDBE.70501@redhat.com \
--to=jasowang@redhat.com \
--cc=autotest@test.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=yzhou@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.