From patchwork Fri May 28 08:25:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 102833 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 o4S8JuFL019272 for ; Fri, 28 May 2010 08:19:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755927Ab0E1ITy (ORCPT ); Fri, 28 May 2010 04:19:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54119 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754534Ab0E1ITw (ORCPT ); Fri, 28 May 2010 04:19:52 -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 o4S8Jnxo027974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 May 2010 04:19:50 -0400 Received: from dhcp-91-25.nay.redhat.com (dhcp-91-25.nay.redhat.com [10.66.91.25]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4S8Jl5g025072; Fri, 28 May 2010 04:19:48 -0400 Subject: [PATCH 1/3] KVM test: Add the support of kernel and initrd option for qemu-kvm To: lmr@redhat.com, autotest@test.kernel.org From: Jason Wang Cc: kvm@vger.kernel.org Date: Fri, 28 May 2010 16:25:01 +0800 Message-ID: <20100528082501.31543.64111.stgit@dhcp-91-25.nay.redhat.com> User-Agent: StGit/0.15 MIME-Version: 1.0 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]); Fri, 28 May 2010 08:19:57 +0000 (UTC) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index bca9d15..c7eed56 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -360,6 +360,16 @@ 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 += " -kernel %s" % kernel + + initrd = params.get("initrd") + if initrd: + initrd = kvm_utils.get_path(root_dir, initrd) + qemu_cmd += " -initrd %s" % initrd + 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"))