From patchwork Thu Jun 24 23:33:03 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: 107955 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 o5ONXLQW030423 for ; Thu, 24 Jun 2010 23:33:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754376Ab0FXXdT (ORCPT ); Thu, 24 Jun 2010 19:33:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60736 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753033Ab0FXXdR (ORCPT ); Thu, 24 Jun 2010 19:33:17 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5ONXG1X013123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Jun 2010 19:33:17 -0400 Received: from localhost.localdomain (vpn-9-214.rdu.redhat.com [10.11.9.214]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5ONX8o9020871; Thu, 24 Jun 2010 19:33:15 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org, mgoldish@redhat.com Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH 2/5] KVM test: add boolean 'testdev' VM parameter for RHEL-6 style unit tests Date: Thu, 24 Jun 2010 20:33:03 -0300 Message-Id: <1277422386-13516-2-git-send-email-lmr@redhat.com> In-Reply-To: <1277422386-13516-1-git-send-email-lmr@redhat.com> References: <1277422386-13516-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 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, 24 Jun 2010 23:33:21 +0000 (UTC) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 87b037f..7b1fc05 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -290,6 +290,10 @@ class VM: def add_kernel_cmdline(help, cmdline): return " -append %s" % cmdline + def add_testdev(help, filename): + return (" -chardev file,id=testlog,path=%s" + " -device testdev,chardev=testlog" % filename) + # End of command line option wrappers if name is None: name = self.name @@ -424,6 +428,9 @@ class VM: elif params.get("uuid"): qemu_cmd += add_uuid(help, params.get("uuid")) + if params.get("testdev") == "yes": + qemu_cmd += add_testdev(help, self.get_testlog_filename()) + # If the PCI assignment step went OK, add each one of the PCI assigned # devices to the qemu command line. if self.pci_assignable: