9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * CDDL HEADER START
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * The contents of this file are subject to the terms of the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Common Development and Distribution License (the "License").
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * You may not use this file except in compliance with the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * or http://www.opensolaris.org/os/licensing.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * See the License for the specific language governing permissions
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * and limitations under the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * When distributing Covered Code, include this CDDL HEADER in each
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * If applicable, add the following below this CDDL HEADER, with the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * fields enclosed by brackets "[]" replaced with your own identifying
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * information: Portions Copyright [yyyy] [name of copyright owner]
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * CDDL HEADER END
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Use is subject to license terms.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#pragma ident "%Z%%M% %I% %E% SMI"
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * ASSERTION:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Using -f option.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * SECTION: dtrace Utility/-f Option
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * NOTES: Manually check:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 1) automated in tst.InvalidTraceFunc1.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f profile
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 2) automated in tst.InvalidTraceFunc2.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f genunix
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 3)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f read
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of matching list of probes with function read.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 4) automated in tst.InvalidTraceFunc3.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f read:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 5)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f ::read
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of matching list of probes with function read.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 6) automated in tst.InvalidTraceFunc4.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f ::read:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 7)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f genunix:read
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of probes with module genunix and function read.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 8)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f sysinfo:genunix:read
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of probes with provider sysinfo, module genunix
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * and function read.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 9)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f sysinfo::read
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of probes with provider sysinfo and function read.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 10) automated in tst.InvalidTraceFunc5.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f :genunix::
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 11) automated in tst.InvalidTraceFunc6.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f profile:::profile-97
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 12)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f read -f write
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of both read and write probes.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 13)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f read -f fight
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: Count of matching read probes and invalid probe specifier
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * for fight
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 14) automated in tst.InvalidTraceFunc8.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f fight -f write
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 15) automated in tst.InvalidTraceFunc7.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f fbt:des:des3_crunch_block:return
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 16)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f read'{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of probes with function read and with message FOUND
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 17)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f ::read'{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of probes with function read and with message FOUND
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 18) automated in tst.InvalidTraceFunc9.d.ksh
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f read '{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: invalid probe specifier.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * 19)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * /usr/sbin/dtrace -f read'/probename == "entry"/{printf("FOUND");}'
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * RESULT: tracing of probes with function read, name entry and with
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * message FOUND
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */