1178476Sjb/*
2178476Sjb * CDDL HEADER START
3178476Sjb *
4178476Sjb * The contents of this file are subject to the terms of the
5178476Sjb * Common Development and Distribution License (the "License").
6178476Sjb * You may not use this file except in compliance with the License.
7178476Sjb *
8178476Sjb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9178476Sjb * or http://www.opensolaris.org/os/licensing.
10178476Sjb * See the License for the specific language governing permissions
11178476Sjb * and limitations under the License.
12178476Sjb *
13178476Sjb * When distributing Covered Code, include this CDDL HEADER in each
14178476Sjb * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15178476Sjb * If applicable, add the following below this CDDL HEADER, with the
16178476Sjb * fields enclosed by brackets "[]" replaced with your own identifying
17178476Sjb * information: Portions Copyright [yyyy] [name of copyright owner]
18178476Sjb *
19178476Sjb * CDDL HEADER END
20178476Sjb */
21178476Sjb
22178476Sjb/*
23178476Sjb * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24178476Sjb * Use is subject to license terms.
25178476Sjb */
26178476Sjb
27178476Sjb#pragma ident	"%Z%%M%	%I%	%E% SMI"
28178476Sjb
29178476Sjb/*
30178476Sjb * ASSERTION:
31178476Sjb * Using -n option.
32178476Sjb *
33178476Sjb * SECTION: dtrace Utility/-n Option
34178476Sjb *
35178476Sjb * NOTES: Manually check:
36178476Sjb *
37178476Sjb * 1) automated in tst.InvalidTraceName1.d.ksh
38178476Sjb * /usr/sbin/dtrace -n profile
39178476Sjb * RESULT: invalid probe specifier
40178476Sjb *
41178476Sjb * 2) automated in tst.InvalidTraceName2.d.ksh
42178476Sjb * /usr/sbin/dtrace -n genunix
43178476Sjb * RESULT: invalid probe specifier
44178476Sjb *
45178476Sjb * 3) automated in tst.InvalidTraceName3.d.ksh
46178476Sjb * /usr/sbin/dtrace -n read
47178476Sjb * RESULT: invalid probe specifier
48178476Sjb *
49178476Sjb * 4)
50178476Sjb * /usr/sbin/dtrace -n BEGIN
51178476Sjb * RESULT: trace of one probe with name BEGIN.
52178476Sjb *
53178476Sjb * 5) automated in tst.InvalidTraceName4.d.ksh
54178476Sjb * /usr/sbin/dtrace -n begin
55178476Sjb * RESULT: invalid probe specifier
56178476Sjb *
57178476Sjb * 6) automated in tst.InvalidTraceName5.d.ksh
58178476Sjb * /usr/sbin/dtrace -n genunix:read
59178476Sjb * RESULT: invalid probe specifier
60178476Sjb *
61178476Sjb * 7)
62178476Sjb * /usr/sbin/dtrace -n genunix:read:
63178476Sjb * RESULT: trace of probes with module genunix and function read.
64178476Sjb *
65178476Sjb * 8) automated in tst.InvalidTraceName6.d.ksh
66178476Sjb * /usr/sbin/dtrace -n sysinfo:genunix:read
67178476Sjb * RESULT: invalid probe specifier
68178476Sjb *
69178476Sjb * 9)
70178476Sjb * /usr/sbin/dtrace -n sysinfo:genunix:read:
71178476Sjb * RESULT: tracing of probes with provider sysinfo, module genunix
72178476Sjb * and function read.
73178476Sjb *
74178476Sjb * 10)
75178476Sjb * /usr/sbin/dtrace -n :genunix::
76178476Sjb * RESULT: tracing of probes with module genunix
77178476Sjb *
78178476Sjb * 11) automated in tst.InvalidTraceName7.d.ksh
79178476Sjb * /usr/sbin/dtrace -n :genunix:
80178476Sjb * RESULT: invalid probe specifier
81178476Sjb *
82178476Sjb * 12)
83178476Sjb * /usr/sbin/dtrace -n ::read:
84178476Sjb * RESULT: tracing of probes with function read.
85178476Sjb *
86178476Sjb * 13)
87178476Sjb * /usr/sbin/dtrace -n profile:::profile-97
88178476Sjb * RESULT: tracing of probes with provider profile and name
89178476Sjb * profile-97
90178476Sjb *
91178476Sjb * 14)
92178476Sjb * /usr/sbin/dtrace -n read: -n write:
93178476Sjb * RESULT: tracing of both read and write probes.
94178476Sjb *
95178476Sjb * 15)
96178476Sjb * /usr/sbin/dtrace -n read: -n fight:
97178476Sjb * RESULT: Count of mathching read probes and invalid probe specifier
98178476Sjb * for fight:
99178476Sjb *
100178476Sjb * 16) automated in tst.InvalidTraceName8.d.ksh
101178476Sjb * /usr/sbin/dtrace -n fight: -n write:
102178476Sjb * RESULT: invalid probe specifier
103178476Sjb *
104178476Sjb * 17)
105178476Sjb * /usr/sbin/dtrace -n fbt:des:des3_crunch_block:return
106178476Sjb * RESULT: trace of the specified probe.
107178476Sjb *
108178476Sjb * 18)
109178476Sjb * /usr/sbin/dtrace -n read:'{printf("FOUND");}'
110178476Sjb * RESULT: Trace of all the probes with module read and a message
111178476Sjb * saying FOUND.
112178476Sjb *
113178476Sjb * 19)
114178476Sjb * /usr/sbin/dtrace -n read:entry'{printf("FOUND");}'
115178476Sjb * RESULT: Trace of all the probes with module read, name entry.Output
116178476Sjb * of a message saying FOUND.
117178476Sjb *
118178476Sjb * 20)
119178476Sjb * /usr/sbin/dtrace -n BEGIN'{printf("FOUND");}'
120178476Sjb * RESULT: Trace of the BEGIN probe with the message FOUND.
121178476Sjb *
122178476Sjb * 21) automated in tst.InvalidTraceName9.d.ksh
123178476Sjb * /usr/sbin/dtrace -n BEGIN '{printf("FOUND");}'
124178476Sjb * RESULT: invalid probe specifier
125178476Sjb *
126178476Sjb * 22)
127178476Sjb * /usr/sbin/dtrace -n BEGIN'/probename == "entry"/{printf("FOUND");}'
128178476Sjb * RESULT: Tracing of BEGIN function but no message FOUND.
129178476Sjb */
130