[PATCH v2 0/9] log: don't build the trace buffer when log is not ready

Patrick Delaunay patrick.delaunay at st.com
Fri Nov 27 11:20:50 CET 2020


It is the V2 of [1], rebased and with added tests.

To allow test (with console record), I replace the debug uart
function used to display the dropped messages printascii() by
the console generic function puts().

This function allows to support all the features defined in
console.c (as DEBUG_UART, PRE_CONSOLE_BUFFER, CONSOLE_RECORD)
without duplicate them (no more nedd to test CONFIG_DEBUG_UART
for example).

PS: I don't sure that the added trace added for test in
    arch/sandbox/cpu/start.c = "sandbox: starting..."
    is not disturbing.
    see patch 5 = "test: add test for dropped trace before log_init"

[1] http://patchwork.ozlabs.org/project/uboot/list/?series=212739


Changes in v2:
- Add test for LOGL_FORCE_DEBUG (NEW)
- add test to count the dropped messages (NEW)
- replace printascii by console puts, remove test on CONFIG_DEBUG_UART
- Add test of displayed messages requested before log_init (NEW)
- update gd test in console function puts and putc (cosmetic)
- Record all messages in console, even when dropped (NEW)
- added test for content of dropped messages (NEW)

Patrick Delaunay (9):
  test: add LOGL_FORCE_DEBUG flags support in log tests
  log: don't build the trace buffer when log is not ready
  test: log: add test for dropped messages
  log: use console puts to output trace before LOG init
  test: add test for dropped trace before log_init
  console: remove duplicated test on gd value
  console: allow to record console output before ready
  test: log: add test for console output of dropped messages
  log: call vsnprintf only when it is needed to emit trace

 arch/sandbox/cpu/start.c  |  5 +++
 common/console.c          | 32 ++++++++---------
 common/log.c              | 40 +++++++++++++++------
 test/log/log_test.c       | 76 +++++++++++++++++++++++++++++++--------
 test/py/tests/test_log.py | 11 ++++++
 5 files changed, 122 insertions(+), 42 deletions(-)

-- 
2.17.1



More information about the U-Boot mailing list