tst.func_access.ksh (256281) | tst.func_access.ksh (268578) |
---|---|
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 --- 8 unchanged lines hidden (view full) --- 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. | 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 --- 8 unchanged lines hidden (view full) --- 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# Copyright (c) 2012, Joyent, Inc. All rights reserved. |
|
25# | 26# |
26#ident "%Z%%M% %I% %E% SMI" | |
27 28ppriv -s A=basic,dtrace_proc,dtrace_user $$ 29 30/usr/sbin/dtrace -q -s /dev/stdin <<"EOF" 31 32BEGIN { 33 errorcount = 0; | 27 28ppriv -s A=basic,dtrace_proc,dtrace_user $$ 29 30/usr/sbin/dtrace -q -s /dev/stdin <<"EOF" 31 32BEGIN { 33 errorcount = 0; |
34 expected_errorcount = 23; | 34 expected_errorcount = 27; |
35} 36 37BEGIN { trace(mutex_owned(&`pidlock)); } 38BEGIN { trace(mutex_owner(&`pidlock)); } 39BEGIN { trace(mutex_type_adaptive(&`pidlock)); } 40BEGIN { trace(mutex_type_spin(&`pidlock)); } 41 42BEGIN { trace(rw_read_held(&`ksyms_lock)); } --- 7 unchanged lines hidden (view full) --- 50BEGIN { trace(strchr(`initname, 0x69)); } 51BEGIN { trace(strrchr(`initname, 0x69)); } 52BEGIN { trace(strstr("/sbin/init/foo", `initname)); } 53BEGIN { trace(strstr(`initname, "in")); } 54BEGIN { trace(strtok(`initname, "/")); } 55BEGIN { trace(strtok(NULL, "/")); } 56BEGIN { trace(strtok("foo/bar", `initname)); } 57BEGIN { trace(strtok(NULL, `initname)); } | 35} 36 37BEGIN { trace(mutex_owned(&`pidlock)); } 38BEGIN { trace(mutex_owner(&`pidlock)); } 39BEGIN { trace(mutex_type_adaptive(&`pidlock)); } 40BEGIN { trace(mutex_type_spin(&`pidlock)); } 41 42BEGIN { trace(rw_read_held(&`ksyms_lock)); } --- 7 unchanged lines hidden (view full) --- 50BEGIN { trace(strchr(`initname, 0x69)); } 51BEGIN { trace(strrchr(`initname, 0x69)); } 52BEGIN { trace(strstr("/sbin/init/foo", `initname)); } 53BEGIN { trace(strstr(`initname, "in")); } 54BEGIN { trace(strtok(`initname, "/")); } 55BEGIN { trace(strtok(NULL, "/")); } 56BEGIN { trace(strtok("foo/bar", `initname)); } 57BEGIN { trace(strtok(NULL, `initname)); } |
58BEGIN { trace(strtoll(`initname)); } 59BEGIN { trace(strtoll(`initname, 10)); } |
|
58BEGIN { trace(substr(`initname, 2, 3)); } 59 60BEGIN { trace(ddi_pathname(`top_devinfo, 1)); } 61BEGIN { trace(strjoin(`initname, "foo")); } 62BEGIN { trace(strjoin("foo", `initname)); } 63BEGIN { trace(dirname(`initname)); } 64BEGIN { trace(cleanpath(`initname)); } 65 | 60BEGIN { trace(substr(`initname, 2, 3)); } 61 62BEGIN { trace(ddi_pathname(`top_devinfo, 1)); } 63BEGIN { trace(strjoin(`initname, "foo")); } 64BEGIN { trace(strjoin("foo", `initname)); } 65BEGIN { trace(dirname(`initname)); } 66BEGIN { trace(cleanpath(`initname)); } 67 |
68BEGIN { j = "{\"/sbin/init\":\"uh oh\"}"; trace(json(j, `initname)); } 69BEGIN { trace(json(`initname, "x")); } 70 |
|
66ERROR { 67 errorcount++; 68} 69 70BEGIN /errorcount == expected_errorcount/ { 71 trace("test passed"); 72 exit(0); 73} 74 75BEGIN /errorcount != expected_errorcount/ { 76 printf("fail: expected %d. saw %d.", expected_errorcount, errorcount); 77 exit(1); 78} 79EOF 80 81 82exit $? | 71ERROR { 72 errorcount++; 73} 74 75BEGIN /errorcount == expected_errorcount/ { 76 trace("test passed"); 77 exit(0); 78} 79 80BEGIN /errorcount != expected_errorcount/ { 81 printf("fail: expected %d. saw %d.", expected_errorcount, errorcount); 82 exit(1); 83} 84EOF 85 86 87exit $? |