On 08/30/2012 05:39 AM, Yu Mingfei wrote:

+
+    #check status_error
+    vm_status_error = params.get("vm_status_error", "no")
+    addition_status_error = params.get("addition_status_error", "no")
+    status_error = (vm_status_error == "no") and
(addition_status_error == "no")
+    mem_status_error = params.get("mem_status_error", "no")
+    status_error = status_error and (mem_status_error == "no")
+    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.

In addition, you may test 'setmaxmem' command together such as
ballooning memory if you like,
Hi Alex,Chris:

I have tried to login to check memory, but I found they had rather big
deviation.:-(
1048576 => 1025408
out guest       in guest

Mmmmm, good point.  Yes this is a problem.

So if we check between in and out, we must have a allowed deviation.

Another test I reviewed recently used a 'delta' parameter to allow configuring allowable difference. It's not a perfect solution, but maybe this could work here?

Problem with using absolute delta value is it does not scale well. I'd suggest using a relative measurement (like percentage), but this has problems at extreme memory sizes also :(

I think we should check inside and outside. Fail test if inside and outside values don't agree (within some margin of error). However, I don't think this needs to be a requirement for test. We can make it a future enhancement.

Do you have some idea about it?

23168 KB difference. Is it the same difference always, or does it change with setmem?

I wonder if we can account for this easily. I'll ask KVM developers if they know why it's different and/or if they have suggestion to count it. If not, then probably checking delta is most practical possible alternative.


BTW, In this v1 patchset, I check by dominfo command,
why I can not check by dominfo's result?
As my understand, dominfo's result also can reflect guest's current
memory.^^

  Thanks,
  Yu


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





--
Best Regards
Yu Mingfei



--
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

Reply via email to