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