Skip to content

add logging validation helpers and Logging_Journalctl_Validation testcase#409

Open
smuppand wants to merge 2 commits intoqualcomm-linux:mainfrom
smuppand:logger
Open

add logging validation helpers and Logging_Journalctl_Validation testcase#409
smuppand wants to merge 2 commits intoqualcomm-linux:mainfrom
smuppand:logger

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

@smuppand smuppand commented Apr 17, 2026

Add reusable logging helpers in Runner/utils/lib_logger.sh and introduce
the Logging_Journalctl_Validation testcase under
Runner/suites/System/Logging/Logging_Journalctl_Validation.

This change keeps journald and log-file validation logic out of functestlib.sh and adds an end-to-end logging test that verifies:

  • systemd-journald service health
  • required logging tools
  • available /var/log sink files
  • custom logger message injection
  • message visibility in journalctl
  • message visibility in file-based logs
  • journal storage and boot-list sanity
  • unit-scoped journal queries
  • priority-based journal filtering

The testcase is LAVA-friendly and records PASS or FAIL in the result file while allowing subsequent steps to continue.

Lava job for reference on the execution - https://lava.infra.foundries.io/scheduler/job/181206#L2546

Introduce a dedicated lib_logger.sh to keep journald and log-file
validation helpers separate from functestlib.sh and avoid growing the
generic utility library further.

This adds reusable helpers for detecting active /var/log sinks, emitting
custom logger messages, verifying message visibility in journalctl and
file-based logs, checking journal storage and boot metadata, validating
unit-scoped queries, and exercising priority-based journal filtering.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Add a new system logging validation testcase under
Runner/suites/System/Logging/Logging_Journalctl_Validation to verify
that the target logging pipeline is working end to end.

The testcase checks systemd-journald service health, required tool
availability, available /var/log sinks, custom message injection through
logger, visibility in journalctl, visibility in file-based logs, journal
storage and boot-list sanity, unit-scoped retrieval, and priority-based
journal filtering, while writing PASS or FAIL to the result file for
LAVA-friendly execution flow.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant