[PATCH 0/4] log: Fix the syslog spam when running tests

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Sep 14 10:24:01 CEST 2020


On 9/12/20 8:28 PM, Simon Glass wrote:
> At present running some sandbox tests produces unwanted ethernet errors
> from the syslog driver, e.g.:
>
> $ ./u-boot -c "ut bloblist"
>
> Running 5 bloblist tests
> Test: bloblist_test_bad_blob
> Test: bloblist_test_blob
> Test: bloblist_test_blob_ensure
> Failed to allocate e0 bytes size=100, need size=130
> No ethernet found.
> bloblist add: returning err=-28
> No ethernet found.
> Test: bloblist_test_checksum
> Checksum f3129fae != 338fbdc
> No ethernet found.
> Bad checksum: returning err=-5
> No ethernet found.
> ...
>
> This series fixes this by making the syslog driver disabled by default. It
> can be enabled with a function call.

Hello Simon,

in log_syslog_emit() I already set processing_msg = 1 to fend of
messages from the network driver when writing messages to syslog.

The idea was right but not in the right place. This logic should be
moved to log_dispatch() to securely avoid that writing messages creates
new messages which even might lead to endless recursion.

See
[PATCH 1/1] log: mute messages generated by log drivers
https://lists.denx.de/pipermail/u-boot/2020-September/426418.html

Best regards

Heinrich

>
>
> Simon Glass (4):
>   log: Add a flag to enable log drivers
>   log: Drop #ifdef in log_test
>   log: Add a way to enable/disable a log device
>   log: Disable the syslog driver by default
>
>  common/log.c                  | 42 ++++++++++++++++++++++++++++++++++-
>  common/log_console.c          |  1 +
>  include/log.h                 | 28 ++++++++++++++++++++++-
>  test/log/log_test.c           |  9 ++++++--
>  test/log/syslog_test.c        | 24 ++++++++++++++++++++
>  test/log/syslog_test.h        | 16 +++++++++++++
>  test/log/syslog_test_ndebug.c |  2 ++
>  test/py/tests/test_log.py     |  8 +++++++
>  8 files changed, 126 insertions(+), 4 deletions(-)
>



More information about the U-Boot mailing list