ZTS: include microsecond timestamps on all output#17045
ZTS: include microsecond timestamps on all output#17045robn wants to merge 2 commits intoopenzfs:masterfrom
Conversation
ed7589e to
d0562f8
Compare
|
"03:04:46.89 [2025-02-16T03:04:46.898708]" looks duplicate and excessively verbose. I suspect you meant to add the timestamps in some places where they weren't, but seems now there are places when they are duplicate. And BTW, the CI seems very unhappy for some reason. |
d0562f8 to
4b62c60
Compare
This doesn't happen locally. Might be something in the CI runner adding timestamps? I'll look soon. |
|
@robn can you rebase this and see if that fixes the CI problems? |
4b62c60 to
a6d6ffa
Compare
|
Done. I did have a very short look and decided the extra bit might have been the CI proper, but I had no big ideas and haven't had time to get back to it properly yet. So lets see, either this will work or give me a new data point. Cheers :) |
|
If you need a reproducer - |
|
Yeah, while comparing the output of typeset out="$(log_must eval "zpool add -n '$TESTPOOL' $add" | \
sed /^SUCCESS/d)"
if [[ "$out" != "$want" ]]; then
log_fail "Got:\n" "$out" "\nbut expected:\n" "$want"
fiIf the output of |
|
Just wondering if - sed /^SUCCESS/d)"
+ sed /.*SUCCESS/d)"would fix the test failure. |
|
Good find, thanks. I think I don't like that pattern - I don't like a test that is dependent on the output of the test framework it's running inside. There's only three instances in the whole test suite, so I'll rework them to just say what they mean. |
|
Yeah, agreed. At least I cleaned up my mess in #17198. |
a6d6ffa to
92f6b69
Compare
|
Rebased onto #17198 and those three tests now pass. Pushed, lets see how it goes. |
92f6b69 to
f0a4068
Compare
f0a4068 to
28af226
Compare
|
It is still somehow double-stamped in CI: |
|
Forgot to mention, that I'm seeing the short timestamps as well. Seems not to be CI related. This is on a somewhat current |
|
@amotin found that the extra timestamp comes from the Github CI infrastructure, and maybe we can turn that off and just use our own |
28af226 to
27f72e4
Compare
|
Rebased and pushed; I just wanna get a fresh look at it. |
27f72e4 to
8a9460a
Compare
|
Last push fixes it, I hope! Turns out the Maybe it'd be better to audit all those places and do something different, but its sort of also running into the limits of what this shellish contraption can do. So instead I've wired a suppression through with an environment variable. Limited local testing suggests its plausible; I've got a full ZTS run in progress and of course CI is cruising, lets see what shakes out. |
|
Last push updates the CI to only prefix output with runner name & test number, using the timestamps emitted directly from the test: @mcmilk does this work for you? I couldn't see a great reason to continue doing the timestamps in the CI side when the more granular ones are already in the captured output, but I'm also fairly ambivalent, so if you feel strongly I can put it back exactly how it was, just updating the |
This look okay, but is their a chance of displaying not the current datetime but the test "test running time". |
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
91d2a95 to
1f40538
Compare
|
Ahh, never mind. I just realised this is only changing the summary; the full output is still there in the full test log. That's all I need. So I've just pushed an update to the original; matching the new timestamps and removing them. |
Yes - thank you. |
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17045
|
Thanks all, really pleased about this one! |
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
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. This adds timestamps to ZTS output to help with this, in three places: - all of the standard log_XXX functions ultimately end up in _printline, which now prefixes output with a timestamp. An escape hatch environment variable is provided for user_cmd, which often calls the logging functions while also depending on the captured output. - the test runner logging function log() also now prefixes its output with a timestamp. - on failure, when capturing the kernel log in zfs_dmesg.ksh, the "iso" time format is requested. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
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. This adds timestamps to ZTS output to help with this, in three places: - all of the standard log_XXX functions ultimately end up in _printline, which now prefixes output with a timestamp. An escape hatch environment variable is provided for user_cmd, which often calls the logging functions while also depending on the captured output. - the test runner logging function log() also now prefixes its output with a timestamp. - on failure, when capturing the kernel log in zfs_dmesg.ksh, the "iso" time format is requested. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
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. This adds timestamps to ZTS output to help with this, in three places: - all of the standard log_XXX functions ultimately end up in _printline, which now prefixes output with a timestamp. An escape hatch environment variable is provided for user_cmd, which often calls the logging functions while also depending on the captured output. - the test runner logging function log() also now prefixes its output with a timestamp. - on failure, when capturing the kernel log in zfs_dmesg.ksh, the "iso" time format is requested. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
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. This adds timestamps to ZTS output to help with this, in three places: - all of the standard log_XXX functions ultimately end up in _printline, which now prefixes output with a timestamp. An escape hatch environment variable is provided for user_cmd, which often calls the logging functions while also depending on the captured output. - the test runner logging function log() also now prefixes its output with a timestamp. - on failure, when capturing the kernel log in zfs_dmesg.ksh, the "iso" time format is requested. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045 (cherry picked from commit e985e14)
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045 (cherry picked from commit 3ad7eaa)
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
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. This adds timestamps to ZTS output to help with this, in three places: - all of the standard log_XXX functions ultimately end up in _printline, which now prefixes output with a timestamp. An escape hatch environment variable is provided for user_cmd, which often calls the logging functions while also depending on the captured output. - the test runner logging function log() also now prefixes its output with a timestamp. - on failure, when capturing the kernel log in zfs_dmesg.ksh, the "iso" time format is requested. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
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. This adds timestamps to ZTS output to help with this, in three places: - all of the standard log_XXX functions ultimately end up in _printline, which now prefixes output with a timestamp. An escape hatch environment variable is provided for user_cmd, which often calls the logging functions while also depending on the captured output. - the test runner logging function log() also now prefixes its output with a timestamp. - on failure, when capturing the kernel log in zfs_dmesg.ksh, the "iso" time format is requested. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
Adjust the regexes to match the test line with timestamps, then remove them for the summary. The internal timestamp is still in the full logs. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes openzfs#17045
[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_XXXfunctions ultimately end up in_printline, which now prefixes output with a timestamp.log()also now prefixes its output with a timestamp.zfs_dmesg.ksh, theisotime format is requested. This is gated behind a platform check, as FreeBSD'sdmesghas 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.