Skip to content

Introduce serial monitor - #66

Merged
robertbaldyga merged 5 commits into
Open-CAS:masterfrom
robertbaldyga:serial-monitor
Oct 18, 2026
Merged

robertbaldyga merged 5 commits into
Open-CAS:masterfrom
robertbaldyga:serial-monitor

Conversation

@robertbaldyga

Copy link
Copy Markdown
Member

No description provided.

Output redirection applied only to the last command of a compound one,
so its earlier parts kept the session output open and the call blocked
until they finished. Run the command in a subshell to redirect it as a
whole. A simple command is executed by the subshell directly, so the
returned PID is still the command's one.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Since the ProxyJump support the connection uses 'host', and a config
with only 'ip' has been blocked, drop the 'ip' field entirely and
require 'host'. The DUT IP is always resolved from the host.

Name per-DUT log directories after the host instead of the IP, so they
match the DUT config.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Command log is a single timeline for all DUTs, so to distinguish between
commands executed on each DUT, mark each command with the DUT host name.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Collect DUT serial console output into dut_info/<host>/serial.log using
the libvirt console stream, the same way 'virsh console' does. Output
is written as it arrives, so it survives a hung DUT or a crashed
controller. Step markers are inserted into the log to correlate it
with the test flow.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Scan serial console output for kernel warnings and bugs. Warnings are
reported in the test log at the next test step and the test continues.
A bug interrupts the test by injecting an exception into the test
thread with a signal, which also breaks blocking calls, e.g. waiting
for a command hung by the bug. The exception is raised only within
pytest's runtest hook call, otherwise it is deferred to the next step.

Add expect() for tests triggering kernel messages on purpose.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
@robertbaldyga
robertbaldyga merged commit 2b892ca into Open-CAS:master Oct 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant