From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Meneghel Rodrigues Subject: Re: [KVM-AUTOTEST PATCH] kvm_vm.py: add new VM parameter 'x11_display' that controls $DISPLAY Date: Thu, 28 May 2009 10:26:34 -0300 Message-ID: <1243517194.2976.1053.camel@localhost.localdomain> References: <8e37a36c044c20259dcd8a34d72a651e85b37d5f.1243179847.git.mgoldish@redhat.com> <838bcae1b49be011e2cde1294a391a296059464a.1243179847.git.mgoldish@redhat.com> <6a70cb56a775fdb688da0231073abb0ce4baa7b1.1243179847.git.mgoldish@redhat.com> <63bacaa214ccd95c18fb644056855acd72757ac4.1243179847.git.mgoldish@redhat.com> <43f85767b32b927ca5e32abc5ded281915343656.1243179847.git.mgoldish@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Michael Goldish Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37706 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755919AbZE1N0f (ORCPT ); Thu, 28 May 2009 09:26:35 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4SDQb2Q024777 for ; Thu, 28 May 2009 09:26:37 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 2009-05-24 at 18:46 +0300, Michael Goldish wrote: > If x11_display is specified, the DISPLAY environment variable is set to this > value for the QEMU process. This may be useful for SDL rendering. Looks good to me! > Also add some comments. > > Signed-off-by: Michael Goldish > --- > client/tests/kvm_runtest_2/kvm_vm.py | 12 +++++++++++- > 1 files changed, 11 insertions(+), 1 deletions(-) > > diff --git a/client/tests/kvm_runtest_2/kvm_vm.py b/client/tests/kvm_runtest_2/kvm_vm.py > index 9571a3b..7a4ce4a 100644 > --- a/client/tests/kvm_runtest_2/kvm_vm.py > +++ b/client/tests/kvm_runtest_2/kvm_vm.py > @@ -173,6 +173,8 @@ class VM: > (iso_dir is pre-pended to the ISO filename) > extra_params -- a string to append to the qemu command > ssh_port -- should be 22 for SSH, 23 for Telnet > + x11_display -- if specified, the DISPLAY environment variable will be be set > + to this value for the qemu process (useful for SDL rendering) > images -- a list of image object names, separated by spaces > nics -- a list of NIC object names, separated by spaces > > @@ -198,8 +200,16 @@ class VM: > if iso_dir == None: > iso_dir = self.iso_dir > > - qemu_cmd = qemu_path > + # Start constructing the qemu command > + qemu_cmd = "" > + # Set the X11 display parameter if requested > + if params.get("x11_display"): > + qemu_cmd += "DISPLAY=%s " % params.get("x11_display") > + # Add the qemu binary > + qemu_cmd += qemu_path > + # Add the VM's name > qemu_cmd += " -name '%s'" % name > + # Add the monitor socket parameter > qemu_cmd += " -monitor unix:%s,server,nowait" % self.monitor_file_name > > for image_name in kvm_utils.get_sub_dict_names(params, "images"): -- Lucas Meneghel Rodrigues Software Engineer (QE) Red Hat - Emerging Technologies