From patchwork Thu Jul 8 21:04:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 110927 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o68L4N4s025326 for ; Thu, 8 Jul 2010 21:04:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754740Ab0GHVEV (ORCPT ); Thu, 8 Jul 2010 17:04:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44149 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753498Ab0GHVEU (ORCPT ); Thu, 8 Jul 2010 17:04:20 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o68L4Ihb001704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Jul 2010 17:04:18 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o68L4IB6004057; Thu, 8 Jul 2010 17:04:18 -0400 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o68L4Gx1012562; Thu, 8 Jul 2010 17:04:16 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH] KVM test: fail if qemu complains about KVM module trouble Date: Fri, 9 Jul 2010 00:04:12 +0300 Message-Id: <1278623052-12571-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 08 Jul 2010 21:04:23 +0000 (UTC) If qemu is tested without KVM intentionally (e.g. with -no-kvm) it won't complain and the KVM test won't complain either. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index e631a3a..6cd0688 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -684,9 +684,17 @@ class VM: self.monitors += [monitor] # Get the output so far, to see if we have any problems with - # hugepage setup. + # KVM modules or with hugepage setup. output = self.process.get_output() + if re.search("Could not initialize KVM", output, re.IGNORECASE): + logging.error("Could not initialize KVM; " + "qemu command:\n%s" % qemu_command) + logging.error("Output:" + kvm_utils.format_str_for_message( + self.process.get_output())) + self.destroy() + return False + if "alloc_mem_area" in output: logging.error("Could not allocate hugepage memory; " "qemu command:\n%s" % qemu_command)