Monitor serial console message during (e.g.) boot/shutdown #907
Replies: 2 comments 3 replies
-
What about checking the kernel messages after the login with If the messages are really only visible on the console during boot/shutdown, I guess you could also use
..to catch messages. |
Beta Was this translation helpful? Give feedback.
-
I agree that we are currently missing a good interface to retrieve the boot log messages from the kernel during system boot up. This all ties into a bigger issue with our current logging infrastructure, namely that serialization/deserialization is none existant and all log messages have arbitrary formats. We also currently only use them for debugging and have the steps information for internal data. I don't think we need a dedicated driver, but rather should rework the logging story for labgrid. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
we are using labgrid now for quite a while in BSP development and testing of different custom boards. As probably most users, we mainly use the serial console to control our targets. While executing commands works fine in our automated test cases, we often come to the point that we also need to monitor the serial console output while the device is booting. As an example, if I change something in the kernel or bootloader as a developer, the first thing I do on the DUT is to check the serial console output if I see anything unexpected during the boot process. Or sometimes you fix a bug and verify it by not seeing a specific kernel output anymore (because the actual effect of the bug is hard to measure).
There are probably many more cases where the "cheapest" indicator for presence or absence of errors are console messages printed during boot/shutdown. And exactly for those cases it would be good to have automated test cases for.
An approach could be to write a new driver, maybe called
SerialScanner
. This driver binds to aSerialDriver
, just like aShellDriver
orUBootDriver
. The driver then offers calls to check that a series of strings appears within a specified timeout, or that some specified strings do not appear. Both should be implementable using theexpect
method of theConsoleProtocol
.Is this something that might be useful for other people as well? Or is this even possible already with labgrid and I have overlooked something?
Beta Was this translation helpful? Give feedback.
All reactions