From owner-svn-src-all@freebsd.org Tue Jul 25 13:01:11 2017 Return-Path: Delivered-To: svn-src-all@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 9FD90C7BC7D; Tue, 25 Jul 2017 13:01:11 +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 6C53B76022; Tue, 25 Jul 2017 13:01:11 +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 v6PD1ARu085444; Tue, 25 Jul 2017 13:01:10 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6PD1A2b085443; Tue, 25 Jul 2017 13:01:10 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201707251301.v6PD1A2b085443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 25 Jul 2017 13:01:10 +0000 (UTC) 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 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: 321466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 13:01:11 -0000 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