Skip to contentSkip to conversation

tests/functional: Split the test_aarch64_sbsaref test

PATCH New Thomas Huth 1 participant 1 message Nov 6, 2024 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/functional: Split the test_aarch64_sbsaref test

The test_aarch64_sbsaref test is the test with the longest runtime in our functional test suite. Split it into parts so that it can be run on multiple CPUs in parallel.

For this we have to move the fetch_firmware() function out of the class definition to be able to reuse it easily from the other tests (deriving the Aarch64SbsarefAlpine and Aarch64SbsarefFreeBSD directly from Aarch64SbsarefMachine does not work, unfortunately, since we'd inherit the test_sbsaref_edk2_firmware() function that way, causing it to be run multiple times - and keeping the fetch_firmware() in a separate class without the test_sbsaref_edk2_firmware() function also does not work since the "make precache-functional" won't work in that case ==> turning fetch_firmware() into a static function is the best option).

---
 MAINTAINERS                                   |   2 +-
 tests/functional/meson.build                  |   5 +-
 tests/functional/test_aarch64_sbsaref.py      | 159 ++++--------------
 .../functional/test_aarch64_sbsaref_alpine.py |  64 +++++++
 .../test_aarch64_sbsaref_freebsd.py           |  66 ++++++++
 5 files changed, 172 insertions(+), 124 deletions(-)
 create mode 100755 tests/functional/test_aarch64_sbsaref_alpine.py
 create mode 100755 tests/functional/test_aarch64_sbsaref_freebsd.py
MAINTAINERS +1 -1
index 0844f5da19..bd9afc24ef 100644
@@ -923,7 +923,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/functional/test_aarch64_sbsaref.py
+F: tests/functional/test_aarch64_sbsaref*.py
 
 Sharp SL-5500 (Collie) PDA
 M: Peter Maydell <[email protected]>
tests/functional/meson.build +4 -1
index 3561f987a6..68c911f98d 100644
@@ -12,7 +12,8 @@ endif
 # Timeouts for individual tests that can be slow e.g. with debugging enabled
 test_timeouts = {
   'aarch64_raspi4' : 480,
-  'aarch64_sbsaref' : 600,
+  'aarch64_sbsaref_alpine' : 720,
+  'aarch64_sbsaref_freebsd' : 720,
   'aarch64_virt' : 720,
   'acpi_bits' : 420,
   'arm_aspeed' : 600,
@@ -49,6 +50,8 @@ tests_aarch64_system_thorough = [
   'aarch64_raspi3',
   'aarch64_raspi4',
   'aarch64_sbsaref',
+  'aarch64_sbsaref_alpine',
+  'aarch64_sbsaref_freebsd',
   'aarch64_virt',
   'multiprocess',
 ]
tests/functional/test_aarch64_sbsaref.py +37 -122

178 lines not on this page · raw message

tests/functional/test_aarch64_sbsaref_alpine.py new file +64 -0

64 lines not on this page · raw message

tests/functional/test_aarch64_sbsaref_freebsd.py new file +66 -0

66 lines not on this page · raw message

Signature · 1 line
2.47.0