+
+    #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
So if we check between in and out, we must have a allowed deviation.
Do you have some idea about it?

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

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to