diff --git a/usr.bin/renice/tests/renice_test.sh b/usr.bin/renice/tests/renice_test.sh --- a/usr.bin/renice/tests/renice_test.sh +++ b/usr.bin/renice/tests/renice_test.sh @@ -97,7 +97,7 @@ } 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_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