mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
tests: kern: improve logsigexit test
Use dmesg(8) instead rather than relying on a particular syslogd configuration, and just skip the test if we can't access the msgbuf. While we're here, remove some debugging output that we don't actually need.
This commit is contained in:
parent
1d69498623
commit
1a2a0db0a9
@ -8,6 +8,10 @@ atf_test_case basic
|
||||
basic_body()
|
||||
{
|
||||
|
||||
if ! dmesg >/dev/null 2>&1; then
|
||||
atf_skip "No dmesg(8) access"
|
||||
fi
|
||||
|
||||
# SIGABRT carefully chosen to avoid issues when run under Kyua. No
|
||||
# matter the value of the global kern.logsigexit, these should force
|
||||
# the messages as appropriate and we'll all be happy.
|
||||
@ -22,12 +26,9 @@ basic_body()
|
||||
read enpid < enabled.out
|
||||
read dispid < disabled.out
|
||||
|
||||
1>&2 echo "$enpid"
|
||||
1>&2 echo "$dispid"
|
||||
|
||||
atf_check grep -Eq "$enpid.+exited on signal" /var/log/messages
|
||||
atf_check -s not-exit:0 \
|
||||
grep -Eq "$dispid.+exited on signal" /var/log/messages
|
||||
atf_check -o save:dmesg.out dmesg
|
||||
atf_check grep -Eq "$enpid.+exited on signal" dmesg.out
|
||||
atf_check -s not-exit:0 grep -Eq "$dispid.+exited on signal" dmesg.out
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
|
Loading…
Reference in New Issue
Block a user