mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Add an auxiliary subroutine to generate read(2) event while testing.
Reviewed by: gnn, ngie Differential Revision: https://reviews.freebsd.org/D11673
This commit is contained in:
parent
d83c70758a
commit
070a148127
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321466
@ -38,6 +38,14 @@
|
||||
##
|
||||
|
||||
|
||||
reader()
|
||||
{
|
||||
while true
|
||||
do
|
||||
sleep 0.1
|
||||
cat /etc/motd > /dev/null
|
||||
done
|
||||
}
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
echo expected one argument: '<'dtrace-path'>'
|
||||
@ -46,6 +54,9 @@ fi
|
||||
|
||||
dtrace=$1
|
||||
|
||||
reader &
|
||||
child=$!
|
||||
|
||||
$dtrace -qwf read'{chill(15); printf("Done chilling"); exit(0);}'
|
||||
status=$?
|
||||
|
||||
@ -53,4 +64,6 @@ if [ "$status" -ne 0 ]; then
|
||||
echo $tst: dtrace failed
|
||||
fi
|
||||
|
||||
kill $child
|
||||
|
||||
exit $status
|
||||
|
Loading…
Reference in New Issue
Block a user