Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2025 18:24:51 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: da89500adbea - main - rc_subr_test: Bump some sleep timeouts
Message-ID:  <202507131824.56DIOpn0043823@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=da89500adbea360533d2442a674c8af0741b7ff1

commit da89500adbea360533d2442a674c8af0741b7ff1
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-07-13 15:08:00 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-07-13 18:24:36 +0000

    rc_subr_test: Bump some sleep timeouts
    
    The test verifies that the rc framework will OOM-protect a process
    spawned by rc.  It just wraps a 5-second /bin/sleep invocation as part
    of this test.
    
    The rc framework uses procctl to set the OOM-protect bit after the
    process has started, i.e., it uses procctl -p.  So, with a 5 second
    timeout, it's possible for the process to exit before procctl actually
    runs, if the system is heavily loaded.  (I see this failure occasionally
    with KMSAN configured and many tests running in parallel.)
    
    Bump the timeout to reduce the risk of this happening.  The timeout
    value is arbitrary since the test will stop the rc process, i.e., we
    don't have to wait for 60 seconds to elapse before the test passes.
    
    MFC after:      1 week
---
 libexec/rc/tests/rc_subr_test.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libexec/rc/tests/rc_subr_test.sh b/libexec/rc/tests/rc_subr_test.sh
index 60f77c2c2de3..9931389e7a02 100644
--- a/libexec/rc/tests/rc_subr_test.sh
+++ b/libexec/rc/tests/rc_subr_test.sh
@@ -52,7 +52,7 @@ oomprotect_all_body()
 	_rc_arg="$4"
 	setvar "${name}_oomprotect" all
 	command="/usr/sbin/daemon"
-	command_args="-P $pidfile -p $_childpidfile -- /bin/sleep 5"
+	command_args="-P $pidfile -p $_childpidfile -- /bin/sleep 60"
 	run_rc_command "$_rc_arg"
 	LITERAL
 
@@ -92,7 +92,7 @@ oomprotect_yes_body()
 	setvar "${name}_oomprotect" yes
 	procname="/bin/sleep"
 	command="/usr/sbin/daemon"
-	command_args="-p $pidfile -- $procname 5"
+	command_args="-p $pidfile -- $procname 60"
 	run_rc_command "$_rc_arg"
 	LITERAL
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507131824.56DIOpn0043823>