[PATCH v3 4/6] test: log functions with CONFIG_LOG=n
Simon Glass
sjg at chromium.org
Sun Feb 16 20:02:51 CET 2020
On Sat, 15 Feb 2020 at 03:14, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> If CONFIG_LOG=n, we still expect output for log_err(), log_warning(),
> log_notice(), log_info() and in case of DEBUG=1 also for log_debug().
>
> Provide unit tests verifying this.
>
> The tests depend on:
>
> CONFIG_CONSOLE_RECORD=y
> CONFIG_LOG=n
> CONFIG_UT_LOG=y
>
> It may be necessary to increase the value of CONFIG_SYS_MALLOC_F_LEN to
> accommodate CONFIG_CONSOLE_RECORD=y.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> v3:
> correctly consider CONFIG_UT_LOG in test/cmd_ut.c
> v2:
> use ut_check_console_line()
> move do_ut_log() to test/log/test-main.c to accomodate further
> tests
> provide CONFIG_UT_LOG configuration option
> ---
> MAINTAINERS | 2 +-
> include/test/log.h | 16 +++++
> include/test/suites.h | 1 +
> test/Kconfig | 9 +++
> test/Makefile | 2 +-
> test/cmd_ut.c | 6 ++
> test/log/Makefile | 10 ++++
> test/log/nolog_test.c | 135 ++++++++++++++++++++++++++++++++++++++++++
> test/log/test-main.c | 20 +++++++
> 9 files changed, 199 insertions(+), 2 deletions(-)
> create mode 100644 include/test/log.h
> create mode 100644 test/log/nolog_test.c
> create mode 100644 test/log/test-main.c
>
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list