Add an auxiliary subroutine to generate some events for testing
This test is also timeout on a quiet system because there is nobody triggering read probefunc while test execution. Reviewed by: gnn, markj, ngie Differential Revision: https://reviews.freebsd.org/D11731
This commit is contained in:
parent
cea9310d4e
commit
ad89d783a6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321518
@ -39,6 +39,15 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
|
|
||||||
|
reader()
|
||||||
|
{
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
sleep 0.1
|
||||||
|
cat /etc/motd > /dev/null
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
if [ $# != 1 ]; then
|
if [ $# != 1 ]; then
|
||||||
echo expected one argument: '<'dtrace-path'>'
|
echo expected one argument: '<'dtrace-path'>'
|
||||||
exit 2
|
exit 2
|
||||||
@ -46,6 +55,9 @@ fi
|
|||||||
|
|
||||||
dtrace=$1
|
dtrace=$1
|
||||||
|
|
||||||
|
reader &
|
||||||
|
child=$!
|
||||||
|
|
||||||
$dtrace -qZf wassup'{printf("Iamkool");}' \
|
$dtrace -qZf wassup'{printf("Iamkool");}' \
|
||||||
-qf read'{printf("I am done"); exit(0);}'
|
-qf read'{printf("I am done"); exit(0);}'
|
||||||
|
|
||||||
@ -55,4 +67,6 @@ if [ "$status" -ne 0 ]; then
|
|||||||
echo $tst: dtrace failed
|
echo $tst: dtrace failed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
kill $child
|
||||||
|
|
||||||
exit $status
|
exit $status
|
||||||
|
Loading…
Reference in New Issue
Block a user