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 2008 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 # ident "@(#)nfs4test.env 1.2 08/11/20 SMI" 27 # 28 # Global test environment used for all tests. 29 # 30 31 # Test root directory 32 TESTROOT=${TESTROOT:-`pwd`}; export TESTROOT 33 34 # make sure we use the correct locale to prevent failures 35 LC_ALL=C; export LC_ALL 36 37 # DNS server for domain information 38 DNS_SERVER=${DNS_SERVER:-"jurassic.sfbay.sun.com"}; export DNS_SERVER 39 40 # Server lease time period default value 41 LEASE_TIME=${LEASE_TIME:-90}; export LEASE_TIME 42 43 DELAY=${DELAY:-300}; export DELAY 44 45 # non-global zone path for BASEDIR and MNTPTR 46 # for Trusted Extensions CIPSO testing. 47 # For example: ZONE_PATH=/zone/public 48 # 49 ZONE_PATH=${ZONE_PATH:-""}; export ZONE_PATH 50 51 # BASE (exported) test directory from $SERVER 52 # Note: 53 # For Trusted Extensions CIPSO connections you 54 # MUST define a non-global zone's path in ZONE_PATH. 55 # For example: 56 # ZONE_PATH=/zone/public 57 # This would produce the resultant default BASEDIR of: 58 # /zone/public/NFSv4Test 59 # 60 #As the nfs4test.env is sourced in the runit script, so in order to produce the 61 #right BASEDIR, the $ZONE_PATH is needed to strip from the $BASEDIR 62 BASEDIR=${BASEDIR#$ZONE_PATH} 63 BASEDIR=$ZONE_PATH${BASEDIR:-"/NFSv4Test"}; export BASEDIR 64 65 # NOTICEDIR restart/reboot daemon test directory 66 NOTICEDIR=${NOTICEDIR:-"._Notice__Dir_."}; export NOTICEDIR 67 68 # ROOT (exported) test directory from $SERVER 69 ROOTDIR=${ROOTDIR:-"$BASEDIR/RootFS"}; export ROOTDIR 70 71 # PUBLIC (exported) public option test filesystem from $SERVER 72 PUBTDIR=${PUBTDIR:-"$BASEDIR/PublicFS"}; export PUBTDIR 73 74 # ROFS (exported) read-only test filesystem from $SERVER 75 ROFSDIR=${ROFSDIR:-"$BASEDIR/RoFS"}; export ROFSDIR 76 77 # NSPC (exported) test filesystem with no more space from $SERVER 78 NSPCDIR=${NSPCDIR:-"$BASEDIR/NoSPC_FS"}; export NSPCDIR 79 80 # quota (exported) test filesystem from $SERVER 81 # 82 # For Trusted Extensions testing. 83 # 84 # QUOTADIR must be prefaced with the zone root path 85 # of the same zone set in ZONE_PATH. QUOTADIR must 86 # be set prior to executing any test. 87 # 88 # The reason to use the zone root here is that 89 # in most cases, if not all, there will be a small extra 90 # file system within the non-global zone to be used for 91 # QUOTA testing. The non-global's mount point for that 92 # file system will based upon its zone root path as part 93 # of the mount point. 94 # 95 # For example, if there is an extra ufs file system in a 96 # non-global zone called "public" and it is mounted 97 # locally in "public" under /NFSv4Test, then the 98 # exported directory for QUOTA_FS from the server in this 99 # example should be set to: 100 # QUOTADIR=/zone/public/root/NFSv4Test/QUOTA_FS 101 # export QUOTADIR 102 # 103 if [[ ! -z $ZONE_PATH ]]; then 104 RELDIR=${BASEDIR#$ZONE_PATH} 105 QUOTADIR=${QUOTADIR:-"$ZONE_PATH/root$RELDIR/QUOTA_FS"} 106 else 107 QUOTADIR=${QUOTADIR:-"$BASEDIR/QUOTA_FS"} 108 fi 109 export QUOTADIR 110 111 # KRB5 (exported) test filesystem from $SERVER 112 KRB5DIR=${KRB5DIR:-"$BASEDIR/KRB5_FS"}; export KRB5DIR 113 114 # test filesystems from $SERVER for namespace 115 SSPCDIR=${SSPCDIR:-"$BASEDIR/SRVsp_FS"}; export SSPCDIR 116 SSPCDIR2=${SSPCDIR2:-"$SSPCDIR/hide/SRVsp_d2"}; export SSPCDIR2 117 SSPCDIR3=${SSPCDIR3:-"$SSPCDIR2/hide2/SRVsp_d3"}; export SSPCDIR3 118 119 # NotSh (unexported) UFS test filesystem from $SERVER 120 NOTSHDIR=${NOTSHDIR:-"$BASEDIR/NotShare_FS"}; export NOTSHDIR 121 122 # NFS mount options to mount BASEDIR on client 123 NFSMOPT=${NFSMOPT:-"rw,vers=4"}; export NFSMOPT 124 125 # Test users setup in both client and server 126 # TUSER1 & TUSER2 are in the same group (10), and TUSER3 is in group (1) 127 TUSER1=${TUSER1:-"v4test1"}; export TUSER1 128 TUSER2=${TUSER2:-"v4test2"}; export TUSER2 129 TUSER3=${TUSER3:-"v4test3"}; export TUSER3 130 # These users are for uidmapping. TUSERC is only known to the client and 131 # TUSERS is only known to the server 132 TUSERC=${TUSERC:-"v4testC"}; export TUSERC 133 TUSERCID="23456780"; export TUSERCID 134 TUSERC2=${TUSERC2:-"v4testC2"}; export TUSERC2 135 TUSERS=${TUSERS:-"v4testS"}; export TUSERS 136 TUSERSID="23456781"; export TUSERSID 137 TUSERS2=${TUSERS2:-"v4testS2"}; export TUSERS2 138 TUSERID="23456782"; export TUSERID 139 TUSERC3=${TUSERC3:-"v4test4"}; export TUSERC3 140 TUSERS3="$TUSERC3"; export TUSERS3 141 TUSERCID3="23456783"; export TUSERCID3 142 TUSERSID3="23456784"; export TUSERSID3 143 # Special user for uidmapping, with UTF-8 chars of different byte lengths 144 UTF8_USR="\0176\0337\0200\0357\0200\0200\0367\0200\0200\0200\0373\0200\0200\ 145 \0200\0200\0375\0200\0200\0200\0200\0200"; export UTF8_USR 146 # Special string for testing a badly formed UTF-8 string 147 BAD_UTF8="\0337\0377\0357\0377\0377\0367\0377\0377\0377\0373\0377\0377\0377\ 148 \0377\0375\0377\0377\0377\0377\0377\0000\0000";export BAD_UTF8 149 TUSERUTF8="23456785"; export TUSERUTF8 150 TUSERBUTF8="23456786"; export TUSERBUTF8 151 152 #default compilers and flags 153 CC_SRV=${CC_SRV:="/ws/onnv-tools/SUNWspro/SS12/bin/cc"} 154 cflags_srv=${cflags_srv:=-g} 155 export CC_SRV cflags_srv 156 157 # Current user 158 USER=${USER:-"$TUSER1"}; export USER 159 160 # PATH for framework and testing purposes 161 PATH=/usr/bin:/usr/sbin:/usr/ucb:${TESTROOT}:.:$PATH; export PATH 162 163 # LD_LIBRARY_PATH & TCL_LIBARAY for TCL library and init file 164 [ "X$LD_LIBRARY_PATH" != "X" ] && \ 165 LD_LIBRARY_PATH="/opt/TCL85/lib:$LD_LIBRARY_PATH" || \ 166 LD_LIBRARY_PATH="/opt/TCL85/lib" 167 TCL_LIBRARY=${TCL_LIBRARY:-"$LD_LIBRARY_PATH/tcl8.5"} 168 export LD_LIBRARY_PATH TCL_LIBRARY 169 170 # TRANSPORT to be used to connect to $SERVER 171 TRANSPORT=${TRANSPORT:-"tcp"}; export TRANSPORT 172 173 # MNTPTR to mount BASEDIR on client 174 MNTPTR=${MNTPTR#$ZONE_PATH} 175 MNTPTR=$ZONE_PATH${MNTPTR:-"/NFS4_Mnt"}; export MNTPTR 176 177 # PORT to be used to connect to $SERVER 178 PORT=${PORT:-"2049"}; export PORT 179 180 # PATH DELIMITER 181 DELM=${DELM:-"/"}; export DELM 182 183 # DONNOT run go_cleanup in runit script if NOCLEANUP flag is set to "1" 184 NOCLEANUP=${NOCLEANUP:-"0"}; export NOCLEANUP 185 186 # Timer of how long (in seconds) to wait for server to reboot and come back up 187 REBOOTIMER=${REBOOTIMER:-"900"}; export REBOOTIMER 188 189 # SERVER's OS 190 SRVOS=${SRVOS:-"Solaris"}; export SRVOS 191 192 # Config file which will be sourced by others if they need 193 CONFIGFILE=/var/tmp/nfsv4/config/config.suite; export CONFIGFILE 194 195 # Results dir for log files 196 LOGDIR=${LOGDIR:-"/var/tmp/nfsv4/results"}; export LOGDIR 197 198 # Standard test result codes 199 PASS=0; export PASS 200 FAIL=1; export FAIL 201 UNRESOLVED=2; export UNRESOLVED 202 NOTINUSE=3; export NOTINUSE 203 UNSUPPORTED=4; export UNSUPPORTED 204 UNTESTED=5; export UNTESTED 205 UNINITIATED=6; export UNINITIATED 206 NORESULT=7; export NORESULT 207 WARNING=8; export WARNING 208 TIMED_OUT=9; export TIMED_OUT 209 OTHER=10; export OTHER 210