1/*
2 * CDDL HEADER START
3 *
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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#pragma ident	"%Z%%M%	%I%	%E% SMI"
28
29/*
30 * ASSERTION:
31 * Using -n option.
32 *
33 * SECTION: dtrace Utility/-n Option
34 *
35 * NOTES: Manually check:
36 *
37 * 1) automated in tst.InvalidTraceName1.d.ksh
38 * /usr/sbin/dtrace -n profile
39 * RESULT: invalid probe specifier
40 *
41 * 2) automated in tst.InvalidTraceName2.d.ksh
42 * /usr/sbin/dtrace -n genunix
43 * RESULT: invalid probe specifier
44 *
45 * 3) automated in tst.InvalidTraceName3.d.ksh
46 * /usr/sbin/dtrace -n read
47 * RESULT: invalid probe specifier
48 *
49 * 4)
50 * /usr/sbin/dtrace -n BEGIN
51 * RESULT: trace of one probe with name BEGIN.
52 *
53 * 5) automated in tst.InvalidTraceName4.d.ksh
54 * /usr/sbin/dtrace -n begin
55 * RESULT: invalid probe specifier
56 *
57 * 6) automated in tst.InvalidTraceName5.d.ksh
58 * /usr/sbin/dtrace -n genunix:read
59 * RESULT: invalid probe specifier
60 *
61 * 7)
62 * /usr/sbin/dtrace -n genunix:read:
63 * RESULT: trace of probes with module genunix and function read.
64 *
65 * 8) automated in tst.InvalidTraceName6.d.ksh
66 * /usr/sbin/dtrace -n sysinfo:genunix:read
67 * RESULT: invalid probe specifier
68 *
69 * 9)
70 * /usr/sbin/dtrace -n sysinfo:genunix:read:
71 * RESULT: tracing of probes with provider sysinfo, module genunix
72 * and function read.
73 *
74 * 10)
75 * /usr/sbin/dtrace -n :genunix::
76 * RESULT: tracing of probes with module genunix
77 *
78 * 11) automated in tst.InvalidTraceName7.d.ksh
79 * /usr/sbin/dtrace -n :genunix:
80 * RESULT: invalid probe specifier
81 *
82 * 12)
83 * /usr/sbin/dtrace -n ::read:
84 * RESULT: tracing of probes with function read.
85 *
86 * 13)
87 * /usr/sbin/dtrace -n profile:::profile-97
88 * RESULT: tracing of probes with provider profile and name
89 * profile-97
90 *
91 * 14)
92 * /usr/sbin/dtrace -n read: -n write:
93 * RESULT: tracing of both read and write probes.
94 *
95 * 15)
96 * /usr/sbin/dtrace -n read: -n fight:
97 * RESULT: Count of mathching read probes and invalid probe specifier
98 * for fight:
99 *
100 * 16) automated in tst.InvalidTraceName8.d.ksh
101 * /usr/sbin/dtrace -n fight: -n write:
102 * RESULT: invalid probe specifier
103 *
104 * 17)
105 * /usr/sbin/dtrace -n fbt:des:des3_crunch_block:return
106 * RESULT: trace of the specified probe.
107 *
108 * 18)
109 * /usr/sbin/dtrace -n read:'{printf("FOUND");}'
110 * RESULT: Trace of all the probes with module read and a message
111 * saying FOUND.
112 *
113 * 19)
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.
117 *
118 * 20)
119 * /usr/sbin/dtrace -n BEGIN'{printf("FOUND");}'
120 * RESULT: Trace of the BEGIN probe with the message FOUND.
121 *
122 * 21) automated in tst.InvalidTraceName9.d.ksh
123 * /usr/sbin/dtrace -n BEGIN '{printf("FOUND");}'
124 * RESULT: invalid probe specifier
125 *
126 * 22)
127 * /usr/sbin/dtrace -n BEGIN'/probename == "entry"/{printf("FOUND");}'
128 * RESULT: Tracing of BEGIN function but no message FOUND.
129 */
130