[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: |
Cleber Rosa |
Subject: |
Re: [PATCH v2 1/7] tests/acceptance: Automatic set -cpu to the test vm |
Date: |
Wed, 21 Apr 2021 16:16:03 -0400 |
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.
> 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):
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
signature.asc
Description: PGP signature
- Re: [PATCH v2 5/7] python/qemu: Add args property to the QEMUMachine class, (continued)
- [PATCH v2 2/7] tests/acceptance: Fix mismatch on cpu tagged tests, Wainer dos Santos Moschetta, 2021/04/08
- [PATCH v2 3/7] tests/acceptance: Let the framework handle "cpu:VALUE" tagged tests, Wainer dos Santos Moschetta, 2021/04/08
- [PATCH v2 7/7] tests/acceptance: Handle cpu tag on x86_cpu_model_versions tests, Wainer dos Santos Moschetta, 2021/04/08
- [PATCH v2 1/7] tests/acceptance: Automatic set -cpu to the test vm, Wainer dos Santos Moschetta, 2021/04/08
- Re: [PATCH v2 0/7] tests/acceptance: Handle tests with "cpu" tag, Cleber Rosa, 2021/04/22