From patchwork Tue Jun 22 01:52:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 107325 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 o5M1qjJY008227 for ; Tue, 22 Jun 2010 01:52:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758793Ab0FVBwo (ORCPT ); Mon, 21 Jun 2010 21:52:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1277 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758799Ab0FVBwm (ORCPT ); Mon, 21 Jun 2010 21:52:42 -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 o5M1qgga029065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 21 Jun 2010 21:52:42 -0400 Received: from localhost.localdomain (vpn-11-188.rdu.redhat.com [10.11.11.188]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5M1qRto011261; Mon, 21 Jun 2010 21:52:40 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Michael Goldish , Jason Wang Subject: [PATCH 06/13] KVM test: kvm_vm.py: redirect the serial console to a unix socket Date: Mon, 21 Jun 2010 22:52:18 -0300 Message-Id: <1277171545-23003-6-git-send-email-lmr@redhat.com> In-Reply-To: <1277171545-23003-1-git-send-email-lmr@redhat.com> References: <1277171545-23003-1-git-send-email-lmr@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]); Tue, 22 Jun 2010 01:52:46 +0000 (UTC) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 225f26a..1edecb9 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -206,6 +206,9 @@ class VM: def add_qmp_monitor(help, filename): return " -qmp unix:'%s',server,nowait" % filename + def add_serial(help, filename): + return " -serial unix:'%s',server,nowait" % filename + def add_mem(help, mem): return " -m %s" % mem @@ -314,6 +317,9 @@ class VM: else: qemu_cmd += add_human_monitor(help, monitor_filename) + # Add serial console redirection + qemu_cmd += add_serial(help, self.get_serial_console_filename()) + for image_name in kvm_utils.get_sub_dict_names(params, "images"): image_params = kvm_utils.get_sub_dict(params, image_name) if image_params.get("boot_drive") == "no": @@ -774,6 +780,13 @@ class VM: kvm_utils.get_sub_dict_names(self.params, "monitors")] + def get_serial_console_filename(self): + """ + Return the serial console filename. + """ + return "/tmp/serial-%s" % self.instance + + def get_testlog_filename(self): """ Return the testlog filename.