feat(muxpi): Record the time when the DUT has been rebooted#350
feat(muxpi): Record the time when the DUT has been rebooted#350thp-canonical wants to merge 1 commit intocanonical:mainfrom
Conversation
plars
left a comment
There was a problem hiding this comment.
I don't think I fully understand how this would be used, since it's getting a timestamp before the hardreset commands are called - which themselves often include a delay which can be different depending on the device. I'm curious why you wouldn't use bootchart or systemd-analyze or something? Or even just logging the time, rebooting, and then getting the difference after boot during the test phase so that it's in a more stable state than it would be during provisioning?
I'm not opposed to it, so please don't take it that way, I just don't think I completely understand the intended use. For it to be useful to anyone, we would need to find a good place to document this and preferably with some tools or examples for making use of it in jobs.
|
Reviewed 2026-01-06 during a clean-up activity; If this is still needed, please open a new issue. |
Description
This is a proposal for creating a timestamp file at the time where the DUT is rebooted, so that tests that want to measure boot times will have a reference timestamp.
With this change, the testing code can
stat(2)the file and compare thest_mtimto the current time and get a better estimate of the full boot time (including low-level boot loaders, second-stage boot loaders and early kernel loading).Using e.g. the device's uptime wouldn't take early bootloader stages into account, hence if those stages take too long, this isn't captured with uptime, so having the time when the device was "powered on" (hard-reset) would be good.
This is just an implementation proposal, it might be that such facilities already exist.
Resolved issues
Documentation
Not documented at the moment.
Web service API changes
None.
Tests
This has not been tested. I also haven't checked if the file would be cleared when a new provisioning session is started (it might be that we need to force-delete an existing file if it exists).