aspeed: machine deprecations and test improvements
cover aspeed: machine deprecations and test improvements
Hello,
The first three patches deprecate machines that have no functional tests and can be replaced by more generic machines (evbs) with command-line options for I2C device.
The last two patches improve the functional tests for the ast2700 machines to save CI resources.
Thanks,
C.
Cédric Le Goater (5):
aspeed: Deprecate the sonorapass-bmc machine
aspeed: Deprecate the qcom-dc-scm-v1-bmc and qcom-firework-bmc
machines
aspeed: Deprecate the fp5280g2-bmc machine test/functional/aarch64: Remove test for the ast2700a0-evb machine test/functional/aarch64: Split the ast2700a1-evb OpenBMC boot test
docs/about/deprecated.rst | 27 +++++++++++++++++++ hw/arm/aspeed.c | 4 +++ .../functional/aarch64/test_aspeed_ast2700.py | 21 ++++----------- 3 files changed, 36 insertions(+), 16 deletions(-)
Signature · 1 line
2.51.0
PATCH 1/5 aspeed: Deprecate the sonorapass-bmc machine
The 'sonorapass-bmc' machine represents a lab server that never entered production. There are no functional tests for this machine which makes harder to determine when something becomes deprecated or unused.
Since the machine does not rely on any specific device models, it can be replaced by the 'ast2500-evb' machine using the 'fmc-model' option to specify the flash type. The I2C devices connected to the board can be defined via the QEMU command line.
--- docs/about/deprecated.rst | 9 +++++++++ hw/arm/aspeed.c | 1 + 2 files changed, 10 insertions(+)
docs/about/deprecated.rst +9 -0
@@ -285,6 +285,15 @@ and serves as the initial engineering sample rather than a production version. A newer revision, A1, is now supported, and the ``ast2700a1-evb`` should replace the older A0 version. +Arm ``sonorapass-bmc`` machine (since 10.2) +''''''''''''''''''''''''''''''''''''''''''' + +The ``sonorapass-bmc`` machine represents a lab server that never +entered production. Since it does not rely on any specific device +models, it can be replaced by the ``ast2500-evb`` machine using the +``fmc-model`` option to specify the flash type. The I2C devices +connected to the board can be defined via the QEMU command line. + RISC-V default machine option (since 10.0) ''''''''''''''''''''''''''''''''''''''''''
hw/arm/aspeed.c +1 -0
@@ -1552,6 +1552,7 @@ static void aspeed_machine_sonorapass_class_init(ObjectClass *oc,AspeedMachineClass *amc =ASPEED_MACHINE_CLASS (oc); mc->desc ="OCP SonoraPass BMC (ARM1176)" ; + mc->deprecation_reason ="use 'ast2500-evb' instead" ; amc->soc_name ="ast2500-a1" ; amc->hw_strap1 =SONORAPASS_BMC_HW_STRAP1 ; amc->fmc_model ="mx66l1g45g" ;
Signature · 1 line
2.51.0
PATCH 2/5 aspeed: Deprecate the qcom-dc-scm-v1-bmc and qcom-firework-bmc machines
In reply to Cédric Le GoaterThere are no functional tests for the 'qcom-dc-scm-v1-bmc' and 'qcom-firework-bmc' machines which makes harder to determine when something becomes deprecated or unused.
Since the machines do not rely on any specific device models, they can be replaced by the 'ast2600-evb' machine using the 'fmc-model' option to specify the flash type. The I2C devices connected to the board can be defined via the QEMU command line.
--- docs/about/deprecated.rst | 10 ++++++++++ hw/arm/aspeed.c | 2 ++ 2 files changed, 12 insertions(+)
docs/about/deprecated.rst +10 -0
@@ -294,6 +294,16 @@ models, it can be replaced by the ``ast2500-evb`` machine using the ``fmc-model`` option to specify the flash type. The I2C devices connected to the board can be defined via the QEMU command line. +Arm ``qcom-dc-scm-v1-bmc`` and ``qcom-firework-bmc`` machine (since 10.2) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +The ``qcom-dc-scm-v1-bmc`` and ``qcom-firework-bmc`` represent lab +servers that never entered production. Since they do not rely on any +specific device models, they can be replaced by the ``ast2600-evb`` +machine using the ``fmc-model`` option to specify the flash type. The +I2C devices connected to the board can be defined via the QEMU command +line. + RISC-V default machine option (since 10.0) ''''''''''''''''''''''''''''''''''''''''''
hw/arm/aspeed.c +2 -0
@@ -1926,6 +1926,7 @@ static void aspeed_machine_qcom_dc_scm_v1_class_init(ObjectClass *oc,AspeedMachineClass *amc =ASPEED_MACHINE_CLASS (oc); mc->desc ="Qualcomm DC-SCM V1 BMC (Cortex A7)" ; + mc->deprecation_reason ="use 'ast2600-evb' instead" ; amc->soc_name ="ast2600-a3" ; amc->hw_strap1 =QCOM_DC_SCM_V1_BMC_HW_STRAP1 ; amc->hw_strap2 =QCOM_DC_SCM_V1_BMC_HW_STRAP2 ;
@@ -1945,6 +1946,7 @@ static void aspeed_machine_qcom_firework_class_init(ObjectClass *oc,AspeedMachineClass *amc =ASPEED_MACHINE_CLASS (oc); mc->desc ="Qualcomm DC-SCM V1/Firework BMC (Cortex A7)" ; + mc->deprecation_reason ="use 'ast2600-evb' instead" ; amc->soc_name ="ast2600-a3" ; amc->hw_strap1 =QCOM_DC_SCM_V1_BMC_HW_STRAP1 ; amc->hw_strap2 =QCOM_DC_SCM_V1_BMC_HW_STRAP2 ;
Signature · 1 line
2.51.0
PATCH 3/5 aspeed: Deprecate the fp5280g2-bmc machine
In reply to Cédric Le GoaterThere are no functional tests for the 'fp5280g2-bmc' machine which makes harder to determine when something becomes deprecated or unused.
Since the machine does not rely on any specific device models, it can be replaced by the 'ast2500-evb' machine using the 'fmc-model' option to specify the flash type. The I2C devices connected to the board can be defined via the QEMU command line.
--- docs/about/deprecated.rst | 8 ++++++++ hw/arm/aspeed.c | 1 + 2 files changed, 9 insertions(+)
docs/about/deprecated.rst +8 -0
@@ -304,6 +304,14 @@ machine using the ``fmc-model`` option to specify the flash type. The I2C devices connected to the board can be defined via the QEMU command line. +Arm ``fp5280g2-bmc`` machine (since 10.2) +''''''''''''''''''''''''''''''''''''''''''' + +The ``fp5280g2-bmc`` machine does not rely on any specific device +models, it can be replaced by the ``ast2500-evb`` machine using the +``fmc-model`` option to specify the flash type. The I2C devices +connected to the board can be defined via the QEMU command line. + RISC-V default machine option (since 10.0) ''''''''''''''''''''''''''''''''''''''''''
hw/arm/aspeed.c +1 -0
@@ -1626,6 +1626,7 @@ static void aspeed_machine_fp5280g2_class_init(ObjectClass *oc,AspeedMachineClass *amc =ASPEED_MACHINE_CLASS (oc); mc->desc ="Inspur FP5280G2 BMC (ARM1176)" ; + mc->deprecation_reason ="use 'ast2500-evb' instead" ; amc->soc_name ="ast2500-a1" ; amc->hw_strap1 =FP5280G2_BMC_HW_STRAP1 ; amc->fmc_model ="n25q512a" ;
Signature · 1 line
2.51.0
PATCH 4/5 test/functional/aarch64: Remove test for the ast2700a0-evb machine
In reply to Cédric Le GoaterThe 'ast2700a0-evb' machine was deprecated in commit 6888a4a9c860 and removal is scheduled in the QEMU 11.0 release. This change removes the corresponding tests ahead of time to save CI resources.
--- tests/functional/aarch64/test_aspeed_ast2700.py | 12 ------------ 1 file changed, 12 deletions(-)
tests/functional/aarch64/test_aspeed_ast2700.py +0 -12
@@ -46,10 +46,6 @@ def verify_openbmc_boot_and_login(self, name): exec_command_and_wait_for_pattern(self, 'root', 'Password:') exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#') - ASSET_SDK_V906_AST2700 = Asset( - 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.06/ast2700-a0-default-obmc.tar.gz', - '7247b6f19dbfb700686f8d9f723ac23f3eb229226c0589cb9b06b80d1b61f3cb') - ASSET_SDK_V908_AST2700A1 = Asset( 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.08/ast2700-default-obmc.tar.gz', 'eac3dc409b7ea3cd4b03d4792d3cebd469792ad893cb51e1d15f0fc20bd1e2cd')
@@ -124,14 +120,6 @@ def start_ast2700_test_vbootrom(self, name): self.do_test_aarch64_aspeed_sdk_start( self.scratch_file(name, 'image-bmc')) - def test_aarch64_ast2700a0_evb_sdk_v09_06(self): - self.set_machine('ast2700a0-evb') - - self.archive_extract(self.ASSET_SDK_V906_AST2700) - self.start_ast2700_test('ast2700-a0-default') - self.verify_openbmc_boot_and_login('ast2700-a0-default') - self.do_ast2700_i2c_test() - def test_aarch64_ast2700a1_evb_sdk_v09_08(self): self.set_machine('ast2700a1-evb') self.require_netdev('user')
Signature · 1 line
2.51.0
RE: [PATCH 4/5] test/functional/aarch64: Remove test for the ast2700a0-evb machine
Quoted 50 lines
The 'ast2700a0-evb' machine was deprecated in commit
6888a4a9c860and removal is scheduled in the QEMU 11.0 release. This change removes the corresponding tests ahead of time to save CI resources.Cc Thomas Huth <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>--- tests/functional/aarch64/test_aspeed_ast2700.py | 12 ------------ 1 file changed, 12 deletions(-)tests/functional/aarch64/test_aspeed_ast2700.py +0
-2@@ -46,10 +46,6 @@ def verify_openbmc_boot_and_login(self, name): exec_command_and_wait_for_pattern(self, 'root', 'Password:') exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#') - ASSET_SDK_V906_AST2700 = Asset( -'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.06/ast 2700-a0-default-obmc.tar.gz',
- '7247b6f19dbfb700686f8d9f723ac23f3eb229226c0589cb9b06b80d1b61f3cb') -ASSET_SDK_V908_AST2700A1 = Asset('https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.08/ast 2700-default-obmc.tar.gz',
'
eac3dc409b7ea3cd4b03d4792d3cebd469792ad893cb51e1d15f0fc20bd1e2cd')tests/functional/aarch64/test_aspeed_ast2700.py +0
-9@@ -124,14 +120,6 @@ def start_ast2700_test_vbootrom(self, name): self.do_test_aarch64_aspeed_sdk_start( self.scratch_file(name, 'image-bmc')) - def test_aarch64_ast2700a0_evb_sdk_v09_06(self): - self.set_machine('ast2700a0-evb') - - self.archive_extract(self.ASSET_SDK_V906_AST2700) - self.start_ast2700_test('ast2700-a0-default') - self.verify_openbmc_boot_and_login('ast2700-a0-default') - self.do_ast2700_i2c_test() - def test_aarch64_ast2700a1_evb_sdk_v09_08(self): self.set_machine('ast2700a1-evb') self.require_netdev('user') --
Quoted 1 line
2.51.0
Thanks,
Jamin
Re: [PATCH 4/5] test/functional/aarch64: Remove test for the ast2700a0-evb machine
In reply to Cédric Le GoaterQuoted 9 lines · Cédric Le Goater
The 'ast2700a0-evb' machine was deprecated in commit
6888a4a9c860and removal is scheduled in the QEMU 11.0 release. This change removes the corresponding tests ahead of time to save CI resources.Cc Thomas Huth <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>--- tests/functional/aarch64/test_aspeed_ast2700.py | 12 ------------ 1 file changed, 12 deletions(-)
PATCH 5/5 test/functional/aarch64: Split the ast2700a1-evb OpenBMC boot test
In reply to Cédric Le GoaterThe 'ast2700a1-evb' machine has two functional tests: one loading firmware components into memory and another using a vbootrom image. Both tests perform a full OpenBMC boot and run checks on I2C and PCIe devices, which is redundant and time-consuming.
To save CI resources, the vbootrom test is refactored to focus on the firmware boot process only. The OpenBMC boot verification logic is split and a new verify_openbmc_boot_start() helper is introduced to only wait for the kernel to start.
The vbootrom test now uses this function and the less essential I2C and PCIe checks have been removed from this test case.
--- tests/functional/aarch64/test_aspeed_ast2700.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
tests/functional/aarch64/test_aspeed_ast2700.py +5 -4
@@ -37,11 +37,14 @@ def verify_vbootrom_firmware_flow(self): wait_for_console_pattern(self, 'done') wait_for_console_pattern(self, 'Jumping to BL31 (Trusted Firmware-A)') - def verify_openbmc_boot_and_login(self, name): + def verify_openbmc_boot_start(self): wait_for_console_pattern(self, 'U-Boot 2023.10') wait_for_console_pattern(self, '## Loading kernel from FIT Image') wait_for_console_pattern(self, 'Starting kernel ...') + def verify_openbmc_boot_and_login(self, name): + self.verify_openbmc_boot_start() + wait_for_console_pattern(self, f'{name} login:') exec_command_and_wait_for_pattern(self, 'root', 'Password:') exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')
@@ -141,9 +144,7 @@ def test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_08(self): self.vm.add_args('-netdev', 'user,id=net1') self.start_ast2700_test_vbootrom('ast2700-default') self.verify_vbootrom_firmware_flow() - self.verify_openbmc_boot_and_login('ast2700-default') - self.do_ast2700_i2c_test() - self.do_ast2700_pcie_test() + self.verify_openbmc_boot_start() if __name__ == '__main__': QemuSystemTest.main()
Signature · 1 line
2.51.0
RE: [PATCH 5/5] test/functional/aarch64: Split the ast2700a1-evb OpenBMC boot test
Quoted 54 lines
The 'ast2700a1-evb' machine has two functional tests: one loading firmware components into memory and another using a vbootrom image. Both tests perform a full OpenBMC boot and run checks on I2C and PCIe devices, which is redundant and time-consuming.
To save CI resources, the vbootrom test is refactored to focus on the firmware boot process only. The OpenBMC boot verification logic is split and a new
verify_openbmc_boot_start()helper is introduced to only wait for the kernel to start.The vbootrom test now uses this function and the less essential I2C and PCIe checks have been removed from this test case.
Cc Thomas Huth <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>--- tests/functional/aarch64/test_aspeed_ast2700.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)tests/functional/aarch64/test_aspeed_ast2700.py +4
-1@@ -37,11 +37,14 @@ def verify_vbootrom_firmware_flow(self): wait_for_console_pattern(self, 'done') wait_for_console_pattern(self, 'Jumping to BL31 (Trusted Firmware-A)') - def verify_openbmc_boot_and_login(self, name): + def verify_openbmc_boot_start(self): wait_for_console_pattern(self, 'U-Boot 2023.10') wait_for_console_pattern(self, '## Loading kernel from FIT Image') wait_for_console_pattern(self, 'Starting kernel ...') + def verify_openbmc_boot_and_login(self, name): + self.verify_openbmc_boot_start() + wait_for_console_pattern(self, f'{name} login:') exec_command_and_wait_for_pattern(self, 'root', 'Password:')exec_command_and_wait_for_pattern(self, '0penBmc',
f'root@{name}:~#') @@ -141,9 +144,7 @@ deftest_aarch64_ast2700a1_evb_sdk_vbootrom_v09_08(self):self.vm.add_args('-netdev', 'user,id=net1') self.start_ast2700_test_vbootrom('ast2700-default') self.verify_vbootrom_firmware_flow()tests/functional/aarch64/test_aspeed_ast2700.py +1
-4- self.verify_openbmc_boot_and_login('ast2700-default') - self.do_ast2700_i2c_test() - self.do_ast2700_pcie_test() + self.verify_openbmc_boot_start() if __name__ == '__main__': QemuSystemTest.main() --
Quoted 1 line
2.51.0
Thanks,
Jamin
Re: [PATCH 5/5] test/functional/aarch64: Split the ast2700a1-evb OpenBMC boot test
In reply to Cédric Le GoaterQuoted 24 lines · Cédric Le Goater
The 'ast2700a1-evb' machine has two functional tests: one loading firmware components into memory and another using a vbootrom image. Both tests perform a full OpenBMC boot and run checks on I2C and PCIe devices, which is redundant and time-consuming.
To save CI resources, the vbootrom test is refactored to focus on the firmware boot process only. The OpenBMC boot verification logic is split and a new
verify_openbmc_boot_start()helper is introduced to only wait for the kernel to start.The vbootrom test now uses this function and the less essential I2C and PCIe checks have been removed from this test case.
Cc Thomas Huth <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>--- tests/functional/aarch64/test_aspeed_ast2700.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)tests/functional/aarch64/test_aspeed_ast2700.py +0
-0
tests/functional/aarch64/test_aspeed_ast2700.py def verify_vbootrom_firmware_flow(self): · line 43
Quoted 8 lines
tests/functional/aarch64/test_aspeed_ast2700.py +1
-1@@ -37,11 +37,14 @@ def verify_vbootrom_firmware_flow(self): wait_for_console_pattern(self, 'done') wait_for_console_pattern(self, 'Jumping to BL31 (Trusted Firmware-A)') - def verify_openbmc_boot_and_login(self, name): + def verify_openbmc_boot_start(self): wait_for_console_pattern(self, 'U-Boot 2023.10') wait_for_console_pattern(self, '## Loading kernel from FIT Image') wait_for_console_pattern(self, 'Starting kernel ...')
The patch is a good idea ... but I'd maybe wait 'til the kernel really has been started, i.e. by waiting for it's initial output like "Linux version 6.6.93" ?
Anyway:
Quoted 17 lines
tests/functional/aarch64/test_aspeed_ast2700.py +4
-3+ def verify_openbmc_boot_and_login(self, name): + self.verify_openbmc_boot_start() + wait_for_console_pattern(self, f'{name} login:') exec_command_and_wait_for_pattern(self, 'root', 'Password:') exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')@@ -141,9 +144,7 @@ def test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_08(self): self.vm.add_args('-netdev', 'user,id=net1') self.start_ast2700_test_vbootrom('ast2700-default') self.verify_vbootrom_firmware_flow() - self.verify_openbmc_boot_and_login('ast2700-default') - self.do_ast2700_i2c_test() - self.do_ast2700_pcie_test() + self.verify_openbmc_boot_start() if __name__ == '__main__': QemuSystemTest.main()
Re: [PATCH 5/5] test/functional/aarch64: Split the ast2700a1-evb OpenBMC boot test
Quoted 20 lines · Thomas Huth
Quoted 19 lines · Cédric Le Goater
The 'ast2700a1-evb' machine has two functional tests: one loading firmware components into memory and another using a vbootrom image. Both tests perform a full OpenBMC boot and run checks on I2C and PCIe devices, which is redundant and time-consuming.
To save CI resources, the vbootrom test is refactored to focus on the firmware boot process only. The OpenBMC boot verification logic is split and a new
verify_openbmc_boot_start()helper is introduced to only wait for the kernel to start.The vbootrom test now uses this function and the less essential I2C and PCIe checks have been removed from this test case.
Cc Thomas Huth <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>---
tests/functional/aarch64/test_aspeed_ast2700.py| 9 +++++----1 file changed, 5 insertions(+), 4 deletions(-)
Quoted 14 lines
tests/functional/aarch64/test_aspeed_ast2700.py def verify_vbootrom_firmware_flow(self): · line 42
Quoted 12 lines
tests/functional/aarch64/test_aspeed_ast2700.py +1
-1@@ -37,11 +37,14 @@ def verify_vbootrom_firmware_flow(self): wait_for_console_pattern(self, 'done') wait_for_console_pattern(self, 'Jumping to BL31 (Trusted Firmware-A)') - def verify_openbmc_boot_and_login(self, name): + def verify_openbmc_boot_start(self): wait_for_console_pattern(self, 'U-Boot 2023.10') wait_for_console_pattern(self, '## Loading kernel from FIT Image') wait_for_console_pattern(self, 'Starting kernel ...')The patch is a good idea ... but I'd maybe wait 'til the kernel really has been started, i.e. by waiting for it's initial output like "Linux version 6.6.93" ?
Sure.
I changed the wait pattern from 'Starting kernel ...' to 'Linux version ' without specifying the Linux kernel version since a change would be needed whenever the SDK images are updated.
Quoted 2 lines
Anyway:
Reviewed-by Thomas Huth <[email protected]>
Thanks,
C.
Quoted 19 lines
Quoted 18 lines
tests/functional/aarch64/test_aspeed_ast2700.py +4
-3+ def verify_openbmc_boot_and_login(self, name): + self.verify_openbmc_boot_start() + wait_for_console_pattern(self, f'{name} login:') exec_command_and_wait_for_pattern(self, 'root', 'Password:') exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')@@ -141,9 +144,7 @@ def test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_08(self): self.vm.add_args('-netdev', 'user,id=net1') self.start_ast2700_test_vbootrom('ast2700-default') self.verify_vbootrom_firmware_flow() - self.verify_openbmc_boot_and_login('ast2700-default') - self.do_ast2700_i2c_test() - self.do_ast2700_pcie_test() + self.verify_openbmc_boot_start()if
__name__== '__main__':
QemuSystemTest.main()
Cédric Le Goater
AppliedQuoted 21 lines · Cédric Le Goater
Hello,
The first three patches deprecate machines that have no functional tests and can be replaced by more generic machines (evbs) with command-line options for I2C device.
The last two patches improve the functional tests for the ast2700 machines to save CI resources.
Thanks,
C.
Cédric Le Goater (5):
aspeed: Deprecate the sonorapass-bmc machine
aspeed: Deprecate the qcom-dc-scm-v1-bmc and qcom-firework-bmc
machines
aspeed: Deprecate the fp5280g2-bmc machine test/functional/aarch64: Remove test for the ast2700a0-evb machine test/functional/aarch64: Split the ast2700a1-evb OpenBMC boot test
Quoted 5 lines
docs/about/deprecated.rst | 27 +++++++++++++++++++ hw/arm/aspeed.c | 4 +++ .../functional/aarch64/test_aspeed_ast2700.py | 21 ++++----------- 3 files changed, 36 insertions(+), 16 deletions(-)
Applied to aspeed-next.
Thanks,
C.