[PATCH] tests/avocado: Prefer max cpu type when using AArch64 virt machine

Andrew Jones posted 1 patch 1 year, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220603092505.1450350-1-drjones@redhat.com
Maintainers: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>, Paolo Bonzini <pbonzini@redhat.com>, Cleber Rosa <crosa@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>
tests/avocado/replay_kernel.py     | 2 +-
tests/avocado/reverse_debugging.py | 2 +-
tests/avocado/tcg_plugins.py       | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
[PATCH] tests/avocado: Prefer max cpu type when using AArch64 virt machine
Posted by Andrew Jones 1 year, 11 months ago
The max cpu type is the best default cpu type for tests to use
when specifying the cpu type for AArch64 mach-virt. Switch all
tests to it.

Cc: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 tests/avocado/replay_kernel.py     | 2 +-
 tests/avocado/reverse_debugging.py | 2 +-
 tests/avocado/tcg_plugins.py       | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
index 0b2b0dc692b1..c19022ea977d 100644
--- a/tests/avocado/replay_kernel.py
+++ b/tests/avocado/replay_kernel.py
@@ -147,7 +147,7 @@ def test_aarch64_virt(self):
         """
         :avocado: tags=arch:aarch64
         :avocado: tags=machine:virt
-        :avocado: tags=cpu:cortex-a53
+        :avocado: tags=cpu:max
         """
         kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
                       '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py
index d2921e70c3b4..d6a6d7277235 100644
--- a/tests/avocado/reverse_debugging.py
+++ b/tests/avocado/reverse_debugging.py
@@ -198,7 +198,7 @@ def test_aarch64_virt(self):
         """
         :avocado: tags=arch:aarch64
         :avocado: tags=machine:virt
-        :avocado: tags=cpu:cortex-a53
+        :avocado: tags=cpu:max
         """
         kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
                       '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
diff --git a/tests/avocado/tcg_plugins.py b/tests/avocado/tcg_plugins.py
index 642d2e49e305..2bbf62f5036e 100644
--- a/tests/avocado/tcg_plugins.py
+++ b/tests/avocado/tcg_plugins.py
@@ -68,7 +68,7 @@ def test_aarch64_virt_insn(self):
         :avocado: tags=accel:tcg
         :avocado: tags=arch:aarch64
         :avocado: tags=machine:virt
-        :avocado: tags=cpu:cortex-a53
+        :avocado: tags=cpu:max
         """
         kernel_path = self._grab_aarch64_kernel()
         kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
@@ -94,7 +94,7 @@ def test_aarch64_virt_insn_icount(self):
         :avocado: tags=accel:tcg
         :avocado: tags=arch:aarch64
         :avocado: tags=machine:virt
-        :avocado: tags=cpu:cortex-a53
+        :avocado: tags=cpu:max
         """
         kernel_path = self._grab_aarch64_kernel()
         kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
@@ -120,7 +120,7 @@ def test_aarch64_virt_mem_icount(self):
         :avocado: tags=accel:tcg
         :avocado: tags=arch:aarch64
         :avocado: tags=machine:virt
