2005-03-20 12:38:08 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
base=`basename $0`
|
|
|
|
|
|
|
|
echo "1..2"
|
|
|
|
|
2014-03-09 22:14:20 +00:00
|
|
|
exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')"
|
|
|
|
|
2005-03-20 12:38:08 +00:00
|
|
|
name="pgrep -S"
|
2014-03-09 22:14:20 +00:00
|
|
|
pid=`pgrep -Sx idle`
|
|
|
|
if [ "$pid" = "$exp_pid" ]; then
|
2005-03-20 12:38:08 +00:00
|
|
|
echo "ok 1 - $name"
|
|
|
|
else
|
|
|
|
echo "not ok 1 - $name"
|
|
|
|
fi
|
2014-03-09 22:14:20 +00:00
|
|
|
pid=`pgrep -x idle`
|
|
|
|
if [ "$pid" != "$exp_pid" ]; then
|
2005-03-20 12:38:08 +00:00
|
|
|
echo "ok 2 - $name"
|
|
|
|
else
|
|
|
|
echo "not ok 2 - $name"
|
|
|
|
fi
|