From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukas Doktor Subject: [PATCH 2/4] Add VMs alive check while spliting the guest's pages Date: Sat, 8 May 2010 18:01:09 +0100 Message-ID: <1273338071-8595-3-git-send-email-ldoktor@redhat.com> References: <[KVM_AUTOTEST][PATCH] KSM_overcommit: dynamic reserve calculation (2)> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, kvm@vger.kernel.org To: ldoktor@redhat.com Return-path: In-Reply-To: <[KVM_AUTOTEST][PATCH] KSM_overcommit: dynamic reserve calculation (2)> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org Signed-off-by: Lukas Doktor --- client/tests/kvm/tests/ksm_overcommit.py | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/tests/ksm_overcommit.py b/client/tests/kvm/tests/ksm_overcommit.py index 4aa6deb..b3d6880 100644 --- a/client/tests/kvm/tests/ksm_overcommit.py +++ b/client/tests/kvm/tests/ksm_overcommit.py @@ -142,6 +142,12 @@ def run_ksm_overcommit(test, params, env): session = None vm = None for i in range(1, vmsc): + # Check VMs + for j in range(0, vmsc): + if not lvms[j].is_alive: + e_msg = "VM %d died while executing static_random_fill in"\ + " VM %d on allocator loop" % (j, i) + raise error.TestFail(e_msg) vm = lvms[i] session = lsessions[i] a_cmd = "mem.static_random_fill()" @@ -154,6 +160,10 @@ def run_ksm_overcommit(test, params, env): logging.debug("Watching host memory while filling vm %s memory", vm.name) while not out.startswith("PASS") and not out.startswith("FAIL"): + if not vm.is_alive(): + e_msg = "VM %d died while executing static_random_fill"\ + " on allocator loop" % i + raise error.TestFail(e_msg) free_mem = int(utils.read_from_meminfo("MemFree")) if (ksm_swap): free_mem = (free_mem + -- 1.6.2.5