git: a64d17f24c43 - releng/15.1 - syslogd/tests: Amend a test to catch leaked process descriptors
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 29 Sep 2026 15:59:59 UTC
The branch releng/15.1 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=a64d17f24c4397aeefc2aed30384ecbc41e38c2d
commit a64d17f24c4397aeefc2aed30384ecbc41e38c2d
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-09-02 14:33:37 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-09-28 13:10:45 +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").
Approved by: so
Security: FreeBSD-EN-26:23.syslogd
MFC after: 1 week
(cherry picked from commit 231dfc99a08874c269593c2e491ce16a618f4ed6)
(cherry picked from commit 74c5995d2e8d8639fdc723561f06a82ab86ee9c4)
---
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 1f235c476c49..99f791a0e9c7 100644
--- a/usr.sbin/syslogd/tests/syslogd_test.sh
+++ b/usr.sbin/syslogd/tests/syslogd_test.sh
@@ -313,6 +313,7 @@ pipe_action_reload_head()
pipe_action_reload_body()
{
local pipecmd="${PWD}/pipe_cmd.sh"
+ local pid
cat <<__EOF__ > "${pipecmd}"
#!/bin/sh
@@ -329,15 +330,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()
{