From: Philippe Mathieu-Daudé <philmd@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é <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Message-ID: <20240823131614.10269-1-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@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.maydell@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):