git: 74c5995d2e8d - stable/15 - syslogd/tests: Amend a test to catch leaked process descriptors
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Sep 2026 08:35:26 UTC
The branch stable/15 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=74c5995d2e8d8639fdc723561f06a82ab86ee9c4
commit 74c5995d2e8d8639fdc723561f06a82ab86ee9c4
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-09-02 14:33:37 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-09-09 08:34:33 +0000
syslogd/tests: Amend a test to catch leaked process descriptors
This serves to catch the regression fixed by commit
1a669b66ddb4 ("syslogd: reap pipe children on config reload").
MFC after: 1 week
(cherry picked from commit 231dfc99a08874c269593c2e491ce16a618f4ed6)
---
usr.sbin/syslogd/tests/syslogd_test.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/usr.sbin/syslogd/tests/syslogd_test.sh b/usr.sbin/syslogd/tests/syslogd_test.sh
index d17152f69bfc..0fba9b910a17 100644
--- a/usr.sbin/syslogd/tests/syslogd_test.sh
+++ b/usr.sbin/syslogd/tests/syslogd_test.sh
@@ -335,6 +335,7 @@ pipe_action_reload_head()
pipe_action_reload_body()
{
local pipecmd="${PWD}/pipe_cmd.sh"
+ local pid
cat <<__EOF__ > "${pipecmd}"
#!/bin/sh
@@ -351,15 +352,21 @@ __EOF__
syslogd_start
syslogd_log -p user.debug -t "pipe" -h "${SYSLOGD_LOCAL_SOCKET}" "MSG"
+ sleep 0.1
+
+ pid=$(cat "${SYSLOGD_PIDFILE}")
atf_check pkill -HUP -F "${1:-${SYSLOGD_PIDFILE}}"
sleep 0.1
syslogd_check_log_nopoll "END"
+
+ atf_check -o not-match:"[[:space:]]P[[:space:]]" procstat files "${pid}"
}
pipe_action_reload_cleanup()
{
syslogd_stop
}
+
atf_test_case "jail_noinet" "cleanup"
jail_noinet_head()
{