On 30/8/24 15:38, Thomas Huth wrote:
From: Philippe Mathieu-Daudé <phi...@linaro.org>

Straight forward conversion. Since SBSA_FLASH files are not
tarballs, use lzma_uncompress() method.

Avocado used to set a timeout of 11 tests * 180s = 1980s.
Hopefully 600s should be sufficient.

Running on macOS Sonoma / Apple silicon M1:

   $ QEMU_TEST_TIMEOUT_EXPECTED=1 make check-functional-aarch64 V=1
   ▶ 1/5 
test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_alpine_linux_max        
      OK
   ▶ 1/5 
test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_alpine_linux_max_pauth_impdef
 OK
   ▶ 1/5 
test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_alpine_linux_max_pauth_off
    OK
   ▶ 1/5 
test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_alpine_linux_neoverse_n1
      OK
   ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_edk2_firmware  
               OK
   ▶ 1/5 
test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_cortex_a57    
      OK
   ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_max  
               OK
   ▶ 1/5 
test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_max_pauth_impdef
    OK
   ▶ 1/5 
test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_max_pauth_off 
      OK
   ▶ 1/5 
test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_neoverse_n1   
      OK
   1/5 qemu:func-thorough+func-aarch64-thorough+thorough / 
func-aarch64-aarch64_sbsaref        OK   241.79s  11 subtests passed
   ...

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Reviewed-by: Thomas Huth <th...@redhat.com>
Reviewed-by: Marcin Juszkiewicz <marcin.juszkiew...@linaro.org>
Message-ID: <20240823131614.10269-1-phi...@linaro.org>
Signed-off-by: Thomas Huth <th...@redhat.com>
---
  MAINTAINERS                                   |   2 +-
  tests/functional/meson.build                  |   5 +
  .../test_aarch64_sbsaref.py}                  | 144 ++++++------------
  3 files changed, 55 insertions(+), 96 deletions(-)
  rename tests/{avocado/machine_aarch64_sbsaref.py => 
functional/test_aarch64_sbsaref.py} (56%)
  mode change 100644 => 100755

diff --git a/MAINTAINERS b/MAINTAINERS
index 14500cf8a5..e9aa174dc7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -971,7 +971,7 @@ F: hw/misc/sbsa_ec.c
  F: hw/watchdog/sbsa_gwdt.c
  F: include/hw/watchdog/sbsa_gwdt.h
  F: docs/system/arm/sbsa.rst
-F: tests/avocado/machine_aarch64_sbsaref.py
+F: tests/functional/test_aarch64_sbsaref.py
Sharp SL-5500 (Collie) PDA
  M: Peter Maydell <peter.mayd...@linaro.org>
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index 182d40e052..bfa04818cc 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -11,6 +11,7 @@ endif
# Timeouts for individual tests that can be slow e.g. with debugging enabled
  test_timeouts = {
+  'aarch64_sbsaref' : 600,
    'acpi_bits' : 240,
    'netdev_ethtool' : 180,
    'ppc_40p' : 240,
@@ -32,6 +33,10 @@ tests_generic_linuxuser = [
  tests_generic_bsduser = [
  ]
+tests_aarch64_system_thorough = [
+  'aarch64_sbsaref',
+]
+
  tests_arm_system_thorough = [
    'arm_canona1100',
    'arm_integratorcp',
diff --git a/tests/avocado/machine_aarch64_sbsaref.py 
b/tests/functional/test_aarch64_sbsaref.py
old mode 100644
new mode 100755
similarity index 56%
rename from tests/avocado/machine_aarch64_sbsaref.py
rename to tests/functional/test_aarch64_sbsaref.py
index f8bf40c192..e90566cdb8
--- a/tests/avocado/machine_aarch64_sbsaref.py
+++ b/tests/functional/test_aarch64_sbsaref.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+#
  # Functional test that boots a Linux kernel and checks the console
  #
  # SPDX-FileCopyrightText: 2023-2024 Linaro Ltd.
@@ -8,12 +10,11 @@
import os -from avocado import skipUnless
-from avocado.utils import archive
-
-from avocado_qemu import QemuSystemTest
-from avocado_qemu import wait_for_console_pattern
-from avocado_qemu import interrupt_interactive_console_until_pattern
+from qemu_test import QemuSystemTest, Asset
+from qemu_test import wait_for_console_pattern
+from qemu_test import interrupt_interactive_console_until_pattern
+from qemu_test.utils import lzma_uncompress
+from unittest import skipUnless
class Aarch64SbsarefMachine(QemuSystemTest):

Oops, I forgot to squash:

-- >8 --
diff --git a/tests/functional/test_aarch64_sbsaref.py b/tests/functional/test_aarch64_sbsaref.py
index e90566cdb8..f31c2a60b6 100755
--- a/tests/functional/test_aarch64_sbsaref.py
+++ b/tests/functional/test_aarch64_sbsaref.py
@@ -20,8 +20,4 @@
 class Aarch64SbsarefMachine(QemuSystemTest):
     """
-    :avocado: tags=arch:aarch64
-    :avocado: tags=machine:sbsa-ref
-    :avocado: tags=accel:tcg
-
     As firmware runs at a higher privilege level than the hypervisor we
     can only run these tests under TCG emulation.
---

@@ -28,6 +29,16 @@ class Aarch64SbsarefMachine(QemuSystemTest):
timeout = 180


Reply via email to