feat(muxpi): Record the time when the DUT has been rebooted #350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_mtim
to 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).