diff options
Diffstat (limited to 'tools/regression/usr.bin')
-rw-r--r-- | tools/regression/usr.bin/pkill/pgrep-F.t | 7 | ||||
-rw-r--r-- | tools/regression/usr.bin/pkill/pkill-F.t | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/tools/regression/usr.bin/pkill/pgrep-F.t b/tools/regression/usr.bin/pkill/pgrep-F.t index a4c1c6c..b9d844c 100644 --- a/tools/regression/usr.bin/pkill/pgrep-F.t +++ b/tools/regression/usr.bin/pkill/pgrep-F.t @@ -9,16 +9,15 @@ name="pgrep -F <pidfile>" pidfile=`mktemp /tmp/$base.XXXXXX` || exit 1 sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 ln -sf /bin/sleep $sleep -$sleep 5 & +daemon -p $pidfile $sleep 5 sleep 0.3 -chpid=$! -echo $chpid > $pidfile +chpid=`cat $pidfile` pid=`pgrep -f -F $pidfile $sleep` if [ "$pid" = "$chpid" ]; then echo "ok - $name" else echo "not ok - $name" fi -kill $chpid +kill "$chpid" rm -f $pidfile rm -f $sleep diff --git a/tools/regression/usr.bin/pkill/pkill-F.t b/tools/regression/usr.bin/pkill/pkill-F.t index 732d807..ebde428 100644 --- a/tools/regression/usr.bin/pkill/pkill-F.t +++ b/tools/regression/usr.bin/pkill/pkill-F.t @@ -9,9 +9,8 @@ name="pkill -F <pidfile>" pidfile=`mktemp /tmp/$base.XXXXXX` || exit 1 sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 ln -sf /bin/sleep $sleep -$sleep 5 & +daemon -p $pidfile $sleep 5 sleep 0.3 -echo $! > $pidfile pkill -f -F $pidfile $sleep ec=$? case $ec in |