From patchwork Mon Feb 17 06:43:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 236418 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Mon, 17 Feb 2020 07:43:08 +0100 Subject: [PATCH v4 0/6] log: syslog logging driver Message-ID: <20200217064314.67584-1-xypron.glpk@gmx.de> This patch series provides a logging driver to send syslog messages via UDP port 514 to a syslog server and a unit test for the syslog driver. For testing LOG_SYSLOG is enabled on the sandbox. For CONFIG_LOG=n a patch enables printf() or debug() output for log_* functions. A unit test for this use case is provided. v4: correct syslog test (expect 'uboot:' not 'uboot[1]:') provide more comments for syslog test Heinrich Schuchardt (6): log: correct CONFIG_LOG_TEST prerequisites log: syslog driver log: output for CONFIG_LOG=n test: log functions with CONFIG_LOG=n test: log: test syslog logging driver configs: sandbox: enable LOG_SYSLOG MAINTAINERS | 4 +- common/Kconfig | 9 +- common/Makefile | 1 + common/log_syslog.c | 117 ++++++++++++ configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 1 + doc/README.log | 3 + include/log.h | 10 +- include/test/log.h | 16 ++ include/test/suites.h | 1 + test/Kconfig | 9 + test/Makefile | 2 +- test/cmd_ut.c | 6 + test/log/Makefile | 14 ++ test/log/nolog_test.c | 135 ++++++++++++++ test/log/syslog_test.c | 280 +++++++++++++++++++++++++++++ test/log/test-main.c | 20 +++ 18 files changed, 621 insertions(+), 9 deletions(-) create mode 100644 common/log_syslog.c create mode 100644 include/test/log.h create mode 100644 test/log/nolog_test.c create mode 100644 test/log/syslog_test.c create mode 100644 test/log/test-main.c --- 2.25.0