git: 07b1ea961af7 - main - renice: Force /bin/sh usage on su calls for the regression tests.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 13 Oct 2022 15:33:33 UTC
The branch main has been updated by olivier (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=07b1ea961af77d728dfef4d0a11f98a8ab2fe226 commit 07b1ea961af77d728dfef4d0a11f98a8ab2fe226 Author: Olivier Cochard <olivier@FreeBSD.org> AuthorDate: 2022-10-13 15:23:54 +0000 Commit: Olivier Cochard <olivier@FreeBSD.org> CommitDate: 2022-10-13 15:32:47 +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 --- 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 323fe44591c8..9321e0f327ae 100644 --- a/usr.bin/renice/tests/renice_test.sh +++ b/usr.bin/renice/tests/renice_test.sh @@ -97,7 +97,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 @@ -112,7 +112,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