The branch stable/13 has been updated by des:

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

commit 9f5c2e34f226a7ffd04a71dfb5e9c7f358068607
Author:     Olivier Cochard <[email protected]>
AuthorDate: 2022-10-13 15:23:54 +0000
Commit:     Dag-Erling Smørgrav <[email protected]>
CommitDate: 2024-01-21 16:11:08 +0000

    renice: Force /bin/sh usage on su calls for the regression tests.
    
    If the root account is configured to use a different shell than sh,
    it fails to retreive the pid of the background process.
    
    Approved by:    des
    Obtained from:  chs
    Sponsored by:   Netflix
    Differential Revision:  https://reviews.freebsd.org/D36930
    
    (cherry picked from commit 07b1ea961af77d728dfef4d0a11f98a8ab2fe226)
---
 usr.bin/renice/tests/renice_test.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.bin/renice/tests/renice_test.sh 
b/usr.bin/renice/tests/renice_test.sh
index feb07a6af825..8a4df7879ad4 100755
--- a/usr.bin/renice/tests/renice_test.sh
+++ b/usr.bin/renice/tests/renice_test.sh
@@ -90,7 +90,7 @@ renice_abs_user_head() {
 }
 renice_abs_user_body() {
        local user pid nice incr
-       pid=$(su -m $TEST_USER -c "sleep 60 >/dev/null & echo \$!")
+       pid=$(su -m $TEST_USER -c "/bin/sh -c 'sleep 60 >/dev/null & echo \$!'")
        nice="$(ps -o nice= -p $pid)"
        incr=3
        _renice $((nice+incr)) -u $TEST_USER
@@ -105,7 +105,7 @@ renice_rel_user_head() {
 }
 renice_rel_user_body() {
        local user pid nice incr
-       pid=$(su -m $TEST_USER -c "sleep 60 >/dev/null & echo \$!")
+       pid=$(su -m $TEST_USER -c "/bin/sh -c 'sleep 60 >/dev/null & echo \$!'")
        nice="$(ps -o nice= -p $pid)"
        incr=3
        _renice -u -n $incr $TEST_USER

Reply via email to