From patchwork Thu Jun 3 11:03:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 104072 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o53B3WJn004849 for ; Thu, 3 Jun 2010 11:03:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752401Ab0FCLDa (ORCPT ); Thu, 3 Jun 2010 07:03:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752069Ab0FCLDa (ORCPT ); Thu, 3 Jun 2010 07:03:30 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o53B3S5I021006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Jun 2010 07:03:29 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o53B3SIa027998; Thu, 3 Jun 2010 07:03:28 -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 o53B3QFb025307; Thu, 3 Jun 2010 07:03:27 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 1/4] KVM test: support -kernel and -append command line options Date: Thu, 3 Jun 2010 14:03:14 +0300 Message-Id: <1275562997-26311-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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, 03 Jun 2010 11:03:32 +0000 (UTC) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 94bacdf..f3c05f3 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -268,6 +268,12 @@ class VM: def add_pcidevice(help, host): return " -pcidevice host=%s" % host + def add_kernel(help, filename): + return " -kernel %s" % filename + + def add_kernel_cmdline(help, cmdline): + return " -append %s" % cmdline + # End of command line option wrappers if name is None: name = self.name @@ -360,6 +366,15 @@ class VM: tftp = kvm_utils.get_path(root_dir, tftp) qemu_cmd += add_tftp(help, tftp) + kernel = params.get("kernel") + if kernel: + kernel = kvm_utils.get_path(root_dir, kernel) + qemu_cmd += add_kernel(help, kernel) + + kernel_cmdline = params.get("kernel_cmdline") + if kernel_cmdline: + qemu_cmd += add_kernel_cmdline(help, kernel_cmdline) + for redir_name in kvm_utils.get_sub_dict_names(params, "redirs"): redir_params = kvm_utils.get_sub_dict(params, redir_name) guest_port = int(redir_params.get("guest_port"))