Message ID | 1247740006-27416-1-git-send-email-yzhou@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jul 16, 2009 at 06:26:46PM +0800, Yolkfull Chow wrote: > > Signed-off-by: Yolkfull Chow <yzhou@redhat.com> > --- > client/tests/kvm/kvm_vm.py | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py > index 503f636..895049e 100644 > --- a/client/tests/kvm/kvm_vm.py > +++ b/client/tests/kvm/kvm_vm.py > @@ -113,6 +113,13 @@ class VM: > self.qemu_path = qemu_path > self.image_dir = image_dir > self.iso_dir = iso_dir > + > + if params.get("uuid"): > + if params.get("uuid") == "random": > + uuid = os.popen("cat /proc/sys/kernel/random/uuid").readline() > + self.uuid = uuid.strip() > + else: > + self.uuid = params.get("uuid") Sorry, forgot to initialize self.uuid. Will resend the patch. > > > # Find available monitor filename > @@ -374,6 +381,10 @@ class VM: > # Make qemu command > qemu_command = self.make_qemu_command() > > + # Specify the system UUID > + if self.uuid: > + qemu_command += " -uuid %s" % self.uuid > + > # Is this VM supposed to accept incoming migrations? > if for_migration: > # Find available migration port > -- > 1.6.2.5 > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/16/2009 01:26 PM, Yolkfull Chow wrote: > Signed-off-by: Yolkfull Chow<yzhou@redhat.com> > --- > client/tests/kvm/kvm_vm.py | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py > index 503f636..895049e 100644 > --- a/client/tests/kvm/kvm_vm.py > +++ b/client/tests/kvm/kvm_vm.py > @@ -113,6 +113,13 @@ class VM: > self.qemu_path = qemu_path > self.image_dir = image_dir > self.iso_dir = iso_dir > + > + if params.get("uuid"): > + if params.get("uuid") == "random": > + uuid = os.popen("cat /proc/sys/kernel/random/uuid").readline() > + self.uuid = uuid.strip() > instead of os.popen("cat ..."), you can open the file directly: uuid = file('/proc/.../uuid').readline()
On Wed, Jul 29, 2009 at 9:18 AM, Avi Kivity<avi@redhat.com> wrote: > On 07/16/2009 01:26 PM, Yolkfull Chow wrote: >> >> Signed-off-by: Yolkfull Chow<yzhou@redhat.com> >> --- >> Â client/tests/kvm/kvm_vm.py | Â 11 +++++++++++ >> Â 1 files changed, 11 insertions(+), 0 deletions(-) >> >> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py >> index 503f636..895049e 100644 >> --- a/client/tests/kvm/kvm_vm.py >> +++ b/client/tests/kvm/kvm_vm.py >> @@ -113,6 +113,13 @@ class VM: >> Â Â Â Â Â self.qemu_path = qemu_path >> Â Â Â Â Â self.image_dir = image_dir >> Â Â Â Â Â self.iso_dir = iso_dir >> + >> + Â Â Â Â if params.get("uuid"): >> + Â Â Â Â Â Â if params.get("uuid") == "random": >> + Â Â Â Â Â Â Â Â uuid = os.popen("cat >> /proc/sys/kernel/random/uuid").readline() >> + Â Â Â Â Â Â Â Â self.uuid = uuid.strip() >> > > instead of os.popen("cat ..."), you can open the file directly: > > Â uuid = file('/proc/.../uuid').readline() Oooops... I didn't notice this little issue. Will make a quick patch to change it, thanks Avi! -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Jul 29, 2009 at 9:36 AM, Lucas Meneghel Rodrigues<lmr@redhat.com> wrote: > On Wed, Jul 29, 2009 at 9:18 AM, Avi Kivity<avi@redhat.com> wrote: >> On 07/16/2009 01:26 PM, Yolkfull Chow wrote: >>> >>> Signed-off-by: Yolkfull Chow<yzhou@redhat.com> >>> --- >>> Â client/tests/kvm/kvm_vm.py | Â 11 +++++++++++ >>> Â 1 files changed, 11 insertions(+), 0 deletions(-) >>> >>> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py >>> index 503f636..895049e 100644 >>> --- a/client/tests/kvm/kvm_vm.py >>> +++ b/client/tests/kvm/kvm_vm.py >>> @@ -113,6 +113,13 @@ class VM: >>> Â Â Â Â Â self.qemu_path = qemu_path >>> Â Â Â Â Â self.image_dir = image_dir >>> Â Â Â Â Â self.iso_dir = iso_dir >>> + >>> + Â Â Â Â if params.get("uuid"): >>> + Â Â Â Â Â Â if params.get("uuid") == "random": >>> + Â Â Â Â Â Â Â Â uuid = os.popen("cat >>> /proc/sys/kernel/random/uuid").readline() >>> + Â Â Â Â Â Â Â Â self.uuid = uuid.strip() >>> >> >> instead of os.popen("cat ..."), you can open the file directly: >> >> Â uuid = file('/proc/.../uuid').readline() > > Oooops... I didn't notice this little issue. Will make a quick patch > to change it, thanks Avi! Hmm, turns out we've had sorted this out during the review process of this particular patch. The version that got in reads the file directly :) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
----- "Lucas Meneghel Rodrigues" <lmr@redhat.com> wrote: > On Wed, Jul 29, 2009 at 9:18 AM, Avi Kivity<avi@redhat.com> wrote: > > On 07/16/2009 01:26 PM, Yolkfull Chow wrote: > >> > >> Signed-off-by: Yolkfull Chow<yzhou@redhat.com> > >> --- > >> Â client/tests/kvm/kvm_vm.py | Â 11 +++++++++++ > >> Â 1 files changed, 11 insertions(+), 0 deletions(-) > >> > >> diff --git a/client/tests/kvm/kvm_vm.py > b/client/tests/kvm/kvm_vm.py > >> index 503f636..895049e 100644 > >> --- a/client/tests/kvm/kvm_vm.py > >> +++ b/client/tests/kvm/kvm_vm.py > >> @@ -113,6 +113,13 @@ class VM: > >> Â Â Â Â Â self.qemu_path = qemu_path > >> Â Â Â Â Â self.image_dir = image_dir > >> Â Â Â Â Â self.iso_dir = iso_dir > >> + > >> + Â Â Â Â if params.get("uuid"): > >> + Â Â Â Â Â Â if params.get("uuid") == "random": > >> + Â Â Â Â Â Â Â Â uuid = os.popen("cat > >> /proc/sys/kernel/random/uuid").readline() > >> + Â Â Â Â Â Â Â Â self.uuid = uuid.strip() > >> > > > > instead of os.popen("cat ..."), you can open the file directly: > > > > Â uuid = file('/proc/.../uuid').readline() > > Oooops... I didn't notice this little issue. Will make a quick patch > to change it, thanks Avi! I think I already commented on this and Yolkfull posted a new patch, and that patch is the one that got applied. That's what I see in my local tree anyway. > _______________________________________________ > Autotest mailing list > Autotest@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Jul 29, 2009 at 9:46 AM, Michael Goldish<mgoldish@redhat.com> wrote: > > ----- "Lucas Meneghel Rodrigues" <lmr@redhat.com> wrote: > >> On Wed, Jul 29, 2009 at 9:18 AM, Avi Kivity<avi@redhat.com> wrote: >> > On 07/16/2009 01:26 PM, Yolkfull Chow wrote: >> >> >> >> Signed-off-by: Yolkfull Chow<yzhou@redhat.com> >> >> --- >> >> Â client/tests/kvm/kvm_vm.py | Â 11 +++++++++++ >> >> Â 1 files changed, 11 insertions(+), 0 deletions(-) >> >> >> >> diff --git a/client/tests/kvm/kvm_vm.py >> b/client/tests/kvm/kvm_vm.py >> >> index 503f636..895049e 100644 >> >> --- a/client/tests/kvm/kvm_vm.py >> >> +++ b/client/tests/kvm/kvm_vm.py >> >> @@ -113,6 +113,13 @@ class VM: >> >> Â Â Â Â Â self.qemu_path = qemu_path >> >> Â Â Â Â Â self.image_dir = image_dir >> >> Â Â Â Â Â self.iso_dir = iso_dir >> >> + >> >> + Â Â Â Â if params.get("uuid"): >> >> + Â Â Â Â Â Â if params.get("uuid") == "random": >> >> + Â Â Â Â Â Â Â Â uuid = os.popen("cat >> >> /proc/sys/kernel/random/uuid").readline() >> >> + Â Â Â Â Â Â Â Â self.uuid = uuid.strip() >> >> >> > >> > instead of os.popen("cat ..."), you can open the file directly: >> > >> > Â uuid = file('/proc/.../uuid').readline() >> >> Oooops... I didn't notice this little issue. Will make a quick patch >> to change it, thanks Avi! > > I think I already commented on this and Yolkfull posted a new patch, > and that patch is the one that got applied. Â That's what I see in my > local tree anyway. Yep, I over-reacted :) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/29/2009 03:46 PM, Michael Goldish wrote: > I think I already commented on this and Yolkfull posted a new patch, > and that patch is the one that got applied. That's what I see in my > local tree anyway. > Yeah, I have a long backlog (and don't read all autotest patches anyway). Sorry about the noise.
On Wed, Jul 29, 2009 at 03:18:51PM +0300, Avi Kivity wrote: > On 07/16/2009 01:26 PM, Yolkfull Chow wrote: >> Signed-off-by: Yolkfull Chow<yzhou@redhat.com> >> --- >> client/tests/kvm/kvm_vm.py | 11 +++++++++++ >> 1 files changed, 11 insertions(+), 0 deletions(-) >> >> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py >> index 503f636..895049e 100644 >> --- a/client/tests/kvm/kvm_vm.py >> +++ b/client/tests/kvm/kvm_vm.py >> @@ -113,6 +113,13 @@ class VM: >> self.qemu_path = qemu_path >> self.image_dir = image_dir >> self.iso_dir = iso_dir >> + >> + if params.get("uuid"): >> + if params.get("uuid") == "random": >> + uuid = os.popen("cat /proc/sys/kernel/random/uuid").readline() >> + self.uuid = uuid.strip() >> > > instead of os.popen("cat ..."), you can open the file directly: > > uuid = file('/proc/.../uuid').readline() Yes, Lucas also suggested this method as well. Since the patch has been applied, need I submit a little patch for this? Thanks for suggestion. :-) > > -- > error compiling committee.c: too many arguments to function > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Jul 29, 2009 at 09:06:25PM +0800, Yolkfull Chow wrote: > On Wed, Jul 29, 2009 at 03:18:51PM +0300, Avi Kivity wrote: > > On 07/16/2009 01:26 PM, Yolkfull Chow wrote: > >> Signed-off-by: Yolkfull Chow<yzhou@redhat.com> > >> --- > >> client/tests/kvm/kvm_vm.py | 11 +++++++++++ > >> 1 files changed, 11 insertions(+), 0 deletions(-) > >> > >> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py > >> index 503f636..895049e 100644 > >> --- a/client/tests/kvm/kvm_vm.py > >> +++ b/client/tests/kvm/kvm_vm.py > >> @@ -113,6 +113,13 @@ class VM: > >> self.qemu_path = qemu_path > >> self.image_dir = image_dir > >> self.iso_dir = iso_dir > >> + > >> + if params.get("uuid"): > >> + if params.get("uuid") == "random": > >> + uuid = os.popen("cat /proc/sys/kernel/random/uuid").readline() > >> + self.uuid = uuid.strip() > >> > > > > instead of os.popen("cat ..."), you can open the file directly: > > > > uuid = file('/proc/.../uuid').readline() > > Yes, Lucas also suggested this method as well. Since the patch has been applied, need I submit a > little patch for this? > Thanks for suggestion. :-) Seems the answer emerges. ;-) > > > > > -- > > error compiling committee.c: too many arguments to function > > > > -- > > To unsubscribe from this list: send the line "unsubscribe kvm" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 503f636..895049e 100644 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -113,6 +113,13 @@ class VM: self.qemu_path = qemu_path self.image_dir = image_dir self.iso_dir = iso_dir + + if params.get("uuid"): + if params.get("uuid") == "random": + uuid = os.popen("cat /proc/sys/kernel/random/uuid").readline() + self.uuid = uuid.strip() + else: + self.uuid = params.get("uuid") # Find available monitor filename @@ -374,6 +381,10 @@ class VM: # Make qemu command qemu_command = self.make_qemu_command() + # Specify the system UUID + if self.uuid: + qemu_command += " -uuid %s" % self.uuid + # Is this VM supposed to accept incoming migrations? if for_migration: # Find available migration port
Signed-off-by: Yolkfull Chow <yzhou@redhat.com> --- client/tests/kvm/kvm_vm.py | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)