tests/functional: Split aspeed tests
Subsystems (2)
cover tests/functional: Split aspeed tests
Hello,
All functional tests of aspeed machine are run from a single test file. Splitting the tests will improve parallelism and allow us to set different timeouts.
The timeout values were chosen from a (single cpu) run on a raspberry pi4 :
func-arm-arm_aspeed_ast1030 2.52s
func-arm-arm_aspeed_palmetto 50.54s
func-arm-arm_aspeed_romulus 61.81s
func-arm-arm_aspeed_rainier 127.23s func-arm-arm_aspeed_ast2500 378.60s func-arm-arm_aspeed_ast2600 559.13s
Thanks,
C.
Cédric Le Goater (7):
tests/functional: Introduce a specific test for ast1030 SoC tests/functional: Introduce a specific test for palmetto-bmc machine tests/functional: Introduce a specific test for romulus-bmc machine tests/functional: Introduce a specific test for ast2500 SoC tests/functional: Introduce a specific test for ast2600 SoC tests/functional: Introduce a specific test for rainier-bmc machine tests/functional: Move debian boot test from avocado
tests/avocado/boot_linux_console.py | 26 -- tests/functional/aspeed.py | 56 +++ tests/functional/meson.build | 14 +- tests/functional/test_arm_aspeed.py | 351 ------------------- tests/functional/test_arm_aspeed_ast1030.py | 81 +++++ tests/functional/test_arm_aspeed_ast2500.py | 59 ++++ tests/functional/test_arm_aspeed_ast2600.py | 143 ++++++++ tests/functional/test_arm_aspeed_palmetto.py | 24 ++ tests/functional/test_arm_aspeed_rainier.py | 64 ++++ tests/functional/test_arm_aspeed_romulus.py | 24 ++ 10 files changed, 463 insertions(+), 379 deletions(-) create mode 100644 tests/functional/aspeed.py delete mode 100755 tests/functional/test_arm_aspeed.py create mode 100644 tests/functional/test_arm_aspeed_ast1030.py create mode 100644 tests/functional/test_arm_aspeed_ast2500.py create mode 100644 tests/functional/test_arm_aspeed_ast2600.py create mode 100644 tests/functional/test_arm_aspeed_palmetto.py create mode 100644 tests/functional/test_arm_aspeed_rainier.py create mode 100644 tests/functional/test_arm_aspeed_romulus.py
Signature · 1 line
2.47.0
PATCH 1/7 tests/functional: Introduce a specific test for ast1030 SoC
This simply moves the ast1030 tests to a new test file. No changes.
--- tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 64 ---------------- tests/functional/test_arm_aspeed_ast1030.py | 81 +++++++++++++++++++++ 3 files changed, 83 insertions(+), 64 deletions(-) create mode 100644 tests/functional/test_arm_aspeed_ast1030.py
tests/functional/meson.build +2 -0
@@ -18,6 +18,7 @@ test_timeouts = { 'aarch64_tuxrun' : 240, 'aarch64_virt' : 720, 'acpi_bits' : 420, + 'arm_aspeed_ast1030' : 10, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180,
@@ -66,6 +67,7 @@ tests_alpha_system_thorough = [ tests_arm_system_thorough = [ 'arm_aspeed', + 'arm_aspeed_ast1030', 'arm_bpim2u', 'arm_canona1100', 'arm_collie',
tests/functional/test_arm_aspeed.py +0 -64
70 lines not on this page · raw message
tests/functional/test_arm_aspeed_ast1030.py new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
2.47.0
Re: [PATCH 1/7] tests/functional: Introduce a specific test for ast1030 SoC
Quoted 15 lines · Cédric Le Goater
This simply moves the ast1030 tests to a new test file. No changes.
Signed-off-by Cédric Le Goater <[email protected]>--- tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 64 ---------------- tests/functional/test_arm_aspeed_ast1030.py | 81 +++++++++++++++++++++ 3 files changed, 83 insertions(+), 64 deletions(-)create mode 100644
tests/functional/test_arm_aspeed_ast1030.pytests/functional/meson.build +0
-0
tests/functional/meson.build test_timeouts = { · line 21
Quoted 4 lines
tests/functional/meson.build +1
-0@@ -18,6 +18,7 @@ test_timeouts = { 'aarch64_tuxrun' : 240, 'aarch64_virt' : 720, 'acpi_bits' : 420, + 'arm_aspeed_ast1030' : 10,
We've got a default timeout of 90 seconds (see the end of meson.build) ... no need to set a smaller one, so I think you could simply drop this line.
With that line removed:
Re: [PATCH 1/7] tests/functional: Introduce a specific test for ast1030 SoC
Quoted 11 lines · Thomas Huth
Quoted 10 lines · Cédric Le Goater
This simply moves the ast1030 tests to a new test file. No changes.
Signed-off-by Cédric Le Goater <[email protected]>---
tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 64 ----------------tests/functional/test_arm_aspeed_ast1030.py| 81 +++++++++++++++++++++3 files changed, 83 insertions(+), 64 deletions(-)create mode 100644
tests/functional/test_arm_aspeed_ast1030.py
Quoted 11 lines
tests/functional/meson.build test_timeouts = { · line 21
Quoted 9 lines
tests/functional/meson.build +1
-0@@ -18,6 +18,7 @@ test_timeouts = { 'aarch64_tuxrun' : 240, 'aarch64_virt' : 720, 'acpi_bits' : 420, + 'arm_aspeed_ast1030' : 10,We've got a default timeout of 90 seconds (see the end of meson.build) ... no need to set a smaller one, so I think you could simply drop this line.
OK. I will drop this change before applying.
Quoted 4 lines
With that line removed:
Reviewed-by Thomas Huth <[email protected]>
Thanks,
C.
PATCH 2/7 tests/functional: Introduce a specific test for palmetto-bmc machine
In reply to Cédric Le GoaterThis introduces a new aspeed module for sharing code between tests and moves the palmetto test to a new test file. No changes in the test.
--- tests/functional/aspeed.py | 23 +++++++++++++++++++ tests/functional/meson.build | 2 ++ tests/functional/test_arm_aspeed.py | 10 -------- tests/functional/test_arm_aspeed_palmetto.py | 24 ++++++++++++++++++++ 4 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 tests/functional/aspeed.py create mode 100644 tests/functional/test_arm_aspeed_palmetto.py
tests/functional/aspeed.py new file +23 -0
@@ -0,0 +1,23 @@ +# Test class to boot aspeed machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest + +class AspeedTest(LinuxKernelTest): + + def do_test_arm_aspeed(self, machine, image): + self.set_machine(machine) + self.vm.set_console() + self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', + '-net', 'nic', '-snapshot') + self.vm.launch() + + self.wait_for_console_pattern("U-Boot 2016.07") + self.wait_for_console_pattern("## Loading kernel from FIT Image at 20080000") + self.wait_for_console_pattern("Starting kernel ...") + self.wait_for_console_pattern("Booting Linux on physical CPU 0x0") + self.wait_for_console_pattern( + "aspeed-smc 1e620000.spi: read control register: 203b0641") + self.wait_for_console_pattern("ftgmac100 1e660000.ethernet eth0: irq ") + self.wait_for_console_pattern("systemd[1]: Set hostname to")
tests/functional/meson.build +2 -0
@@ -19,6 +19,7 @@ test_timeouts = { 'aarch64_virt' : 720, 'acpi_bits' : 420, 'arm_aspeed_ast1030' : 10, + 'arm_aspeed_palmetto' : 120, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180,
@@ -68,6 +69,7 @@ tests_alpha_system_thorough = [ tests_arm_system_thorough = [ 'arm_aspeed', 'arm_aspeed_ast1030', + 'arm_aspeed_palmetto', 'arm_bpim2u', 'arm_canona1100', 'arm_collie',
tests/functional/test_arm_aspeed.py +0 -10
@@ -37,16 +37,6 @@ def do_test_arm_aspeed(self, machine, image): self.wait_for_console_pattern("ftgmac100 1e660000.ethernet eth0: irq ") self.wait_for_console_pattern("systemd[1]: Set hostname to") - ASSET_PALMETTO_FLASH = Asset( - ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' - 'obmc-phosphor-image-palmetto.static.mtd'), - '3e13bbbc28e424865dc42f35ad672b10f2e82cdb11846bb28fa625b48beafd0d'); - - def test_arm_ast2400_palmetto_openbmc_v2_9_0(self): - image_path = self.ASSET_PALMETTO_FLASH.fetch() - - self.do_test_arm_aspeed('palmetto-bmc', image_path) - ASSET_ROMULUS_FLASH = Asset( ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' 'obmc-phosphor-image-romulus.static.mtd'),
tests/functional/test_arm_aspeed_palmetto.py new file +24 -0
@@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from aspeed import AspeedTest + +class PalmettoMachine(AspeedTest): + + ASSET_PALMETTO_FLASH = Asset( + ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' + 'obmc-phosphor-image-palmetto.static.mtd'), + '3e13bbbc28e424865dc42f35ad672b10f2e82cdb11846bb28fa625b48beafd0d'); + + def test_arm_ast2400_palmetto_openbmc_v2_9_0(self): + image_path = self.ASSET_PALMETTO_FLASH.fetch() + + self.do_test_arm_aspeed('palmetto-bmc', image_path) + + +if __name__ == '__main__': + AspeedTest.main()
Signature · 1 line
2.47.0
Re: [PATCH 2/7] tests/functional: Introduce a specific test for palmetto-bmc machine
Quoted 4 lines · Cédric Le Goater
This introduces a new aspeed module for sharing code between tests and moves the palmetto test to a new test file. No changes in the test.
Signed-off-by Cédric Le Goater <[email protected]>
Quoted 8 lines
--- tests/functional/aspeed.py | 23 +++++++++++++++++++ tests/functional/meson.build | 2 ++ tests/functional/test_arm_aspeed.py | 10 -------- tests/functional/test_arm_aspeed_palmetto.py | 24 ++++++++++++++++++++ 4 files changed, 49 insertions(+), 10 deletions(-)create mode 100644
tests/functional/aspeed.py
create mode 100644tests/functional/test_arm_aspeed_palmetto.py
PATCH 3/7 tests/functional: Introduce a specific test for romulus-bmc machine
In reply to Cédric Le GoaterThis simply moves the romulus-bmc test to a new test file. No changes in the test. The do_test_arm_aspeed routine is removed from the test_arm_aspeed.py file because it is now unused.
--- tests/functional/meson.build | 2 ++ tests/functional/test_arm_aspeed.py | 26 --------------------- tests/functional/test_arm_aspeed_romulus.py | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 tests/functional/test_arm_aspeed_romulus.py
tests/functional/meson.build +2 -0
@@ -20,6 +20,7 @@ test_timeouts = { 'acpi_bits' : 420, 'arm_aspeed_ast1030' : 10, 'arm_aspeed_palmetto' : 120, + 'arm_aspeed_romulus' : 120, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180,
@@ -70,6 +71,7 @@ tests_arm_system_thorough = [ 'arm_aspeed', 'arm_aspeed_ast1030', 'arm_aspeed_palmetto', + 'arm_aspeed_romulus', 'arm_bpim2u', 'arm_canona1100', 'arm_collie',
tests/functional/test_arm_aspeed.py +0 -26
@@ -21,32 +21,6 @@ class AST2x00Machine(LinuxKernelTest): - def do_test_arm_aspeed(self, machine, image): - self.set_machine(machine) - self.vm.set_console() - self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', - '-net', 'nic', '-snapshot') - self.vm.launch() - - self.wait_for_console_pattern("U-Boot 2016.07") - self.wait_for_console_pattern("## Loading kernel from FIT Image at 20080000") - self.wait_for_console_pattern("Starting kernel ...") - self.wait_for_console_pattern("Booting Linux on physical CPU 0x0") - self.wait_for_console_pattern( - "aspeed-smc 1e620000.spi: read control register: 203b0641") - self.wait_for_console_pattern("ftgmac100 1e660000.ethernet eth0: irq ") - self.wait_for_console_pattern("systemd[1]: Set hostname to") - - ASSET_ROMULUS_FLASH = Asset( - ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' - 'obmc-phosphor-image-romulus.static.mtd'), - '820341076803f1955bc31e647a512c79f9add4f5233d0697678bab4604c7bb25') - - def test_arm_ast2500_romulus_openbmc_v2_9_0(self): - image_path = self.ASSET_ROMULUS_FLASH.fetch() - - self.do_test_arm_aspeed('romulus-bmc', image_path) - def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'): self.require_netdev('user') self.vm.set_console()
tests/functional/test_arm_aspeed_romulus.py new file +24 -0
@@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from aspeed import AspeedTest + +class RomulusMachine(AspeedTest): + + ASSET_ROMULUS_FLASH = Asset( + ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' + 'obmc-phosphor-image-romulus.static.mtd'), + '820341076803f1955bc31e647a512c79f9add4f5233d0697678bab4604c7bb25') + + def test_arm_ast2500_romulus_openbmc_v2_9_0(self): + image_path = self.ASSET_ROMULUS_FLASH.fetch() + + self.do_test_arm_aspeed('romulus-bmc', image_path) + + +if __name__ == '__main__': + AspeedTest.main()
Signature · 1 line
2.47.0
Re: [PATCH 3/7] tests/functional: Introduce a specific test for romulus-bmc machine
Quoted 11 lines · Cédric Le Goater
This simply moves the romulus-bmc test to a new test file. No changes in the test. The
do_test_arm_aspeedroutine is removed from thetest_arm_aspeed.pyfile because it is now unused.Signed-off-by Cédric Le Goater <[email protected]>--- tests/functional/meson.build | 2 ++ tests/functional/test_arm_aspeed.py | 26 --------------------- tests/functional/test_arm_aspeed_romulus.py | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+), 26 deletions(-)create mode 100644
tests/functional/test_arm_aspeed_romulus.py
PATCH 4/7 tests/functional: Introduce a specific test for ast2500 SoC
In reply to Cédric Le GoaterThis moves the ast2500-evb tests to a new test file and extends the aspeed module with routines used to run the buildroot and sdk tests. No changes in the test.
--- tests/functional/aspeed.py | 33 ++++++++++++ tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 44 --------------- tests/functional/test_arm_aspeed_ast2500.py | 59 +++++++++++++++++++++ 4 files changed, 94 insertions(+), 44 deletions(-) create mode 100644 tests/functional/test_arm_aspeed_ast2500.py
tests/functional/aspeed.py +33 -0
@@ -2,6 +2,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +from qemu_test import exec_command_and_wait_for_pattern from qemu_test import LinuxKernelTest class AspeedTest(LinuxKernelTest):
@@ -21,3 +22,35 @@ def do_test_arm_aspeed(self, machine, image): "aspeed-smc 1e620000.spi: read control register: 203b0641") self.wait_for_console_pattern("ftgmac100 1e660000.ethernet eth0: irq ") self.wait_for_console_pattern("systemd[1]: Set hostname to") + + def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'): + self.require_netdev('user') + self.vm.set_console() + self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw,read-only=true', + '-net', 'nic', '-net', 'user') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot 2019.04') + self.wait_for_console_pattern('## Loading kernel from FIT Image') + self.wait_for_console_pattern('Starting kernel ...') + self.wait_for_console_pattern('Booting Linux on physical CPU ' + cpu_id) + self.wait_for_console_pattern('lease of 10.0.2.15') + # the line before login: + self.wait_for_console_pattern(pattern) + exec_command_and_wait_for_pattern(self, 'root', 'Password:') + exec_command_and_wait_for_pattern(self, 'passw0rd', '#') + + def do_test_arm_aspeed_buildroot_poweroff(self): + exec_command_and_wait_for_pattern(self, 'poweroff', + 'reboot: System halted'); + + def do_test_arm_aspeed_sdk_start(self, image): + self.require_netdev('user') + self.vm.set_console() + self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', + '-net', 'nic', '-net', 'user', '-snapshot') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot 2019.04') + self.wait_for_console_pattern('## Loading kernel from FIT Image') + self.wait_for_console_pattern('Starting kernel ...')
tests/functional/meson.build +2 -0
@@ -21,6 +21,7 @@ test_timeouts = { 'arm_aspeed_ast1030' : 10, 'arm_aspeed_palmetto' : 120, 'arm_aspeed_romulus' : 120, + 'arm_aspeed_ast2500' : 480, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180,
@@ -72,6 +73,7 @@ tests_arm_system_thorough = [ 'arm_aspeed_ast1030', 'arm_aspeed_palmetto', 'arm_aspeed_romulus', + 'arm_aspeed_ast2500', 'arm_bpim2u', 'arm_canona1100', 'arm_collie',
tests/functional/test_arm_aspeed.py +0 -44
56 lines not on this page · raw message
tests/functional/test_arm_aspeed_ast2500.py new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
2.47.0
Re: [PATCH 4/7] tests/functional: Introduce a specific test for ast2500 SoC
Quoted 4 lines · Cédric Le Goater
This moves the ast2500-evb tests to a new test file and extends the aspeed module with routines used to run the buildroot and sdk tests. No changes in the test.
Quoted 8 lines
Signed-off-by Cédric Le Goater <[email protected]>--- tests/functional/aspeed.py | 33 ++++++++++++ tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 44 --------------- tests/functional/test_arm_aspeed_ast2500.py | 59 +++++++++++++++++++++ 4 files changed, 94 insertions(+), 44 deletions(-)create mode 100644
tests/functional/test_arm_aspeed_ast2500.py
PATCH 5/7 tests/functional: Introduce a specific test for ast2600 SoC
In reply to Cédric Le GoaterThis moves the ast2600-evb tests to a new test file. No changes in the test. The routines used to run the buildroot and sdk tests are removed from the test_arm_aspeed.py file because now unused.
--- tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 155 -------------------- tests/functional/test_arm_aspeed_ast2600.py | 143 ++++++++++++++++++ 3 files changed, 145 insertions(+), 155 deletions(-) create mode 100644 tests/functional/test_arm_aspeed_ast2600.py
tests/functional/meson.build +2 -0
@@ -22,6 +22,7 @@ test_timeouts = { 'arm_aspeed_palmetto' : 120, 'arm_aspeed_romulus' : 120, 'arm_aspeed_ast2500' : 480, + 'arm_aspeed_ast2600' : 720, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180,
@@ -74,6 +75,7 @@ tests_arm_system_thorough = [ 'arm_aspeed_palmetto', 'arm_aspeed_romulus', 'arm_aspeed_ast2500', + 'arm_aspeed_ast2600', 'arm_bpim2u', 'arm_canona1100', 'arm_collie',
tests/functional/test_arm_aspeed.py +0 -155
161 lines not on this page · raw message
tests/functional/test_arm_aspeed_ast2600.py new file +143 -0
143 lines not on this page · raw message
Signature · 1 line
2.47.0
Re: [PATCH 5/7] tests/functional: Introduce a specific test for ast2600 SoC
Quoted 11 lines · Cédric Le Goater
This moves the ast2600-evb tests to a new test file. No changes in the test. The routines used to run the buildroot and sdk tests are removed from the
test_arm_aspeed.pyfile because now unused.Signed-off-by Cédric Le Goater <[email protected]>--- tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 155 -------------------- tests/functional/test_arm_aspeed_ast2600.py | 143 ++++++++++++++++++ 3 files changed, 145 insertions(+), 155 deletions(-)create mode 100644
tests/functional/test_arm_aspeed_ast2600.py
PATCH 6/7 tests/functional: Introduce a specific test for rainier-bmc machine
In reply to Cédric Le GoaterThis simply moves the rainier-bmc test to a new test file. No changes in the test. The test_arm_aspeed.py is deleted.
---
tests/functional/meson.build | 4 ++--
...m_aspeed.py => test_arm_aspeed_rainier.py} | 22 +++++--------------
2 files changed, 7 insertions(+), 19 deletions(-)
rename tests/functional/{test_arm_aspeed.py => test_arm_aspeed_rainier.py} (71%)
mode change 100755 => 100644tests/functional/meson.build +2 -2
@@ -23,7 +23,7 @@ test_timeouts = { 'arm_aspeed_romulus' : 120, 'arm_aspeed_ast2500' : 480, 'arm_aspeed_ast2600' : 720, - 'arm_aspeed' : 600, + 'arm_aspeed_rainier' : 240, 'arm_bpim2u' : 500, 'arm_collie' : 180, 'arm_orangepi' : 540,
@@ -70,12 +70,12 @@ tests_alpha_system_thorough = [ ] tests_arm_system_thorough = [ - 'arm_aspeed', 'arm_aspeed_ast1030', 'arm_aspeed_palmetto', 'arm_aspeed_romulus', 'arm_aspeed_ast2500', 'arm_aspeed_ast2600', + 'arm_aspeed_rainier', 'arm_bpim2u', 'arm_canona1100', 'arm_collie',
tests/functional/test_arm_aspeed_rainier.py renamed from tests/functional/test_arm_aspeed.py +5 -17
@@ -1,25 +1,13 @@ #!/usr/bin/env python3 # -# Functional test that boots the ASPEED SoCs with firmware -# -# Copyright (C) 2022 ASPEED Technology Inc +# Functional test that boots the ASPEED machines # # SPDX-License-Identifier: GPL-2.0-or-later -import os -import time -import subprocess -import tempfile - -from qemu_test import LinuxKernelTest, Asset -from qemu_test import exec_command_and_wait_for_pattern -from qemu_test import interrupt_interactive_console_until_pattern -from qemu_test import has_cmd -from qemu_test.utils import archive_extract -from zipfile import ZipFile -from unittest import skipUnless +from qemu_test import Asset +from aspeed import AspeedTest -class AST2x00MachineMMC(LinuxKernelTest): +class RainierMachine(AspeedTest): ASSET_RAINIER_EMMC = Asset( ('https://fileserver.linaro.org/s/B6pJTwWEkzSDi36/download/'
@@ -49,4 +37,4 @@ def test_arm_aspeed_emmc_boot(self): self.wait_for_console_pattern('IBM eBMC (OpenBMC for IBM Enterprise') if __name__ == '__main__': - LinuxKernelTest.main() + AspeedTest.main()
Signature · 1 line
2.47.0
Re: [PATCH 6/7] tests/functional: Introduce a specific test for rainier-bmc machine
Quoted 10 lines · Cédric Le Goater
This simply moves the rainier-bmc test to a new test file. No changes in the test. The
test_arm_aspeed.pyis deleted.Signed-off-by Cédric Le Goater <[email protected]>--- tests/functional/meson.build | 4 ++-- ...m_aspeed.py => test_arm_aspeed_rainier.py} | 22 +++++-------------- 2 files changed, 7 insertions(+), 19 deletions(-)rename
tests/functional/{test_arm_aspeed.py=>test_arm_aspeed_rainier.py} (71%) mode change 100755 => 100644
PATCH 7/7 tests/functional: Move debian boot test from avocado
In reply to Cédric Le GoaterThis simply moves the debian boot test from the avocado testsuite to the new functional testsuite. No changes in the test.
--- tests/avocado/boot_linux_console.py | 26 --------------------- tests/functional/test_arm_aspeed_rainier.py | 24 +++++++++++++++++++ 2 files changed, 24 insertions(+), 26 deletions(-)
tests/avocado/boot_linux_console.py +0 -26
@@ -470,29 +470,3 @@ def test_arm_quanta_gsj_initrd(self): self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0') self.wait_for_console_pattern( 'Give root password for system maintenance') - - def test_arm_ast2600_debian(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:rainier-bmc - """ - deb_url = ('http://snapshot.debian.org/archive/debian/' - '20220606T211338Z/' - 'pool/main/l/linux/' - 'linux-image-5.17.0-2-armmp_5.17.6-1%2Bb1_armhf.deb') - deb_hash = '8acb2b4439faedc2f3ed4bdb2847ad4f6e0491f73debaeb7f660c8abe4dcdc0e' - deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash, - algorithm='sha256') - kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.17.0-2-armmp') - dtb_path = self.extract_from_deb(deb_path, - '/usr/lib/linux-image-5.17.0-2-armmp/aspeed-bmc-ibm-rainier.dtb') - - self.vm.set_console() - self.vm.add_args('-kernel', kernel_path, - '-dtb', dtb_path, - '-net', 'nic') - self.vm.launch() - self.wait_for_console_pattern("Booting Linux on physical CPU 0xf00") - self.wait_for_console_pattern("SMP: Total of 2 processors activated") - self.wait_for_console_pattern("No filesystem could mount root") -
tests/functional/test_arm_aspeed_rainier.py +24 -0
@@ -36,5 +36,29 @@ def test_arm_aspeed_emmc_boot(self): self.wait_for_console_pattern('mmcblk0: p1 p2 p3 p4 p5 p6 p7') self.wait_for_console_pattern('IBM eBMC (OpenBMC for IBM Enterprise') + ASSET_DEBIAN_LINUX_ARMHF_DEB = Asset( + ('http://snapshot.debian.org/archive/debian/20220606T211338Z/pool/main/l/linux/linux-image-5.17.0-2-armmp_5.17.6-1%2Bb1_armhf.deb'), + '8acb2b4439faedc2f3ed4bdb2847ad4f6e0491f73debaeb7f660c8abe4dcdc0e') + + def test_arm_debian_kernel_boot(self): + self.set_machine('rainier-bmc') + + deb_path = self.ASSET_DEBIAN_LINUX_ARMHF_DEB.fetch() + + kernel_path = self.extract_from_deb(deb_path, '/boot/vmlinuz-5.17.0-2-armmp') + dtb_path = self.extract_from_deb(deb_path, + '/usr/lib/linux-image-5.17.0-2-armmp/aspeed-bmc-ibm-rainier.dtb') + + self.vm.set_console() + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-net', 'nic') + self.vm.launch() + + self.wait_for_console_pattern("Booting Linux on physical CPU 0xf00") + self.wait_for_console_pattern("SMP: Total of 2 processors activated") + self.wait_for_console_pattern("No filesystem could mount root") + + if __name__ == '__main__': AspeedTest.main()
Signature · 1 line
2.47.0
Re: [PATCH 7/7] tests/functional: Move debian boot test from avocado
Quoted 5 lines · Cédric Le Goater
This simply moves the debian boot test from the avocado testsuite to the new functional testsuite. No changes in the test.
Signed-off-by Cédric Le Goater <[email protected]>---
Cédric Le Goater
AppliedQuoted 39 lines · Cédric Le Goater
Hello,
All functional tests of aspeed machine are run from a single test file. Splitting the tests will improve parallelism and allow us to set different timeouts.
The timeout values were chosen from a (single cpu) run on a raspberry pi4 :
func-arm-arm_aspeed_ast1030 2.52s func-arm-arm_aspeed_palmetto 50.54s func-arm-arm_aspeed_romulus 61.81s func-arm-arm_aspeed_rainier 127.23s func-arm-arm_aspeed_ast2500 378.60s func-arm-arm_aspeed_ast2600 559.13sThanks,
C.
Cédric Le Goater (7):
tests/functional: Introduce a specific test for ast1030 SoC tests/functional: Introduce a specific test for palmetto-bmc machine tests/functional: Introduce a specific test for romulus-bmc machine tests/functional: Introduce a specific test for ast2500 SoC tests/functional: Introduce a specific test for ast2600 SoC tests/functional: Introduce a specific test for rainier-bmc machine tests/functional: Move debian boot test from avocadoQuoted 1 line
tests/avocado/boot_linux_console.py | 26 --tests/functional/aspeed.py | 56 +++ tests/functional/meson.build | 14 +- tests/functional/test_arm_aspeed.py | 351 ------------------- tests/functional/test_arm_aspeed_ast1030.py | 81 +++++ tests/functional/test_arm_aspeed_ast2500.py | 59 ++++ tests/functional/test_arm_aspeed_ast2600.py | 143 ++++++++ tests/functional/test_arm_aspeed_palmetto.py | 24 ++ tests/functional/test_arm_aspeed_rainier.py | 64 ++++ tests/functional/test_arm_aspeed_romulus.py | 24 ++ 10 files changed, 463 insertions(+), 379 deletions(-)
Quoted 8 lines
create mode 100644
tests/functional/aspeed.py
delete mode 100755tests/functional/test_arm_aspeed.pycreate mode 100644tests/functional/test_arm_aspeed_ast1030.pycreate mode 100644tests/functional/test_arm_aspeed_ast2500.pycreate mode 100644tests/functional/test_arm_aspeed_ast2600.pycreate mode 100644tests/functional/test_arm_aspeed_palmetto.pycreate mode 100644tests/functional/test_arm_aspeed_rainier.pycreate mode 100644tests/functional/test_arm_aspeed_romulus.py
Applied to aspeed-next.
Thanks,
C.