Index: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d =================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d (revision 321464) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d (revision 321465) @@ -1,64 +1,65 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" /* * ASSERTION: * The number of speculative buffers defaults to one. If no speculative buffer * is available when speculation is called, an ID of zero is returned. * * SECTION: Speculative Tracing/Creating a Speculation * */ #pragma D option quiet BEGIN { i = 0; + notused = $1; } syscall::open:entry /i < 2/ { self->spec = speculation(); printf("Speculative buffer ID: %d\n", self->spec); i++; } syscall::: /(2 == i) && (0 == self->spec)/ { printf("i: %d\tself->spec: %d", i, self->spec); exit(0); } syscall::: /(2 == i) && (0 != self->spec)/ { printf("i: %d\tself->spec: %d", i, self->spec); exit(1); } Index: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe =================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe (nonexistent) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe (revision 321465) @@ -0,0 +1,30 @@ +#!/usr/bin/env ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2017 Li-Wen Hsu + +while true +do + sleep 0.1 + cat /etc/motd > /dev/null +done Property changes on: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile =================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile (revision 321464) +++ head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile (revision 321465) @@ -1,77 +1,78 @@ # $FreeBSD$ # # This Makefile was generated by $srcdir/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh. # PACKAGE= tests ${PACKAGE}FILES= \ bug.1001148.SpecSizeVariations.d \ err.BufSizeVariations1.d \ err.BufSizeVariations2.d \ err.D_ACT_SPEC.SpeculateWithBreakPoint.d \ err.D_ACT_SPEC.SpeculateWithChill.d \ err.D_ACT_SPEC.SpeculateWithCopyOut.d \ err.D_ACT_SPEC.SpeculateWithCopyOutStr.d \ err.D_ACT_SPEC.SpeculateWithPanic.d \ err.D_ACT_SPEC.SpeculateWithRaise.d \ err.D_ACT_SPEC.SpeculateWithStop.d \ err.D_AGG_COMM.AggAftCommit.d \ err.D_AGG_SPEC.SpeculateWithAvg.d \ err.D_AGG_SPEC.SpeculateWithCount.d \ err.D_AGG_SPEC.SpeculateWithLquant.d \ err.D_AGG_SPEC.SpeculateWithMax.d \ err.D_AGG_SPEC.SpeculateWithMin.d \ err.D_AGG_SPEC.SpeculateWithQuant.d \ err.D_AGG_SPEC.SpeculateWithStddev.d \ err.D_AGG_SPEC.SpeculateWithSum.d \ err.D_COMM_COMM.CommitAftCommit.d \ err.D_COMM_COMM.DisjointCommit.d \ err.D_COMM_DREC.CommitAftDataRec.d \ err.D_DREC_COMM.DataRecAftCommit.d \ err.D_DREC_COMM.ExitAfterCommit.d \ err.D_EXIT_SPEC.ExitAftSpec.d \ err.D_PRAGMA_MALFORM.NspecExpr.d \ err.D_PRAGMA_OPTSET.HugeNspecValue.d \ err.D_PRAGMA_OPTSET.InvalidSpecSize.d \ err.D_PRAGMA_OPTSET.NegSpecSize.d \ err.D_PROTO_LEN.SpecNoId.d \ err.D_SPEC_COMM.SpecAftCommit.d \ err.D_SPEC_DREC.SpecAftDataRec.d \ err.D_SPEC_SPEC.SpecAftSpec.d \ err.NegativeBufSize.d \ err.NegativeNspec.d \ err.NegativeSpecSize.d \ err.SpecSizeVariations1.d \ err.SpecSizeVariations2.d \ tst.CommitAfterDiscard.d \ tst.CommitWithZero.d \ tst.DataRecAftDiscard.d \ tst.DiscardAftCommit.d \ tst.DiscardAftDataRec.d \ tst.DiscardAftDiscard.d \ tst.DiscardWithZero.d \ tst.ExitAftDiscard.d \ tst.NoSpecBuffer.d \ tst.SpecSizeVariations1.d \ tst.SpecSizeVariations2.d \ tst.SpecSizeVariations3.d \ tst.SpeculateWithRandom.d \ tst.SpeculationCommit.d \ tst.SpeculationDiscard.d \ tst.SpeculationID.d \ tst.SpeculationWithZero.d \ tst.TwoSpecBuffers.d \ tst.negcommit.d \ tst.negspec.d \ tst.zerosize.d \ TESTEXES= \ + tst.NoSpecBuffer.exe \ CFILES= \ .include "../../dtrace.test.mk"