ZTS: include microsecond timestamps on all output #17045
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.
[Sponsors: Klara, Inc., Wasabi Technology, Inc.]
Motivation and Context
When reviewing test output after a failure, it's often quite difficult to work out the order and timing of events, and to correlate test suite output with kernel logs.
Description
This adds timestamps to ZTS output to help correlate events:
log_XXX
functions ultimately end up in_printline
, which now prefixes output with a timestamp.log()
also now prefixes its output with a timestamp.zfs_dmesg.ksh
, theiso
time format is requested. This is gated behind a platform check, as FreeBSD'sdmesg
has no switches to control timestamps.How Has This Been Tested?
Manually, running a test I know fails in my test VMs and considering the output.
(fyi, this test fails because the VM has no network support at all, not even a loopback. It's no big deal)
Types of changes
Checklist:
Signed-off-by
.