Page MenuHomeFreeBSD

D47650.1782745120.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D47650.1782745120.diff

diff --git a/usr.sbin/syslogd/tests/syslogd_test.sh b/usr.sbin/syslogd/tests/syslogd_test.sh
--- a/usr.sbin/syslogd/tests/syslogd_test.sh
+++ b/usr.sbin/syslogd/tests/syslogd_test.sh
@@ -105,10 +105,15 @@
basic_head()
{
atf_set descr "Messages are logged via supported transports"
+ if [ $(sysctl -n kern.features.inet) -eq 0 ] &&
+ [ $(sysctl -n kern.features.inet6) -eq 0]; then
+ atf_skip "Kernel does not support INET and INET6"
+ fi
}
basic_body()
{
- logfile="${PWD}/basic.log"
+ local logfile="${PWD}/basic.log"
+
printf "user.debug\t${logfile}\n" > "${SYSLOGD_CONFIG}"
syslogd_start
@@ -117,18 +122,16 @@
atf_check -s exit:0 -o match:"basic: hello, world \(unix\)" \
tail -n 1 "${logfile}"
- # Grab kernel configuration file.
- sysctl kern.conftxt > conf.txt
-
- # We have INET transport; make sure we can use it.
- if grep -qw "INET" conf.txt; then
+ if [ $(sysctl -n kern.features.inet) -ne 0 ]; then
+ # We have INET transport; make sure we can use it.
syslogd_log -4 -p user.debug -t basic -h 127.0.0.1 -P "${SYSLOGD_UDP_PORT}" \
"hello, world (v4)"
atf_check -s exit:0 -o match:"basic: hello, world \(v4\)" \
tail -n 1 "${logfile}"
fi
- # We have INET6 transport; make sure we can use it.
- if grep -qw "INET6" conf.txt; then
+
+ if [ $(sysctl -n kern.features.inet6) -ne 0 ]; then
+ # We have INET6 transport; make sure we can use it.
syslogd_log -6 -p user.debug -t basic -h ::1 -P "${SYSLOGD_UDP_PORT}" \
"hello, world (v6)"
atf_check -s exit:0 -o match:"basic: hello, world \(v6\)" \

File Metadata

Mime Type
text/plain
Expires
Mon, Jun 29, 2:58 PM (3 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28986260
Default Alt Text
D47650.1782745120.diff (1 KB)

Event Timeline