New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log ZTS test name to dmesg #10944
Log ZTS test name to dmesg #10944
Conversation
79dbf6d
to
6734bcf
Compare
@@ -279,6 +279,10 @@ function default_setup_noexit | |||
typeset no_mountpoint=$4 | |||
log_note begin default_setup_noexit | |||
|
|||
# Crudely log to dmesg which test we're running for post-mortem | |||
me=`ps a | grep -Eo '[^ ]+ksh$' | head -n 1` | |||
echo "ZTS: running $me" > /dev/kmsg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is very Linux-specific are you sure it isn't easier and more portable to use logger
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent here is to see the test names interspersed with kernel messages in dmesg so I can see where which test is causing the __kernel_write()
error in #10940. I don't think logger
can log to the dmesg log.
6734bcf
to
309409d
Compare
Most Linux distros use something like rsyslog with the imklog plugin that copies the messages from the kernel log into a file or files in /var/log. For example, /var/log/kern.log* Some Linux distros also have restrictions on what logger can do, for example whether you can log to kern facility. But that is a logger restriction, not a syslog restriction. In illumos, dmesg simply does tail on some /var/adm (nee /var/log) files. I'm not sure about FreeBSD. In any case, you can make this more portable the simple way by using logger, or more complicated by checking for is_linux and if not use logger. |
921e237
to
115cd16
Compare
Log each test name to dmesg to help post-mortem test failures. Specifically, to help debug openzfs#10940. Signed-off-by: Tony Hutter <hutter2@llnl.gov>
115cd16
to
9d10660
Compare
Closing as stale. The original #10940 issue is understood, we can open a new PR with a more generic version of this if it's something we decide is useful. |
Motivation and Context
DO NOT REVIEW OR PULL - THIS IS JUST TO HELP DEBUG #10940.
Description
Log ZTS test name to dmesg.
How Has This Been Tested?
Tested on a VM
Types of changes
Checklist:
Signed-off-by
.