-        :avocado: tags=cpu:cortex-a53
+        :avocado: tags=cpu:max
         """
         kernel_path = self._grab_aarch64_kernel()
         kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
-- 
2.34.3


Re: [PATCH] tests/avocado: Prefer max cpu type when using AArch64 virt machine
Posted by Richard Henderson 1 year, 11 months ago
On 6/3/22 02:25, Andrew Jones wrote:
> The max cpu type is the best default cpu type for tests to use
> when specifying the cpu type for AArch64 mach-virt. Switch all
> tests to it.

This won't work without further changes.

> @@ -147,7 +147,7 @@ def test_aarch64_virt(self):
>           """
>           :avocado: tags=arch:aarch64
>           :avocado: tags=machine:virt
> -        :avocado: tags=cpu:cortex-a53
> +        :avocado: tags=cpu:max
>           """
>           kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
>                         '/linux/releases/29/Everything/aarch64/os/images/pxeboot'

For a release this old, we'll see the kernel bugs wrt FEAT_LPA/FEAT_LPA2.
See 11593544df6f ("tests/avocado: update aarch64_virt test to exercise -cpu max")


r~
Re: [PATCH] tests/avocado: Prefer max cpu type when using AArch64 virt machine
Posted by Andrew Jones 1 year, 11 months ago
On Fri, Jun 03, 2022 at 06:56:41AM -0700, Richard Henderson wrote:
> On 6/3/22 02:25, Andrew Jones wrote:
> > The max cpu type is the best default cpu type for tests to use
> > when specifying the cpu type for AArch64 mach-virt. Switch all
> > tests to it.
> 
> This won't work without further changes.
> 
> > @@ -147,7 +147,7 @@ def test_aarch64_virt(self):
> >           """
> >           :avocado: tags=arch:aarch64
> >           :avocado: tags=machine:virt
> > -        :avocado: tags=cpu:cortex-a53
> > +        :avocado: tags=cpu:max
> >           """
> >           kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
> >                         '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
> 
> For a release this old, we'll see the kernel bugs wrt FEAT_LPA/FEAT_LPA2.
> See 11593544df6f ("tests/avocado: update aarch64_virt test to exercise -cpu max")

Thanks Richard. How about for each test with guest kernels which don't
work, I add a comment about LPA2 and use '-cpu max,lpa2=off' instead?

drew
Re: [PATCH] tests/avocado: Prefer max cpu type when using AArch64 virt machine
Posted by Richard Henderson 1 year, 11 months ago
On 6/3/22 08:05, Andrew Jones wrote:
> On Fri, Jun 03, 2022 at 06:56:41AM -0700, Richard Henderson wrote:
>> On 6/3/22 02:25, Andrew Jones wrote:
>>> The max cpu type is the best default cpu type for tests to use
>>> when specifying the cpu type for AArch64 mach-virt. Switch all
>>> tests to it.
>>
>> This won't work without further changes.
>>
>>> @@ -147,7 +147,7 @@ def test_aarch64_virt(self):
>>>            """
>>>            :avocado: tags=arch:aarch64
>>>            :avocado: tags=machine:virt
>>> -        :avocado: tags=cpu:cortex-a53
>>> +        :avocado: tags=cpu:max
>>>            """
>>>            kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
>>>                          '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
>>
>> For a release this old, we'll see the kernel bugs wrt FEAT_LPA/FEAT_LPA2.
>> See 11593544df6f ("tests/avocado: update aarch64_virt test to exercise -cpu max")
> 
> Thanks Richard. How about for each test with guest kernels which don't
> work, I add a comment about LPA2 and use '-cpu max,lpa2=off' instead?

I would prefer to test new kernels with max, where we might actually test the newer 
features.  Perhaps keep one older kernel test around, to make sure we don't regress, but 
don't pretend that it can test more than what it was built for.


r~
Re: [PATCH] tests/avocado: Prefer max cpu type when using AArch64 virt machine
Posted by Cornelia Huck 1 year, 11 months ago
On Fri, Jun 03 2022, Andrew Jones <drjones@redhat.com> wrote:

> The max cpu type is the best default cpu type for tests to use
> when specifying the cpu type for AArch64 mach-virt. Switch all
> tests to it.
>
> Cc: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  tests/avocado/replay_kernel.py     | 2 +-
>  tests/avocado/reverse_debugging.py | 2 +-
>  tests/avocado/tcg_plugins.py       | 6 +++---
>  3 files changed, 5 insertions(+), 5 deletions(-)

Is there anything in the boot_xen tests that requires cortex-a57, or
should they be switched to max as well?
Re: [PATCH] tests/avocado: Prefer max cpu type when using AArch64 virt machine
Posted by Andrew Jones 1 year, 11 months ago
On Fri, Jun 03, 2022 at 12:07:13PM +0200, Cornelia Huck wrote:
> On Fri, Jun 03 2022, Andrew Jones <drjones@redhat.com> wrote:
> 
> > The max cpu type is the best default cpu type for tests to use
> > when specifying the cpu type for AArch64 mach-virt. Switch all
> > tests to it.
> >
> > Cc: Alex Bennée <alex.bennee@linaro.org>
> > Signed-off-by: Andrew Jones <drjones@redhat.com>
> > ---
> >  tests/avocado/replay_kernel.py     | 2 +-
> >  tests/avocado/reverse_debugging.py | 2 +-
> >  tests/avocado/tcg_plugins.py       | 6 +++---
> >  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> Is there anything in the boot_xen tests that requires cortex-a57, or
> should they be switched to max as well?
>

You're right. I was ignoring xen tests for no good reason. They're
simply using TCG mach-virt with a "default" cpu type too.

I'll spin a v2 that changes everything in tests/ which uses mach-
virt and appears to be want a default cpu type.

Thanks,
drew
Re: [PATCH] tests/avocado: Prefer max cpu type when using AArch64 virt machine
Posted by Andrew Jones 1 year, 11 months ago
On Fri, Jun 03, 2022 at 11:25:05AM +0200, Andrew Jones wrote:
> The max cpu type is the best default cpu type for tests to use
> when specifying the cpu type for AArch64 mach-virt. Switch all
> tests to it.

Hmm, looking at tests in tests/qtest and tests/vm I see cortex-a57
is still used for a default choice. I should probably post another
patch changing those to max as well.

Thanks,
drew

> 
> Cc: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  tests/avocado/replay_kernel.py     | 2 +-
>  tests/avocado/reverse_debugging.py | 2 +-
>  tests/avocado/tcg_plugins.py       | 6 +++---
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
> index 0b2b0dc692b1..c19022ea977d 100644
> --- a/tests/avocado/replay_kernel.py
> +++ b/tests/avocado/replay_kernel.py
> @@ -147,7 +147,7 @@ def test_aarch64_virt(self):
>          """
>          :avocado: tags=arch:aarch64
>          :avocado: tags=machine:virt
> -        :avocado: tags=cpu:cortex-a53
> +        :avocado: tags=cpu:max
>          """
>          kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
>                        '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
> diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py
> index d2921e70c3b4..d6a6d7277235 100644
> --- a/tests/avocado/reverse_debugging.py
> +++ b/tests/avocado/reverse_debugging.py
> @@ -198,7 +198,7 @@ def test_aarch64_virt(self):
>          """
>          :avocado: tags=arch:aarch64
>          :avocado: tags=machine:virt
> -        :avocado: tags=cpu:cortex-a53
> +        :avocado: tags=cpu:max
>          """
>          kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
>                        '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
> diff --git a/tests/avocado/tcg_plugins.py b/tests/avocado/tcg_plugins.py
> index 642d2e49e305..2bbf62f5036e 100644
> --- a/tests/avocado/tcg_plugins.py
> +++ b/tests/avocado/tcg_plugins.py
> @@ -68,7 +68,7 @@ def test_aarch64_virt_insn(self):
>          :avocado: tags=accel:tcg
>          :avocado: tags=arch:aarch64
>          :avocado: tags=machine:virt
> -        :avocado: tags=cpu:cortex-a53
> +        :avocado: tags=cpu:max
>          """
>          kernel_path = self._grab_aarch64_kernel()
>          kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> @@ -94,7 +94,7 @@ def test_aarch64_virt_insn_icount(self):
>          :avocado: tags=accel:tcg
>          :avocado: tags=arch:aarch64
>          :avocado: tags=machine:virt
> -        :avocado: tags=cpu:cortex-a53
> +        :avocado: tags=cpu:max
>          """
>          kernel_path = self._grab_aarch64_kernel()
>          kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> @@ -120,7 +120,7 @@ def test_aarch64_virt_mem_icount(self):
>          :avocado: tags=accel:tcg
>          :avocado: tags=arch:aarch64
>          :avocado: tags=machine:virt
> -        :avocado: tags=cpu:cortex-a53
> +        :avocado: tags=cpu:max
>          """
>          kernel_path = self._grab_aarch64_kernel()
>          kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> -- 
> 2.34.3
>