Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147054204
D43087.id131609.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D43087.id131609.diff
View Options
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
@@ -14,8 +14,9 @@
atf_check_nice_value() {
local pid=$1
- local nice=$2
- atf_check test "$(ps -o nice= -p $pid)" -eq "$nice"
+ local expected=$2
+ local actual="$(ps -o nice= -p $pid)"
+ atf_check test "$actual" -eq "$expected"
}
atf_test_case renice_abs_pid
@@ -57,7 +58,7 @@
renice_abs_pgid_body() {
local pid pgid nice incr
# make sure target runs in a different pgrp than ours
- pid=$(sh -mc "sleep 60 >/dev/null & echo \$!")
+ pid="$(sh -mc "sleep 60 >/dev/null & echo \$!")"
pgid="$(ps -o pgid= -p $pid)"
nice="$(ps -o nice= -p $pid)"
incr=3
@@ -73,7 +74,7 @@
renice_rel_pgid_body() {
local pid pgid nice incr
# make sure target runs in a different pgrp than ours
- pid=$(sh -mc "sleep 60 >/dev/null & echo \$!")
+ pid="$(sh -mc "sleep 60 >/dev/null & echo \$!")"
pgid="$(ps -o pgid= -p $pid)"
nice="$(ps -o nice= -p $pid)"
incr=3
@@ -90,7 +91,7 @@
}
renice_abs_user_body() {
local user pid nice incr
- pid=$(su -m $TEST_USER -c "/bin/sh -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 +106,7 @@
}
renice_rel_user_body() {
local user pid nice incr
- pid=$(su -m $TEST_USER -c "/bin/sh -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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 8, 10:52 PM (19 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29421981
Default Alt Text
D43087.id131609.diff (1 KB)
Attached To
Mode
D43087: renice: Clean up the tests a bit.
Attached
Detach File
Event Timeline
Log In to Comment