[U-Boot] [PATCH 02/10] efi_selftest: provide an EFI selftest application

Simon Glass sjg at chromium.org
Mon Sep 25 02:11:36 UTC 2017


On 15 September 2017 at 02:06, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> A testing framework for the EFI API is provided.
> It can be executed with the 'bootefi selftest' command.
>
> It is coded in a way that at a later stage we may turn it
> into a standalone EFI application. The current build system
> does not allow this yet.
>
> All tests use a driver model and are run in three phases:
> setup, execute, teardown.
>
> A test may be setup and executed at boottime,
> it may be setup at boottime and executed at runtime,
> or it may be setup and executed at runtime.
>
> After executing all tests the system is reset.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  MAINTAINERS                             |   5 +-
>  cmd/Kconfig                             |   2 +
>  cmd/bootefi.c                           |  25 +++-
>  include/efi_loader.h                    |   9 ++
>  include/efi_selftest.h                  |  91 +++++++++++++
>  lib/Makefile                            |   1 +
>  lib/efi_selftest/Kconfig                |   7 +
>  lib/efi_selftest/Makefile               |  17 +++
>  lib/efi_selftest/efi_selftest.c         | 219 ++++++++++++++++++++++++++++++++
>  lib/efi_selftest/efi_selftest_console.c | 187 +++++++++++++++++++++++++++
>  10 files changed, 558 insertions(+), 5 deletions(-)
>  create mode 100644 include/efi_selftest.h
>  create mode 100644 lib/efi_selftest/Kconfig
>  create mode 100644 lib/efi_selftest/Makefile
>  create mode 100644 lib/efi_selftest/efi_selftest.c
>  create mode 100644 lib/efi_selftest/efi_selftest_console.c

Reviewed-by: Simon Glass <sjg at chromium.org>

One comment: for the error strings, you should not split them even if
that means that you violate the 80col rule. Otherwise people get
confused when they search for the message and cannot find it in the
code.

- Simon


More information about the U-Boot mailing list