On 08/29/2012 02:21 AM, Alex Jia wrote:
On 08/28/2012 11:39 PM, Yu Mingfei wrote:+ if status_error: + if status != 0: + raise error.TestFail("Run failed with right command!") + else: + if new_memory and current_memory != new_memory:The same issue to previous cases, you should login the guest then check actual memory value in /proc/meminfo rather than simply check it by virsh itself.
Ahh, yes, good idea. Get memory data directly from guest. A few suggestions:
I seem to remember parsing /proc/meminfo contents is function needed by other virt test also (I can't remember which one). Maybe you could write function for client/shared/base_utils.py?
Implementation suggestion: Have function use regex to parse lines and return dictionary.
In addition, you may test 'setmaxmem' command together such as ballooning memory if you like,
I disagree, I think this would be better as a separate test (though I welcome argument). There are a lot of subtle behaviors between setmem and setmaxmem that need to be accounted for. I like how Yu's test is very simple.
Thanks, Alex+ raise error.TestFail( + "Run successful but result is not expected") + else: + if status == 0: + raise error.TestFail("Run successful with wrong command") -- 1.7.1
-- Chris Evich, RHCA, RHCE, RHCDS, RHCSS Quality Assurance Engineer e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
