Date: Tue, 25 Jul 2017 13:01:10 +0000 (UTC) From: Li-Wen Hsu <lwhsu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321466 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil Message-ID: <201707251301.v6PD1A2b085443@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lwhsu (ports committer) Date: Tue Jul 25 13:01:10 2017 New Revision: 321466 URL: https://svnweb.freebsd.org/changeset/base/321466 Log: Add an auxiliary subroutine to generate read(2) event while testing. Reviewed by: gnn, ngie Differential Revision: https://reviews.freebsd.org/D11673 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh Tue Jul 25 12:58:03 2017 (r321465) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh Tue Jul 25 13:01:10 2017 (r321466) @@ -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,11 +54,16 @@ fi dtrace=$1 +reader & +child=$! + $dtrace -qwf read'{chill(15); printf("Done chilling"); exit(0);}' status=$? if [ "$status" -ne 0 ]; then echo $tst: dtrace failed fi + +kill $child exit $status
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707251301.v6PD1A2b085443>