diff options
author | jmmv <jmmv@FreeBSD.org> | 2014-03-19 12:46:04 +0000 |
---|---|---|
committer | jmmv <jmmv@FreeBSD.org> | 2014-03-19 12:46:04 +0000 |
commit | 6347abb8452f9f60737489ce782cf23fcd90354c (patch) | |
tree | bf59b42476e1a68940d50c9e4eef6e407f97449b /tools/regression/usr.bin/pkill/pgrep-t.t | |
parent | 26e1531d4b6d8a093b5044725d9af700963f7ca5 (diff) | |
download | FreeBSD-src-6347abb8452f9f60737489ce782cf23fcd90354c.zip FreeBSD-src-6347abb8452f9f60737489ce782cf23fcd90354c.tar.gz |
Migrate tools/regression/usr.bin/pkill to the new tests layout.
Interestingly, the pkill tool lives in bin, not usr.bin. Haven't bothered
to check if this is because the tool moved or because the tests were
originally added in the wrong place.
Diffstat (limited to 'tools/regression/usr.bin/pkill/pgrep-t.t')
-rw-r--r-- | tools/regression/usr.bin/pkill/pgrep-t.t | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tools/regression/usr.bin/pkill/pgrep-t.t b/tools/regression/usr.bin/pkill/pgrep-t.t deleted file mode 100644 index c1d0c2a..0000000 --- a/tools/regression/usr.bin/pkill/pgrep-t.t +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -base=`basename $0` - -echo "1..2" - -name="pgrep -t <tty>" -tty=`ps -o tty -p $$ | tail -1` -if [ "$tty" = "??" ]; then - tty="-" - ttyshort="-" -else - case $tty in - pts/*) ttyshort=`echo $tty | cut -c 5-` ;; - *) ttyshort=`echo $tty | cut -c 4-` ;; - esac -fi -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 -ln -sf /bin/sleep $sleep -$sleep 5 & -sleep 0.3 -chpid=$! -pid=`pgrep -f -t $tty $sleep` -if [ "$pid" = "$chpid" ]; then - echo "ok 1 - $name" -else - echo "not ok 1 - $name" -fi -pid=`pgrep -f -t $ttyshort $sleep` -if [ "$pid" = "$chpid" ]; then - echo "ok 2 - $name" -else - echo "not ok 2 - $name" -fi -kill $chpid -rm -f $sleep |