From owner-svn-src-head@freebsd.org Wed Jul 26 12:07:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FB30DBCF3F; Wed, 26 Jul 2017 12:07:47 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44AFFF77; Wed, 26 Jul 2017 12:07:47 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6QC7kEr057834; Wed, 26 Jul 2017 12:07:46 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6QC7kgO057833; Wed, 26 Jul 2017 12:07:46 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201707261207.v6QC7kgO057833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 26 Jul 2017 12:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321518 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil X-SVN-Commit-Revision: 321518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 12:07:47 -0000 Author: lwhsu (ports committer) Date: Wed Jul 26 12:07:46 2017 New Revision: 321518 URL: https://svnweb.freebsd.org/changeset/base/321518 Log: 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 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh Wed Jul 26 11:04:30 2017 (r321517) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh Wed Jul 26 12:07:46 2017 (r321518) @@ -39,6 +39,15 @@ ## +reader() +{ + while true + do + sleep 0.1 + cat /etc/motd > /dev/null + done +} + if [ $# != 1 ]; then echo expected one argument: '<'dtrace-path'>' exit 2 @@ -46,6 +55,9 @@ fi dtrace=$1 +reader & +child=$! + $dtrace -qZf wassup'{printf("Iamkool");}' \ -qf read'{printf("I am done"); exit(0);}' @@ -54,5 +66,7 @@ status=$? if [ "$status" -ne 0 ]; then echo $tst: dtrace failed fi + +kill $child exit $status