1 5982 ahl /* 2 5982 ahl * CDDL HEADER START 3 5982 ahl * 4 5982 ahl * The contents of this file are subject to the terms of the 5 5982 ahl * Common Development and Distribution License (the "License"). 6 5982 ahl * You may not use this file except in compliance with the License. 7 5982 ahl * 8 5982 ahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 5982 ahl * or http://www.opensolaris.org/os/licensing. 10 5982 ahl * See the License for the specific language governing permissions 11 5982 ahl * and limitations under the License. 12 5982 ahl * 13 5982 ahl * When distributing Covered Code, include this CDDL HEADER in each 14 5982 ahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 5982 ahl * If applicable, add the following below this CDDL HEADER, with the 16 5982 ahl * fields enclosed by brackets "[]" replaced with your own identifying 17 5982 ahl * information: Portions Copyright [yyyy] [name of copyright owner] 18 5982 ahl * 19 5982 ahl * CDDL HEADER END 20 5982 ahl */ 21 5982 ahl 22 5982 ahl /* 23 5982 ahl * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 5982 ahl * Use is subject to license terms. 25 5982 ahl */ 26 5982 ahl 27 5982 ahl #pragma ident "%Z%%M% %I% %E% SMI" 28 5982 ahl 29 5982 ahl /* 30 5982 ahl * ASSERTION: Make sure nfsv3 provider probes are firing, and that the 31 5982 ahl * arguments are properly visible. 32 5982 ahl * 33 5982 ahl * SECTION: nfs3 provider 34 5982 ahl */ 35 5982 ahl 36 5982 ahl #pragma D option destructive 37 5982 ahl #pragma D option quiet 38 5982 ahl 39 5982 ahl pid$1:a.out:waiting:entry 40 5982 ahl { 41 5982 ahl this->value = (int *)alloca(sizeof (int)); 42 5982 ahl *this->value = 1; 43 5982 ahl copyout(this->value, arg0, sizeof (int)); 44 5982 ahl } 45 5982 ahl 46 5982 ahl nfsv3:::op-getattr-start 47 5982 ahl { 48 5982 ahl printf("ci_local: %s\n", args[0]->ci_local); 49 5982 ahl printf("ci_remote: %s\n", args[0]->ci_remote); 50 5982 ahl printf("ci_protocol: %s\n", args[0]->ci_protocol); 51 5982 ahl 52 5982 ahl printf("noi_xid: %d\n", args[1]->noi_xid); 53 5982 ahl printf("noi_cred->cr_uid: %d\n", args[1]->noi_cred->cr_uid); 54 5982 ahl printf("noi_curpath: %s\n", args[1]->noi_curpath); 55 5982 ahl 56 5982 ahl printf("fh3_flags: %d\n", args[2]->object.fh3_flags); 57 5982 ahl } 58 5982 ahl 59 5982 ahl nfsv3:::op-getattr-done 60 5982 ahl { 61 5982 ahl printf("ci_local: %s\n", args[0]->ci_local); 62 5982 ahl printf("ci_remote: %s\n", args[0]->ci_remote); 63 5982 ahl printf("ci_protocol: %s\n", args[0]->ci_protocol); 64 5982 ahl 65 5982 ahl printf("noi_xid: %d\n", args[1]->noi_xid); 66 5982 ahl printf("noi_cred->cr_uid: %d\n", args[1]->noi_cred->cr_uid); 67 5982 ahl printf("noi_curpath: %s\n", args[1]->noi_curpath); 68 5982 ahl 69 5982 ahl printf("status: %d\n", args[2]->status); 70 5982 ahl } 71 5982 ahl 72 5982 ahl nfsv3:::*-done 73 5982 ahl /seen[probename] == 0/ 74 5982 ahl { 75 5982 ahl ++numberseen; 76 5982 ahl seen[probename] = 1; 77 5982 ahl printf("%d ops seen, latest op is %s\n", numberseen, probename); 78 5982 ahl } 79 5982 ahl 80 5982 ahl nfsv3:::*-done 81 5982 ahl /numberseen == 22/ 82 5982 ahl { 83 5982 ahl exit(0); 84 5982 ahl } 85 5982 ahl 86 5982 ahl tick-1s 87 5982 ahl /tick++ == 10/ 88 5982 ahl { 89 5982 ahl printf("%d nfsv3 ops seen; should be 22\n", numberseen); 90 5982 ahl exit(1); 91 5982 ahl } 92