Skip to contentSkip to conversation

KVM-test: control: Fix of spliting augments

PATCH Applied Amos Kong 3 participants 4 messages May 25, 2011 1 message not in the archive KVM

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Amos Kong

author
#1 lore raw

PATCH 1/2 KVM-test: control: Fix of spliting augments

../../bin/autotest control --args='only=boot kernel_cmdline="root=/dev/vda ro quite" only=qcow2'

original result:
only boot
kernel_cmdline="root = /dev/vda ro quite"
only qcow2'

new result:
only boot
kernel_cmdline="root=/dev/vda ro quite"
only qcow2'

---
 client/tests/kvm/control |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/control +1 -1
index c887a3e..959d2bc 100644
@@ -55,7 +55,7 @@ if args:
     # We get test parameters from command line
     for arg in args:
         try:
-            (key, value) = re.findall("(.*)=(.*)", arg)[0]
+            (key, value) = re.findall("^(\w+)=(.*)", arg)[0]
             if key == "only":
                 str += "only %s\n" % value
             elif key == "no":
author
#2 lore raw

PATCH 2/2 KVM-test: kvm_vm.py: Add quotation marks for appended arguments

In reply to a message not in the archive

Appended kernel cmdline should be involved by quotation marks. -append 'root=/dev/vda ro ..'

---
 client/virt/kvm_vm.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
client/virt/kvm_vm.py +1 -1
index c9bb273..343488f 100644
@@ -332,7 +332,7 @@ class VM(virt_vm.BaseVM):
             return " -initrd '%s'" % filename
 
         def add_kernel_cmdline(help, cmdline):
-            return " -append %s" % cmdline
+            return " -append '%s'" % cmdline
 
         def add_testdev(help, filename):
             return (" -chardev file,id=testlog,path=%s"
#3 lore raw

Re: [PATCH 2/2] KVM-test: kvm_vm.py: Add quotation marks for appended arguments

Amos, thanks for fixing it!

#4 lore raw

Re: [PATCH 2/2] KVM-test: kvm_vm.py: Add quotation marks for appended arguments

In reply to Amos Kong
Quoted 2 lines · Amos Kong

Appended kernel cmdline should be involved by quotation marks. -append 'root=/dev/vda ro ..'

Applied, thanks!

Quoted 25 lines

---
 client/virt/kvm_vm.py |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
client/virt/kvm_vm.py +0 -0
index c9bb273..343488f 100644
@@ -332,7 +332,7 @@ class VM(virt_vm.BaseVM):

            return " -initrd '%s'" % filename

        def add_kernel_cmdline(help, cmdline):
-            return " -append %s" % cmdline
+            return " -append '%s'" % cmdline

        def add_testdev(help, filename):
            return (" -chardev file,id=testlog,path=%s"

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Signature · 1 line
Lucas