14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/*
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * CDDL HEADER START
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * The contents of this file are subject to the terms of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Common Development and Distribution License (the "License").
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * You may not use this file except in compliance with the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * or http://www.opensolaris.org/os/licensing.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * See the License for the specific language governing permissions
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * and limitations under the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * When distributing Covered Code, include this CDDL HEADER in each
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * If applicable, add the following below this CDDL HEADER, with the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * fields enclosed by brackets "[]" replaced with your own identifying
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * information: Portions Copyright [yyyy] [name of copyright owner]
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * CDDL HEADER END
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/*
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Use is subject to license terms.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#pragma ident "%Z%%M% %I% %E% SMI"
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/*
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * ASSERTION:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Using -n option.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * SECTION: dtrace Utility/-n Option
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * NOTES: Manually check:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 1) automated in tst.InvalidTraceName1.d.ksh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n profile
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 2) automated in tst.InvalidTraceName2.d.ksh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n genunix
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 3) automated in tst.InvalidTraceName3.d.ksh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n read
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 4)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n BEGIN
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: trace of one probe with name BEGIN.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 5) automated in tst.InvalidTraceName4.d.ksh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n begin
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 6) automated in tst.InvalidTraceName5.d.ksh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n genunix:read
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 7)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n genunix:read:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: trace of probes with module genunix and function read.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 8) automated in tst.InvalidTraceName6.d.ksh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n sysinfo:genunix:read
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 9)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n sysinfo:genunix:read:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: tracing of probes with provider sysinfo, module genunix
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * and function read.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 10)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n :genunix::
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: tracing of probes with module genunix
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 11) automated in tst.InvalidTraceName7.d.ksh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n :genunix:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 12)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n ::read:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: tracing of probes with function read.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 13)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n profile:::profile-97
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: tracing of probes with provider profile and name
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * profile-97
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 14)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n read: -n write:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: tracing of both read and write probes.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 15)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n read: -n fight:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: Count of mathching read probes and invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * for fight:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 16) automated in tst.InvalidTraceName8.d.ksh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n fight: -n write:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 17)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n fbt:des:des3_crunch_block:return
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: trace of the specified probe.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 18)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n read:'{printf("FOUND");}'
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: Trace of all the probes with module read and a message
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * saying FOUND.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 19)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n read:entry'{printf("FOUND");}'
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: Trace of all the probes with module read, name entry.Output
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * of a message saying FOUND.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 20)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n BEGIN'{printf("FOUND");}'
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: Trace of the BEGIN probe with the message FOUND.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 21) automated in tst.InvalidTraceName9.d.ksh
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n BEGIN '{printf("FOUND");}'
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: invalid probe specifier
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * 22)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * /usr/sbin/dtrace -n BEGIN'/probename == "entry"/{printf("FOUND");}'
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * RESULT: Tracing of BEGIN function but no message FOUND.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync */