tests/avocado/machine_aspeed.py: Add eMMC boot tests
PATCH 1/1 tests/avocado/machine_aspeed.py: Add eMMC boot tests
The image was built using the process described in commit c8cb19876d3e ("hw/sd/sdcard: Support boot area in emmc image") with artefacts from the latest successful build of the IBM P10 BMC platform available on:
--- tests/avocado/machine_aspeed.py | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
tests/avocado/machine_aspeed.py +38 -0
@@ -439,3 +439,41 @@ def test_aarch64_ast2700_evb_sdk_v09_02(self): self.wait_for_console_pattern('nodistro.0 ast2700-default ttyS12') self.ssh_connect('root', '0penBmc', False) +class AST2x00MachineMMC(QemuSystemTest): + + timeout = 240 + + def wait_for_console_pattern(self, success_message, vm=None): + wait_for_console_pattern(self, success_message, + failure_message='Kernel panic - not syncing', + vm=vm) + + def test_arm_aspeed_emmc_boot(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:rainier-bmc + """ + + image_url = ('https://fileserver.linaro.org/s/B6pJTwWEkzSDi36/download/' + 'mmc-p10bmc-20240617.qcow2') + image_hash = ('d523fb478d2b84d5adc5658d08502bc64b1486955683814f89c6137518acd90b') + image_path = self.fetch_asset(image_url, asset_hash=image_hash, + algorithm='sha256') + + self.require_netdev('user') + + self.vm.set_console() + self.vm.add_args('-drive', + 'file=' + image_path + ',if=sd,id=sd2,index=2', + '-net', 'nic', '-net', 'user') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot SPL 2019.04') + self.wait_for_console_pattern('Trying to boot from MMC1') + self.wait_for_console_pattern('U-Boot 2019.04') + self.wait_for_console_pattern('eMMC 2nd Boot') + 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 0xf00') + self.wait_for_console_pattern('mmcblk0: p1 p2 p3 p4 p5 p6 p7') + self.wait_for_console_pattern('IBM eBMC (OpenBMC for IBM Enterprise')
Signature · 1 line
2.45.2
Quoted 22 lines · Cédric Le Goater
The image was built using the process described in commit
c8cb19876d3e("hw/sd/sdcard: Support boot area in emmc image") with artefacts from the latest successful build of the IBM P10 BMC platform available on:Signed-off-by Cédric Le Goater <[email protected]>--- tests/avocado/machine_aspeed.py | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)tests/avocado/machine_aspeed.py +3
-0@@ -439,3 +439,41 @@ def test_aarch64_ast2700_evb_sdk_v09_02(self): self.wait_for_console_pattern('nodistro.0 ast2700-default ttyS12') self.ssh_connect('root', '0penBmc', False) +class AST2x00MachineMMC(QemuSystemTest): + + timeout = 240
tests/avocado/machine_aspeed.py def test_aarch64_ast2700_evb_sdk_v09_02(self): · line 454
Quoted 10 lines
tests/avocado/machine_aspeed.py +10
-0+ + def wait_for_console_pattern(self, success_message, vm=None): + wait_for_console_pattern(self, success_message, + failure_message='Kernel panic - not syncing', + vm=vm) + + def test_arm_aspeed_emmc_boot(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:rainier-bmc
:avocado: tags=device:emmc
tests/avocado/machine_aspeed.py def test_aarch64_ast2700_evb_sdk_v09_02(self): · line 455
Quoted 1 line
tests/avocado/machine_aspeed.py +1
-0+ """
$ make check-avocado AVOCADO_TAGS=machine:rainier-bmc Fetching asset from tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_ast2600_debian Fetching asset from tests/avocado/machine_aspeed.py:AST2x00MachineMMC.test_arm_aspeed_emmc_boot JOB ID : ed89ecf5e166e7f636cc731c0242ba6e714fea39 JOB LOG : build/tests/results/job-2024-07-17T14.45-ed89ecf/job.log (1/2) tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_ast2600_debian: PASS (21.55 s) (2/2) tests/avocado/machine_aspeed.py:AST2x00MachineMMC.test_arm_aspeed_emmc_boot: PASS (43.71 s) RESULTS : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 174.68 s
Quoted 26 lines · Philippe Mathieu-Daudé
Quoted 25 lines · Cédric Le Goater
The image was built using the process described in commit
c8cb19876d3e("hw/sd/sdcard: Support boot area in emmc image") with artefacts from the latest successful build of the IBM P10 BMC platform available on:Signed-off-by Cédric Le Goater <[email protected]>---
tests/avocado/machine_aspeed.py| 38 +++++++++++++++++++++++++++++++++1 file changed, 38 insertions(+)tests/avocado/machine_aspeed.py +7
-0@@ -439,3 +439,41 @@ def test_aarch64_ast2700_evb_sdk_v09_02(self): self.wait_for_console_pattern('nodistro.0 ast2700-default ttyS12') self.ssh_connect('root', '0penBmc', False) +class AST2x00MachineMMC(QemuSystemTest): + + timeout = 240 + + def wait_for_console_pattern(self, success_message, vm=None): + wait_for_console_pattern(self, success_message, + failure_message='Kernel panic - not syncing',
Quoted 8 lines
tests/avocado/machine_aspeed.py def test_aarch64_ast2700_evb_sdk_v09_02(self): · line 454
Quoted 6 lines
tests/avocado/machine_aspeed.py +6
-0+ vm=vm) + + def test_arm_aspeed_emmc_boot(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:rainier-bmc:avocado: tags=device:emmc
updated.
Quoted 15 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>tests/avocado/machine_aspeed.py def test_aarch64_ast2700_evb_sdk_v09_02(self): · line 454
Quoted 1 line
tests/avocado/machine_aspeed.py +1
-0+ """$ make check-avocado AVOCADO_TAGS=machine:rainier-bmc Fetching asset from tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_ast2600_debian Fetching asset from tests/avocado/machine_aspeed.py:AST2x00MachineMMC.test_arm_aspeed_emmc_boot JOB ID : ed89ecf5e166e7f636cc731c0242ba6e714fea39 JOB LOG : build/tests/results/job-2024-07-17T14.45-ed89ecf/job.log (1/2) tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_ast2600_debian: PASS (21.55 s) (2/2) tests/avocado/machine_aspeed.py:AST2x00MachineMMC.test_arm_aspeed_emmc_boot: PASS (43.71 s) RESULTS : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 174.68 s
Quoted 2 lines
Thanks,
C.
Quoted 8 lines · Cédric Le Goater
The image was built using the process described in commit
c8cb19876d3e("hw/sd/sdcard: Support boot area in emmc image") with artefacts from the latest successful build of the IBM P10 BMC platform available on:Signed-off-by Cédric Le Goater <[email protected]>---
BTW this patch is
Based-on: <[email protected]>
Quoted 49 lines
tests/avocado/machine_aspeed.py | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)tests/avocado/machine_aspeed.py +38
-0@@ -439,3 +439,41 @@ def test_aarch64_ast2700_evb_sdk_v09_02(self): self.wait_for_console_pattern('nodistro.0 ast2700-default ttyS12') self.ssh_connect('root', '0penBmc', False) +class AST2x00MachineMMC(QemuSystemTest): + + timeout = 240 + + def wait_for_console_pattern(self, success_message, vm=None): + wait_for_console_pattern(self, success_message, + failure_message='Kernel panic - not syncing', + vm=vm) + + def test_arm_aspeed_emmc_boot(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:rainier-bmc + """ + + image_url = ('https://fileserver.linaro.org/s/B6pJTwWEkzSDi36/download/' + 'mmc-p10bmc-20240617.qcow2') + image_hash = ('d523fb478d2b84d5adc5658d08502bc64b1486955683814f89c6137518acd90b') + image_path = self.fetch_asset(image_url, asset_hash=image_hash, + algorithm='sha256') + + self.require_netdev('user') + + self.vm.set_console() + self.vm.add_args('-drive', + 'file=' + image_path + ',if=sd,id=sd2,index=2', + '-net', 'nic', '-net', 'user') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot SPL 2019.04') + self.wait_for_console_pattern('Trying to boot from MMC1') + self.wait_for_console_pattern('U-Boot 2019.04') + self.wait_for_console_pattern('eMMC 2nd Boot') + 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 0xf00') + self.wait_for_console_pattern('mmcblk0: p1 p2 p3 p4 p5 p6 p7') + self.wait_for_console_pattern('IBM eBMC (OpenBMC for IBM Enterprise')
Cédric Le Goater
AppliedQuoted 10 lines · Cédric Le Goater
The image was built using the process described in commit
c8cb19876d3e("hw/sd/sdcard: Support boot area in emmc image") with artefacts from the latest successful build of the IBM P10 BMC platform available on:Signed-off-by Cédric Le Goater <[email protected]>--- tests/avocado/machine_aspeed.py | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
Applied to aspeed-next.
Thanks,
C.