[PATCH] test/py: efi_capsule: Handle expected reset after capsule on disk

Simon Glass sjg at chromium.org
Wed Feb 16 16:26:37 CET 2022


Hi Masami,

On Tue, 15 Feb 2022 at 02:05, Masami Hiramatsu
<masami.hiramatsu at linaro.org> wrote:
>
> Since now the capsule_on_disk will restart the u-boot sandbox right
> after the capsule update, if CONFIG_EFI_CAPSULE_ON_DISK_EARLY=y, the
> boot with a new capsule file will repeat reboot sequence. On the
> other hand, if CONFIG_EFI_CAPSULE_ON_DISK_EARLY=n, the 'env print -e'
> command will execute the capsule update on disk and reboot.
>
> Thus this update the uboot_console for those 2 cases;
>
>  - restart_uboot(): Add expect_earlyreset optional parameter so that
>    it can handle the reboot while booting.
>  - run_command(): Add wait_for_reboot optional parameter so that it
>    can handle the reboot after executing a command.
>
> And enable those options in the test_capsule_firmware.py test cases.
>
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu at linaro.org>
> ---
>  .../test_efi_capsule/test_capsule_firmware.py      |   39 ++++++--
>  test/py/u_boot_console_base.py                     |   95 +++++++++++++++-----
>  test/py/u_boot_console_sandbox.py                  |    6 +
>  3 files changed, 102 insertions(+), 38 deletions(-)

We have a means to avoid actually doing the reset, see the reset driver.

PLEASE use that instead of adding all this code. Also make sure that
test works with 'make qcheck' too.

Regards,
Simon


More information about the U-Boot mailing list