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 * Tracing a module using the -m option.
32178476Sjb *
33178476Sjb * SECTION: dtrace Utility/-m Option
34178476Sjb *
35178476Sjb * NOTES: Manually check:
36178476Sjb *
37178476Sjb * 1) automated in tst.InvalidTraceModule1.d.ksh
38178476Sjb * /usr/sbin/dtrace -m profile
39178476Sjb * RESULT: invalid probe specifier
40178476Sjb *
41178476Sjb * 2)
42178476Sjb * /usr/sbin/dtrace -m genunix
43178476Sjb * RESULT: trace of all probes with module genunix.
44178476Sjb *
45178476Sjb * 3)
46178476Sjb * /usr/sbin/dtrace -m vtrace:genunix
47178476Sjb * RESULT: trace of probes with provider vtrace and module genunix.
48178476Sjb *
49178476Sjb * 4) automated in tst.InvalidTraceModule2.d.ksh
50178476Sjb * /usr/sbin/dtrace -m :genunix::
51178476Sjb * RESULT: invalid probe specifier
52178476Sjb *
53178476Sjb * 5)
54178476Sjb * /usr/sbin/dtrace -m :genunix
55178476Sjb * RESULT: trace of all probes with module genunix.
56178476Sjb *
57178476Sjb * 6) automated in tst.InvalidTraceModule3.d.ksh
58178476Sjb * /usr/sbin/dtrace -m genunix::
59178476Sjb * RESULT: invalid probe specifier
60178476Sjb *
61178476Sjb * 7) automated in tst.InvalidTraceModule4.d.ksh
62178476Sjb * /usr/sbin/dtrace -m profile:::profile-97
63178476Sjb * RESULT: not a valid probe description.
64178476Sjb *
65178476Sjb * 8) 
66178476Sjb * /usr/sbin/dtrace -m genunix -m unix
67178476Sjb * RESULT: tracing of both genunix and unix probes.
68178476Sjb *
69178476Sjb * 9)
70178476Sjb * /usr/sbin/dtrace -m genunix -m foounix
71178476Sjb * RESULT: Number of probes matching the description genunix
72178476Sjb * and an invalid probe specifier for foounix.
73178476Sjb *
74178476Sjb * 10) automated in tst.InvalidTraceModule5.d.ksh
75178476Sjb * /usr/sbin/dtrace -m foounix -m unix
76178476Sjb * RESULT: invalid probe specifier for foounix.
77178476Sjb *
78178476Sjb * 11) automated in tst.InvalidTraceModule6.d.ksh
79178476Sjb * /usr/sbin/dtrace -m fbt:des:des3_crunch_block:return
80178476Sjb * RESULT: invalid probe description.
81178476Sjb *
82178476Sjb * 12)
83178476Sjb * /usr/sbin/dtrace -m fbt:genunix'{printf("FOUND");}'
84178476Sjb * RESULT: tracing of all the probes matching provider fbt and module
85178476Sjb * genunix.
86178476Sjb *
87178476Sjb * 13)
88178476Sjb * /usr/sbin/dtrace -m genunix'{printf("FOUND");}'
89178476Sjb * RESULT: tracing of all the probes matching module genunix with
90178476Sjb * message FOUND
91178476Sjb *
92178476Sjb * 14)
93178476Sjb * /usr/sbin/dtrace -m :genunix'{printf("FOUND");}'
94178476Sjb * RESULT: tracing of all the probes matching module genunix with
95178476Sjb * message FOUND
96178476Sjb *
97178476Sjb * 15) automated in tst.InvalidTraceModule7.d.ksh
98178476Sjb * /usr/sbin/dtrace -m genunix::'{printf("FOUND");}'
99178476Sjb * RESULT: invalid probe specifier.
100178476Sjb *
101178476Sjb * 16) automated in tst.InvalidTraceModule8.d.ksh
102178476Sjb * /usr/sbin/dtrace -m genunix:'{printf("FOUND");}'
103178476Sjb * RESULT: invalid probe specifier.
104178476Sjb *
105178476Sjb * 17)
106178476Sjb * /usr/sbin/dtrace -m unix '{printf("FOUND");}'
107178476Sjb * RESULT: invalid probe specifier.
108178476Sjb *
109178476Sjb * 18)
110178476Sjb * /usr/sbin/dtrace -m
111178476Sjb * unix'/probefunc == "preempt"/{printf("FOUND");}'
112178476Sjb * RESULT: tracing of all the probes matching module genunix,
113178476Sjb * probe function preempt with message FOUND.
114178476Sjb */
115