[PATCH 4/4] log: Disable the syslog driver by default

Simon Glass sjg at chromium.org
Sun Sep 13 03:24:02 CEST 2020


Hi Heinrich,

On Sat, 12 Sep 2020 at 14:34, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> Am 12. September 2020 22:24:24 MESZ schrieb Simon Glass <sjg at chromium.org>:
> >Hi Heinrich,
> >
> >On Sat, 12 Sep 2020 at 14:16, Heinrich Schuchardt <xypron.glpk at gmx.de>
> >wrote:
> >>
> >> Am 12. September 2020 20:28:50 MESZ schrieb Simon Glass
> ><sjg at chromium.org>:
> >> >This driver interferes with other sandbox tests since it causes log
> >> >output
> >> >to be interspersed with "No ethernet found." messages. Disable this
> >> >driver
> >> >by default.
> >> >
> >> >Enable it for the syslog tests so that they still pass.
> >> >
> >> >Signed-off-by: Simon Glass <sjg at chromium.org>
> >> >---
> >> >
> >> > common/log_syslog.c           |  1 -
> >> > test/log/syslog_test.c        | 24 ++++++++++++++++++++++++
> >> > test/log/syslog_test.h        | 16 ++++++++++++++++
> >> > test/log/syslog_test_ndebug.c |  2 ++
> >> > 4 files changed, 42 insertions(+), 1 deletion(-)
> >> >
> >> >diff --git a/common/log_syslog.c b/common/log_syslog.c
> >> >index cf0dbba9bf5..149ff5af310 100644
> >> >--- a/common/log_syslog.c
> >> >+++ b/common/log_syslog.c
> >> >@@ -115,5 +115,4 @@ out:
> >> > LOG_DRIVER(syslog) = {
> >> >       .name   = "syslog",
> >> >       .emit   = log_syslog_emit,
> >> >-      .flags  = LOGDF_ENABLE,
> >>
> >> What does the flag removal change outside Python testing?
> >
> >If this driver is to be used on a board, you must call
> >log_device_set_enable().
>
> This would pervert the nice log driver system that you have provided. I definitively want syslog with vanilla code just by customizing.
>
> If you want to mute the network stack, then move it to use log and filter on the network uclass.

Well sandbox has a network but it fails to send syslog messages, which
is probably a good thing, at least without someone saying they want it
to happen.

>
> Or simply adjust the test that has hickups.

I don't like that idea because any test can produce log output.

Another option would be to only disable the device with sandbox, e.g.

#ifndef CONFIG_SANDBOX
   .flags  = LOGDF_ENABLE,
#endif

Regards,
Simon


More information about the U-Boot mailing list