[PATCH 20/20] tests/functional/sbsa-ref: Move where machine type is set

Philippe Mathieu-Daudé posted 20 patches 4 months, 4 weeks ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>, Radoslaw Biernacki <rad@semihalf.com>, Peter Maydell <peter.maydell@linaro.org>, Leif Lindholm <leif.lindholm@oss.qualcomm.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Alexander Graf <agraf@csgraf.de>
There is a newer version of this series
[PATCH 20/20] tests/functional/sbsa-ref: Move where machine type is set
Posted by Philippe Mathieu-Daudé 4 months, 4 weeks ago
fetch_firmware() is only about fetching firmware.
Set the machine type in test_sbsaref_edk2_firmware().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 tests/functional/test_aarch64_sbsaref.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/functional/test_aarch64_sbsaref.py b/tests/functional/test_aarch64_sbsaref.py
index e6a55aecfac..5536ec622e6 100755
--- a/tests/functional/test_aarch64_sbsaref.py
+++ b/tests/functional/test_aarch64_sbsaref.py
@@ -40,7 +40,6 @@ def fetch_firmware(test):
         with open(path, "ab+") as fd:
             fd.truncate(256 << 20)  # Expand volumes to 256MiB
 
-    test.set_machine('sbsa-ref')
     test.vm.set_console()
     test.vm.add_args(
         "-drive", f"if=pflash,file={fs0_path},format=raw",
@@ -70,6 +69,7 @@ def test_sbsaref_edk2_firmware(self):
 
         fetch_firmware(self)
 
+        self.set_machine('sbsa-ref')
         self.vm.add_args('-cpu', 'cortex-a57')
         self.vm.launch()
 
-- 
2.49.0


Re: [PATCH 20/20] tests/functional/sbsa-ref: Move where machine type is set
Posted by Philippe Mathieu-Daudé 4 months, 4 weeks ago
On Thu, 19 Jun 2025 at 15:15, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> fetch_firmware() is only about fetching firmware.
> Set the machine type in test_sbsaref_edk2_firmware().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  tests/functional/test_aarch64_sbsaref.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/functional/test_aarch64_sbsaref.py b/tests/functional/test_aarch64_sbsaref.py
> index e6a55aecfac..5536ec622e6 100755
> --- a/tests/functional/test_aarch64_sbsaref.py
> +++ b/tests/functional/test_aarch64_sbsaref.py
> @@ -40,7 +40,6 @@ def fetch_firmware(test):
>          with open(path, "ab+") as fd:
>              fd.truncate(256 << 20)  # Expand volumes to 256MiB
>
> -    test.set_machine('sbsa-ref')
>      test.vm.set_console()
>      test.vm.add_args(
>          "-drive", f"if=pflash,file={fs0_path},format=raw",
> @@ -70,6 +69,7 @@ def test_sbsaref_edk2_firmware(self):
>
>          fetch_firmware(self)
>
> +        self.set_machine('sbsa-ref')
>          self.vm.add_args('-cpu', 'cortex-a57')
>          self.vm.launch()

Sorry, last patch, I forgot to squash:

-- >8 --
diff --git a/tests/functional/test_aarch64_sbsaref_alpine.py
b/tests/functional/test_aarch64_sbsaref_alpine.py
index 6108ec65a54..98762eedb67 100755
--- a/tests/functional/test_aarch64_sbsaref_alpine.py
+++ b/tests/functional/test_aarch64_sbsaref_alpine.py
@@ -32,2 +32,3 @@ def boot_alpine_linux(self, cpu=None):

+        self.set_machine('sbsa-ref')
         self.vm.set_console()
diff --git a/tests/functional/test_aarch64_sbsaref_freebsd.py
b/tests/functional/test_aarch64_sbsaref_freebsd.py
index 26dfc5878bb..1c243d0d459 100755
--- a/tests/functional/test_aarch64_sbsaref_freebsd.py
+++ b/tests/functional/test_aarch64_sbsaref_freebsd.py
@@ -32,2 +32,3 @@ def boot_freebsd14(self, cpu=None):

+        self.set_machine('sbsa-ref')
         self.vm.set_console()
---
Re: [PATCH 20/20] tests/functional/sbsa-ref: Move where machine type is set
Posted by Leif Lindholm 4 months, 4 weeks ago
On Thu, 19 Jun 2025 at 14:23, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On Thu, 19 Jun 2025 at 15:15, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> >
> > fetch_firmware() is only about fetching firmware.
> > Set the machine type in test_sbsaref_edk2_firmware().
> >
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > ---
> >  tests/functional/test_aarch64_sbsaref.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tests/functional/test_aarch64_sbsaref.py b/tests/functional/test_aarch64_sbsaref.py
> > index e6a55aecfac..5536ec622e6 100755
> > --- a/tests/functional/test_aarch64_sbsaref.py
> > +++ b/tests/functional/test_aarch64_sbsaref.py
> > @@ -40,7 +40,6 @@ def fetch_firmware(test):
> >          with open(path, "ab+") as fd:
> >              fd.truncate(256 << 20)  # Expand volumes to 256MiB
> >
> > -    test.set_machine('sbsa-ref')
> >      test.vm.set_console()
> >      test.vm.add_args(
> >          "-drive", f"if=pflash,file={fs0_path},format=raw",
> > @@ -70,6 +69,7 @@ def test_sbsaref_edk2_firmware(self):
> >
> >          fetch_firmware(self)
> >
> > +        self.set_machine('sbsa-ref')
> >          self.vm.add_args('-cpu', 'cortex-a57')
> >          self.vm.launch()
>
> Sorry, last patch, I forgot to squash:

With the squash:
Reviewed-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>

/
    Leif
> -- >8 --
> diff --git a/tests/functional/test_aarch64_sbsaref_alpine.py
> b/tests/functional/test_aarch64_sbsaref_alpine.py
> index 6108ec65a54..98762eedb67 100755
> --- a/tests/functional/test_aarch64_sbsaref_alpine.py
> +++ b/tests/functional/test_aarch64_sbsaref_alpine.py
> @@ -32,2 +32,3 @@ def boot_alpine_linux(self, cpu=None):
>
> +        self.set_machine('sbsa-ref')
>          self.vm.set_console()
> diff --git a/tests/functional/test_aarch64_sbsaref_freebsd.py
> b/tests/functional/test_aarch64_sbsaref_freebsd.py
> index 26dfc5878bb..1c243d0d459 100755
> --- a/tests/functional/test_aarch64_sbsaref_freebsd.py
> +++ b/tests/functional/test_aarch64_sbsaref_freebsd.py
> @@ -32,2 +32,3 @@ def boot_freebsd14(self, cpu=None):
>
> +        self.set_machine('sbsa-ref')
>          self.vm.set_console()
> ---