1#!/bin/sh 2 3base=`basename $0` 4 5echo "1..2" 6 7name="pkill -U <uid>" 8ruid=`id -ur` 9sleep=$(pwd)/sleep.txt 10ln -sf /bin/sleep $sleep 11$sleep 5 & 12sleep 0.3 13pkill -f -U $ruid $sleep 14ec=$? 15case $ec in 160) 17 echo "ok 1 - $name" 18 ;; 19*) 20 echo "not ok 1 - $name" 21 ;; 22esac 23rm -f $sleep 24 25name="pkill -U <user>" 26ruid=`id -urn` 27sleep=$(pwd)/sleep.txt 28ln -sf /bin/sleep $sleep 29$sleep 5 & 30sleep 0.3 31pkill -f -U $ruid $sleep 32ec=$? 33case $ec in 340) 35 echo "ok 2 - $name" 36 ;; 37*) 38 echo "not ok 2 - $name" 39 ;; 40esac 41rm -f $sleep 42