public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM test: Subtest unittest: append extra_params to qemu cmdline
@ 2010-08-02 17:29 Lucas Meneghel Rodrigues
  2010-08-03 11:25 ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Meneghel Rodrigues @ 2010-08-02 17:29 UTC (permalink / raw)
  To: autotest; +Cc: kvm, avi, Lucas Meneghel Rodrigues

The extra_param config option on qemu-kvm's unittest config
file wasn't being honored due to a silly mistake on the latest
version of the unittest patchset (forgot to add the extra_params
to the params dictionary). This patch fixes the problem.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 client/tests/kvm/tests/unittest.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/client/tests/kvm/tests/unittest.py b/client/tests/kvm/tests/unittest.py
index 8be1f27..ad95720 100644
--- a/client/tests/kvm/tests/unittest.py
+++ b/client/tests/kvm/tests/unittest.py
@@ -75,6 +75,7 @@ def run_unittest(test, params, env):
         extra_params = None
         if parser.has_option(t, 'extra_params'):
             extra_params = parser.get(t, 'extra_params')
+            params['extra_params'] += ' %s' % extra_params
 
         vm_name = params.get("main_vm")
         params['kernel'] = os.path.join(unittest_dir, file)
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM test: Subtest unittest: append extra_params to qemu cmdline
  2010-08-02 17:29 [PATCH] KVM test: Subtest unittest: append extra_params to qemu cmdline Lucas Meneghel Rodrigues
@ 2010-08-03 11:25 ` Avi Kivity
  2010-08-03 11:35   ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2010-08-03 11:25 UTC (permalink / raw)
  To: Lucas Meneghel Rodrigues; +Cc: autotest, kvm

  On 08/02/2010 08:29 PM, Lucas Meneghel Rodrigues wrote:
> The extra_param config option on qemu-kvm's unittest config
> file wasn't being honored due to a silly mistake on the latest
> version of the unittest patchset (forgot to add the extra_params
> to the params dictionary). This patch fixes the problem.
>
> Signed-off-by: Lucas Meneghel Rodrigues<lmr@redhat.com>
> ---
>   client/tests/kvm/tests/unittest.py |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/client/tests/kvm/tests/unittest.py b/client/tests/kvm/tests/unittest.py
> index 8be1f27..ad95720 100644
> --- a/client/tests/kvm/tests/unittest.py
> +++ b/client/tests/kvm/tests/unittest.py
> @@ -75,6 +75,7 @@ def run_unittest(test, params, env):
>           extra_params = None
>           if parser.has_option(t, 'extra_params'):
>               extra_params = parser.get(t, 'extra_params')
> +            params['extra_params'] += ' %s' % extra_params

Not quite:


08/03 13:57:04 DEBUG|    kvm_vm:0637| Running qemu command:
/root/autotest/client/tests/kvm/qemu -name 'vm1' -monitor 
unix:'/tmp/monitor-humanmonitor1-20100803-135522-SqL2',server,nowait 
-serial unix:'/tmp/serial-20100803-135522-SqL2',server,nowait -m 512 
-kernel '/root/autotest/client/tests/kvm/unittests/svm.flat' -vnc :0 
-chardev file,id=testlog,path=/tmp/testlog-20100803-135522-SqL2 -device 
testdev,chardev=testlog  -S -cpu qemu64,-svm -cpu qemu64,+x2apic 
-enable-nesting -cpu qemu64,+svm


Looks the += is a little excessive.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM test: Subtest unittest: append extra_params to qemu cmdline
  2010-08-03 11:25 ` Avi Kivity
@ 2010-08-03 11:35   ` Avi Kivity
  0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2010-08-03 11:35 UTC (permalink / raw)
  To: Lucas Meneghel Rodrigues; +Cc: autotest, kvm

  On 08/03/2010 02:25 PM, Avi Kivity wrote:
>  On 08/02/2010 08:29 PM, Lucas Meneghel Rodrigues wrote:
>> The extra_param config option on qemu-kvm's unittest config
>> file wasn't being honored due to a silly mistake on the latest
>> version of the unittest patchset (forgot to add the extra_params
>> to the params dictionary). This patch fixes the problem.
>>
>> Signed-off-by: Lucas Meneghel Rodrigues<lmr@redhat.com>
>> ---
>>   client/tests/kvm/tests/unittest.py |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/client/tests/kvm/tests/unittest.py 
>> b/client/tests/kvm/tests/unittest.py
>> index 8be1f27..ad95720 100644
>> --- a/client/tests/kvm/tests/unittest.py
>> +++ b/client/tests/kvm/tests/unittest.py
>> @@ -75,6 +75,7 @@ def run_unittest(test, params, env):
>>           extra_params = None
>>           if parser.has_option(t, 'extra_params'):
>>               extra_params = parser.get(t, 'extra_params')
>> +            params['extra_params'] += ' %s' % extra_params
>
> Not quite:
>
>
> 08/03 13:57:04 DEBUG|    kvm_vm:0637| Running qemu command:
> /root/autotest/client/tests/kvm/qemu -name 'vm1' -monitor 
> unix:'/tmp/monitor-humanmonitor1-20100803-135522-SqL2',server,nowait 
> -serial unix:'/tmp/serial-20100803-135522-SqL2',server,nowait -m 512 
> -kernel '/root/autotest/client/tests/kvm/unittests/svm.flat' -vnc :0 
> -chardev file,id=testlog,path=/tmp/testlog-20100803-135522-SqL2 
> -device testdev,chardev=testlog  -S -cpu qemu64,-svm -cpu 
> qemu64,+x2apic -enable-nesting -cpu qemu64,+svm
>
>
> Looks the += is a little excessive.
>

It also leaks to other tests, screwing them up.  So I think you might 
need to keep the += (so you inherit global settings) but undo it after 
the unit test completes.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-03 11:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-02 17:29 [PATCH] KVM test: Subtest unittest: append extra_params to qemu cmdline Lucas Meneghel Rodrigues
2010-08-03 11:25 ` Avi Kivity
2010-08-03 11:35   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox