Repository navigation
Done
Labels
enhancementNew feature or request
Description
Problem
- Noisy boot and test output:
Kernel::Shell::run()inkernel/shell/shell.cpprunsTests::run_lazy_memory_acceptance_suite()at boot before themilo>prompt, printing dozens of[INFO][test],[DEBUG][proc],[DEBUG][sys_proc],[TRACE][sched], and[DBG]lines.assert_test()inkernel/shell/tests/test_common.cppemits a full[INFO][test] [PASS] <name>line for every passing assertion across 40+ suites intest all, burying[FAIL]diagnostics inside subsystemDEBUG/TRACEchatter.
- No separation between console UX and forensic/debug logs:
- Currently
Kernel::Loginkernel/core/log.hpp/kernel/core/log.cpponly has a singleset_level()filter writing directly to the console. Lowering the log level to keep the console clean discards the detailedTRACE/DEBUG/INFOevents needed for post-mortem debugging and CI forensics.
- Currently
Proposed Behavior
1. Compact Console Output (Dot Progress + Failure Details)
- Boot &
test all/test <suite>:- Print
.for each passing assertion (wrapping cleanly, e.g., every 64 dots) andFon failure. - Suppress non-error console chatter (
TRACE/DEBUG/INFO) during compact test runs while keepingWARN/ERRORvisible. - At the end of the run, print a concise summary (
passed=<N> failed=<M>) followed by full details for any failed assertions only.
- Print
- Verbose opt-in: Support
-v/--verbose(e.g.test all -v,test <suite> -v) to stream full per-check[PASS]/[FAIL]and kernel logs live to the console when desired.
2. Full Forensic Log Capture (Standard Format, Off-Console)
- Decouple console level from capture level in
Kernel::Log(SinkWriterinkernel/core/log.hpp):- Always capture full
TRACE–ERRORlog records (with monotonic timestamp/tick, sequence number, level, tag, and message) into an in-memory kernel ring buffer regardless of the active console verbosity threshold. - Format records in a standard machine-readable format — e.g. JSON Lines (
.jsonl/ NDJSON) ({"seq":1,"ts_ns":123456,"level":"DEBUG","tag":"proc","msg":"..."}) or RFC 5424 syslog.
- Always capture full
- Access & export without cluttering the console:
- Add a
dmesg/logsshell command (e.g.logs,logs --tail <n>,logs --json,logs --level debug) to inspect captured logs on demand, plus automatic dump on kernel panic/fatal test failure. - Expose captured logs for host/EL0 forensics via one or both of:
- A VFS node (e.g.,
/dev/kmsgor/tmp/kmsg.jsonl/test_milolog output) readable from userspace. - An optional off-console QEMU sink (e.g., secondary UART/virtio-console or
-chardev fileinMakefile) somake run/ CI can persist full.jsonllogs tobuild/without polluting the interactivemilo>console.
- A VFS node (e.g.,
- Add a
Key Files
kernel/core/log.hpp&kernel/core/log.cpp(separate console level vs ring-buffer/off-console forensic sink, structured JSONL/syslog formatting)kernel/shell/tests/test_common.cpp(assert_test(), dot progress, failure buffering & summary)kernel/shell/shell.cpp(Kernel::Shell::run(),test all/test <suite>-vflag,dmesg/logscommand)Makefile(optional QEMU forensic log-chardev filewiring)user/test_milo.c(optional alignment for EL0 dot-progress /-v/ JSONL log dump)
Acceptance Criteria
- Booting to
milo>and runningtest alldisplays compact dot progress (.) for passes, suppressesTRACE/DEBUG/INFOconsole noise, and prints detailed diagnostics only for failures plus a finalpassed/failedsummary. - Full
TRACE–ERRORlogs (including boot and test execution) are captured in a standard structured format (.jsonlor RFC 5424) without cluttering the console. - Captured forensic logs can be inspected on demand (
logs/dmesgor exported file/chardev) and are automatically surfaced on panic or failure. - Verbose mode (
-v) still allows live detailed console output when debugging. -
make -j"$(nproc)" all && make -j"$(nproc)" qualitypasses with zero warnings, andtest allin QEMU reportsfailed=0.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(log,shell,tests): add dot-progress test runner and forensic JSON…
feat(log,shell,tests): add dot-progress test runner and forensic JSON…