qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/7] tests/acceptance: Automatic set -cpu to the test vm


From: Wainer dos Santos Moschetta
Subject: Re: [PATCH v2 1/7] tests/acceptance: Automatic set -cpu to the test vm
Date: Wed, 28 Apr 2021 14:36:50 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Hi,

On 4/21/21 5:16 PM, Cleber Rosa wrote:
On Thu, Apr 08, 2021 at 04:52:31PM -0300, Wainer dos Santos Moschetta wrote:
This introduces a new feature to the functional tests: automatic setting of
the '-cpu VALUE' option to the created vm if the test is tagged with
'cpu:VALUE'. The 'cpu' property is made available to the test object as well.

For example, for a simple test as:

     def test(self):
         """
         :avocado: tags=cpu:host
         """
         self.assertEqual(self.cpu, "host")
         self.vm.launch()

So I tried a few tests with different CPU models and it works as
expected.  One minor caveat is that using "host" has side effects
in some cases, causing tests to fail because they may also require
KVM to be enabled.

But this is a generic mechanism so I don't think it should be
concerned with that.


Good point. Certainly I will consider this when reviewing new tests.



The resulting QEMU evocation will be like:

     qemu-system-x86_64 -display none -vga none -chardev 
socket,id=mon,path=/var/tmp/avo_qemu_sock_pdgzbgd_/qemu-1135557-monitor.sock 
-mon chardev=mon,mode=control -cpu host
Only thing is: can we please just break this line (I could not ignore
a 174 character line :).

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
---
  docs/devel/testing.rst                    | 17 +++++++++++++++++
  tests/acceptance/avocado_qemu/__init__.py |  5 +++++
  2 files changed, 22 insertions(+)
With the line broken mentioned above (which I can take care of when
queueing this patch):


I will send a v3 to address your review for patch 06, so I can take care of it.



Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>


Thanks for the reviews!

- Wainer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]