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 2007 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26 # NFSv4 named attributes:
27 #
28 # a: Try to do CREATE op of symlink in named attr directory, expect INVAL
29 #
30
31 set TESTROOT $env(TESTROOT)
32 set delm $env(DELM)
33
34 # include common code and init section
35 source ${TESTROOT}${delm}tcl.init
36 source ${TESTROOT}${delm}testproc
37
38 # connect to the test server
39 Connect
40
41 # setting local variables
42 set TNAME $argv0
43 set bfh [get_fh "$BASEDIRS"]
44 set expcode "INVAL|NOTSUPP"
45
46 # Start testing
47 # ------------------------------------------------------------------------
48 # a: Try to do CREATE op of symlink in named attr directory, expect INVAL
49 set ASSERTION \
50 "Try to do CREATE op of symlink in named attr directory, expect $expcode"
51 putmsg stdout 0 "$TNAME{a}: $ASSERTION"
52
53 set nlnk "newlnk"
54 set LFILE $env(ATTRFILE_AT1)
55 # Create symlink in named attr directory
56 set res [compound {
57 Putfh $bfh;
58 Lookup $env(ATTRFILE);
59 Getfh;
60 Openattr T;
61 Create $nlnk {{mode 0777}} l $LFILE }]
62 ckres "Create" $status $expcode $res $PASS
63
64 Disconnect
65 exit 0