KVM test: Fixup memory size shown in 'GB' in get_memory_size
PATCH 1/1 KVM test: Fixup memory size shown in 'GB' in get_memory_size
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.
--- client/tests/kvm/kvm_vm.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
client/tests/kvm/kvm_vm.py +5 -1
@@ -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
Signature · 1 line
1.6.5.5
Jason Wang
AppliedApplied, thanks
Quoted 28 lines
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 <[email protected]>--- client/tests/kvm/kvm_vm.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)client/tests/kvm/kvm_vm.py +5
-1@@ -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
Sorry for the noise, please ignore this mail.
Quoted 37 lines
Applied, thanks
Quoted 19 lines
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 <[email protected]>--- client/tests/kvm/kvm_vm.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)client/tests/kvm/kvm_vm.py +0
-0@@ -854,7 +854,11 @@ class VM: mem_size = 0 for m in mem:client/tests/kvm/kvm_vm.py class VM: · line 864
Quoted 10 lines
client/tests/kvm/kvm_vm.py +5
-1mem_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
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest