diff mbox series

[1/1] tests/avocado: sbsa-ref: switch from OpenBSD to FreeBSD

Message ID 20240523183928.37809-1-marcin.juszkiewicz@linaro.org
State New
Headers show
Series [1/1] tests/avocado: sbsa-ref: switch from OpenBSD to FreeBSD | expand

Commit Message

Marcin Juszkiewicz May 23, 2024, 6:39 p.m. UTC
FreeBSD has longer support cycle for stable release (14.x EoL in 2028)
than OpenBSD (7.3 we used is already EoL). Also bugfixes are backported
so we can stay on 14.x for longer.

Planned to upgrade to newer OpenBSD but we would have to wait for 7.6
release to get Neoverse-V1/N2 support.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 tests/avocado/machine_aarch64_sbsaref.py | 65 ++++++++++++++++--------
 1 file changed, 43 insertions(+), 22 deletions(-)

Comments

Philippe Mathieu-Daudé May 27, 2024, 9:53 a.m. UTC | #1
On 23/5/24 20:39, Marcin Juszkiewicz wrote:
> FreeBSD has longer support cycle for stable release (14.x EoL in 2028)
> than OpenBSD (7.3 we used is already EoL). Also bugfixes are backported
> so we can stay on 14.x for longer.
> 
> Planned to upgrade to newer OpenBSD but we would have to wait for 7.6
> release to get Neoverse-V1/N2 support.
> 
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
>   tests/avocado/machine_aarch64_sbsaref.py | 65 ++++++++++++++++--------
>   1 file changed, 43 insertions(+), 22 deletions(-)
> 
> diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py
> index 98c76c1ff7..c3c7c0e639 100644
> --- a/tests/avocado/machine_aarch64_sbsaref.py
> +++ b/tests/avocado/machine_aarch64_sbsaref.py
> @@ -1,4 +1,4 @@
> -# Functional test that boots a Linux kernel and checks the console
> +# Functional test that boots a kernel and checks the console
>   #
>   # SPDX-FileCopyrightText: 2023-2024 Linaro Ltd.
>   # SPDX-FileContributor: Philippe Mathieu-Daudé <philmd@linaro.org>
> @@ -177,14 +177,14 @@ def test_sbsaref_alpine_linux_max(self):
>       # This tests the whole boot chain from EFI to Userspace
>       # We only boot a whole OS for the current top level CPU and GIC
>       # Other test profiles should use more minimal boots
> -    def boot_openbsd73(self, cpu):
> +    def boot_freebsd14(self, cpu):
>           self.fetch_firmware()
>   
>           img_url = (
> -            "https://cdn.openbsd.org/pub/OpenBSD/7.3/arm64/miniroot73.img"
> +            "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-arm64-aarch64-bootonly.iso"
>           )
>   
> -        img_hash = "7fc2c75401d6f01fbfa25f4953f72ad7d7c18650056d30755c44b9c129b707e5"
> +        img_hash = "2f3ceb0ef6b1de53553abb9979a6d65f51b006dbfa985798b282812ecb758c1b"
>           img_path = self.fetch_asset(img_url, algorithm="sha256", asset_hash=img_hash)
>   
>           self.vm.set_console()
> @@ -196,43 +196,64 @@ def boot_openbsd73(self, cpu):
>           )
>   
>           self.vm.launch()
> -        wait_for_console_pattern(self,
> -                                 "Welcome to the OpenBSD/arm64"
> -                                 " 7.3 installation program.")
> +        wait_for_console_pattern(self, "Welcome to FreeBSD!")
>   
> -    def test_sbsaref_openbsd73_cortex_a57(self):
> +    def test_sbsaref_freebsd14_cortex_a57(self):
>           """
>           :avocado: tags=cpu:cortex-a57
> -        :avocado: tags=os:openbsd
> +        :avocado: tags=os:freebsd
>           """
> -        self.boot_openbsd73("cortex-a57")
> +        self.boot_freebsd14("cortex-a57")
>   
> -    def test_sbsaref_openbsd73_neoverse_n1(self):
> +    def test_sbsaref_freebsd14_neoverse_n1(self):
>           """
>           :avocado: tags=cpu:neoverse-n1
> -        :avocado: tags=os:openbsd
> +        :avocado: tags=os:freebsd
>           """
> -        self.boot_openbsd73("neoverse-n1")
> +        self.boot_freebsd14("neoverse-n1")
>   
> -    def test_sbsaref_openbsd73_max_pauth_off(self):
> +    def test_sbsaref_freebsd14_neoverse_n2_pauth_off(self):
> +        """
> +        :avocado: tags=cpu:neoverse-n2
> +        :avocado: tags=os:freebsd
> +        """
> +        self.boot_freebsd14("neoverse-n2,pauth=off")
> +
> +    @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')

Nitpicking, maybe 'Test might timeout due to PAuth'? (few occurrences).

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> +    def test_sbsaref_freebsd14_neoverse_n2_pauth_impdef(self):
> +        """
> +        :avocado: tags=cpu:neoverse-n2
> +        :avocado: tags=os:freebsd
> +        """
> +        self.boot_freebsd14("neoverse-n2,pauth-impdef=on")
> +
> +    @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
> +    def test_sbsaref_freebsd14_neoverse_n2(self):
> +        """
> +        :avocado: tags=cpu:neoverse-n2
> +        :avocado: tags=os:freebsd
> +        """
> +        self.boot_freebsd14("neoverse-n2")
> +
> +    def test_sbsaref_freebsd14_max_pauth_off(self):
>           """
>           :avocado: tags=cpu:max
> -        :avocado: tags=os:openbsd
> +        :avocado: tags=os:freebsd
>           """
> -        self.boot_openbsd73("max,pauth=off")
> +        self.boot_freebsd14("max,pauth=off")
>   
>       @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
> -    def test_sbsaref_openbsd73_max_pauth_impdef(self):
> +    def test_sbsaref_freebsd14_max_pauth_impdef(self):
>           """
>           :avocado: tags=cpu:max
> -        :avocado: tags=os:openbsd
> +        :avocado: tags=os:freebsd
>           """
> -        self.boot_openbsd73("max,pauth-impdef=on")
> +        self.boot_freebsd14("max,pauth-impdef=on")
>   
>       @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
> -    def test_sbsaref_openbsd73_max(self):
> +    def test_sbsaref_freebsd14_max(self):
>           """
>           :avocado: tags=cpu:max
> -        :avocado: tags=os:openbsd
> +        :avocado: tags=os:freebsd
>           """
> -        self.boot_openbsd73("max")
> +        self.boot_freebsd14("max")
Peter Maydell May 30, 2024, 12:22 p.m. UTC | #2
On Mon, 27 May 2024 at 10:53, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 23/5/24 20:39, Marcin Juszkiewicz wrote:
> > FreeBSD has longer support cycle for stable release (14.x EoL in 2028)
> > than OpenBSD (7.3 we used is already EoL). Also bugfixes are backported
> > so we can stay on 14.x for longer.
> >
> > Planned to upgrade to newer OpenBSD but we would have to wait for 7.6
> > release to get Neoverse-V1/N2 support.
> >
> > Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

> > +    @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
>
> Nitpicking, maybe 'Test might timeout due to PAuth'? (few occurrences).

Yes, can we have specific reasons for why we're skipping tests,
with also a comment giving a link to the relevant gitlab issue
about them, please?

PAuth shouldn't cause a test to time out -- it might be slower
than without-pauth and mean we need to give that test a longer
timeout value and not run it by default, but it shouldn't result
in the test hanging indefinitely.

thanks
-- PMM
diff mbox series

Patch

diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py
index 98c76c1ff7..c3c7c0e639 100644
--- a/tests/avocado/machine_aarch64_sbsaref.py
+++ b/tests/avocado/machine_aarch64_sbsaref.py
@@ -1,4 +1,4 @@ 
-# Functional test that boots a Linux kernel and checks the console
+# Functional test that boots a kernel and checks the console
 #
 # SPDX-FileCopyrightText: 2023-2024 Linaro Ltd.
 # SPDX-FileContributor: Philippe Mathieu-Daudé <philmd@linaro.org>
@@ -177,14 +177,14 @@  def test_sbsaref_alpine_linux_max(self):
     # This tests the whole boot chain from EFI to Userspace
     # We only boot a whole OS for the current top level CPU and GIC
     # Other test profiles should use more minimal boots
-    def boot_openbsd73(self, cpu):
+    def boot_freebsd14(self, cpu):
         self.fetch_firmware()
 
         img_url = (
-            "https://cdn.openbsd.org/pub/OpenBSD/7.3/arm64/miniroot73.img"
+            "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-arm64-aarch64-bootonly.iso"
         )
 
-        img_hash = "7fc2c75401d6f01fbfa25f4953f72ad7d7c18650056d30755c44b9c129b707e5"
+        img_hash = "2f3ceb0ef6b1de53553abb9979a6d65f51b006dbfa985798b282812ecb758c1b"
         img_path = self.fetch_asset(img_url, algorithm="sha256", asset_hash=img_hash)
 
         self.vm.set_console()
@@ -196,43 +196,64 @@  def boot_openbsd73(self, cpu):
         )
 
         self.vm.launch()
-        wait_for_console_pattern(self,
-                                 "Welcome to the OpenBSD/arm64"
-                                 " 7.3 installation program.")
+        wait_for_console_pattern(self, "Welcome to FreeBSD!")
 
-    def test_sbsaref_openbsd73_cortex_a57(self):
+    def test_sbsaref_freebsd14_cortex_a57(self):
         """
         :avocado: tags=cpu:cortex-a57
-        :avocado: tags=os:openbsd
+        :avocado: tags=os:freebsd
         """
-        self.boot_openbsd73("cortex-a57")
+        self.boot_freebsd14("cortex-a57")
 
-    def test_sbsaref_openbsd73_neoverse_n1(self):
+    def test_sbsaref_freebsd14_neoverse_n1(self):
         """
         :avocado: tags=cpu:neoverse-n1
-        :avocado: tags=os:openbsd
+        :avocado: tags=os:freebsd
         """
-        self.boot_openbsd73("neoverse-n1")
+        self.boot_freebsd14("neoverse-n1")
 
-    def test_sbsaref_openbsd73_max_pauth_off(self):
+    def test_sbsaref_freebsd14_neoverse_n2_pauth_off(self):
+        """
+        :avocado: tags=cpu:neoverse-n2
+        :avocado: tags=os:freebsd
+        """
+        self.boot_freebsd14("neoverse-n2,pauth=off")
+
+    @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
+    def test_sbsaref_freebsd14_neoverse_n2_pauth_impdef(self):
+        """
+        :avocado: tags=cpu:neoverse-n2
+        :avocado: tags=os:freebsd
+        """
+        self.boot_freebsd14("neoverse-n2,pauth-impdef=on")
+
+    @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
+    def test_sbsaref_freebsd14_neoverse_n2(self):
+        """
+        :avocado: tags=cpu:neoverse-n2
+        :avocado: tags=os:freebsd
+        """
+        self.boot_freebsd14("neoverse-n2")
+
+    def test_sbsaref_freebsd14_max_pauth_off(self):
         """
         :avocado: tags=cpu:max
-        :avocado: tags=os:openbsd
+        :avocado: tags=os:freebsd
         """
-        self.boot_openbsd73("max,pauth=off")
+        self.boot_freebsd14("max,pauth=off")
 
     @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
-    def test_sbsaref_openbsd73_max_pauth_impdef(self):
+    def test_sbsaref_freebsd14_max_pauth_impdef(self):
         """
         :avocado: tags=cpu:max
-        :avocado: tags=os:openbsd
+        :avocado: tags=os:freebsd
         """
-        self.boot_openbsd73("max,pauth-impdef=on")
+        self.boot_freebsd14("max,pauth-impdef=on")
 
     @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
-    def test_sbsaref_openbsd73_max(self):
+    def test_sbsaref_freebsd14_max(self):
         """
         :avocado: tags=cpu:max
-        :avocado: tags=os:openbsd
+        :avocado: tags=os:freebsd
         """
-        self.boot_openbsd73("max")
+        self.boot_freebsd14("max")