4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
33 * SECTION: dtrace Utility/-n Option
35 * NOTES: Manually check:
37 * 1) automated in tst.InvalidTraceName1.d.ksh
38 * /usr/sbin/dtrace -n profile
39 * RESULT: invalid probe specifier
41 * 2) automated in tst.InvalidTraceName2.d.ksh
42 * /usr/sbin/dtrace -n genunix
43 * RESULT: invalid probe specifier
45 * 3) automated in tst.InvalidTraceName3.d.ksh
46 * /usr/sbin/dtrace -n read
47 * RESULT: invalid probe specifier
50 * /usr/sbin/dtrace -n BEGIN
51 * RESULT: trace of one probe with name BEGIN.
53 * 5) automated in tst.InvalidTraceName4.d.ksh
54 * /usr/sbin/dtrace -n begin
55 * RESULT: invalid probe specifier
57 * 6) automated in tst.InvalidTraceName5.d.ksh
58 * /usr/sbin/dtrace -n genunix:read
59 * RESULT: invalid probe specifier
62 * /usr/sbin/dtrace -n genunix:read:
63 * RESULT: trace of probes with module genunix and function read.
65 * 8) automated in tst.InvalidTraceName6.d.ksh
66 * /usr/sbin/dtrace -n sysinfo:genunix:read
67 * RESULT: invalid probe specifier
70 * /usr/sbin/dtrace -n sysinfo:genunix:read:
71 * RESULT: tracing of probes with provider sysinfo, module genunix
75 * /usr/sbin/dtrace -n :genunix::
76 * RESULT: tracing of probes with module genunix
78 * 11) automated in tst.InvalidTraceName7.d.ksh
79 * /usr/sbin/dtrace -n :genunix:
80 * RESULT: invalid probe specifier
83 * /usr/sbin/dtrace -n ::read:
84 * RESULT: tracing of probes with function read.
87 * /usr/sbin/dtrace -n profile:::profile-97
88 * RESULT: tracing of probes with provider profile and name
92 * /usr/sbin/dtrace -n read: -n write:
93 * RESULT: tracing of both read and write probes.
96 * /usr/sbin/dtrace -n read: -n fight:
97 * RESULT: Count of mathching read probes and invalid probe specifier
100 * 16) automated in tst.InvalidTraceName8.d.ksh
101 * /usr/sbin/dtrace -n fight: -n write:
102 * RESULT: invalid probe specifier
105 * /usr/sbin/dtrace -n fbt:des:des3_crunch_block:return
106 * RESULT: trace of the specified probe.
109 * /usr/sbin/dtrace -n read:'{printf("FOUND");}'
110 * RESULT: Trace of all the probes with module read and a message
114 * /usr/sbin/dtrace -n read:entry'{printf("FOUND");}'
115 * RESULT: Trace of all the probes with module read, name entry.Output
116 * of a message saying FOUND.
119 * /usr/sbin/dtrace -n BEGIN'{printf("FOUND");}'
120 * RESULT: Trace of the BEGIN probe with the message FOUND.
122 * 21) automated in tst.InvalidTraceName9.d.ksh
123 * /usr/sbin/dtrace -n BEGIN '{printf("FOUND");}'
124 * RESULT: invalid probe specifier
127 * /usr/sbin/dtrace -n BEGIN'/probename == "entry"/{printf("FOUND");}'
128 * RESULT: Tracing of BEGIN function but no message FOUND.