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 "@(#)README 1.7 08/05/29 SMI" 27 # 28 29 DESCRIPTION: 30 =========== 31 This test suite tests the new automounter in both kernel and the daemon. 32 33 INSTALLATION: 34 ============ 35 You can install the suite package, or install the suite source and 36 build by yourself. 37 38 1. Installing from Packages 39 40 o In the majority of cases, the test suite can be installed from 41 packages. To do that, you need to be as root. The package is 42 called SUNWstc-fnfs and installs into "/opt" by default. 43 Installation is via the standard Solaris package installation 44 tool pkgadd(1M). To install SUNWstc-fnfs simply enter the 45 following command line: 46 47 # pkgadd -d <package location> SUNWstc-fnfs 48 49 Where <package location> refers to the path containing the 50 SUNWstc-fnfs package directory. 51 52 It is recommended that you install the package from scratch, 53 rather than on top of an existing installation. Thus, if an 54 old version of the tests is installed: 55 56 # pkgrm SUNWstc-fnfs 57 58 o It is also acceptable to use an nfs accessible version of the 59 SUNWstc-fnfs package. 60 61 2. Installing the Test Suite Source 62 63 You can install the suite source locally as any user. 64 65 UNINSTALLATION: 66 ============== 67 Prior to uninstalling the test suite, you may want to run 68 stf_unconfigure firstly. For more detail see UNCONFIGURATION. 69 70 1. Uninstalling the Test Suite Package 71 72 Use the standard Solaris package installation tool pkgrm(1M) to 73 uninstall the package as root: 74 75 # pkgrm SUNWstc-fnfs 76 77 2. Uninstalling the Test Suite Source 78 79 You can remove the corresponding directory. 80 81 BUILDING: 82 ======== 83 If the suite is installed from packages, you can skip this section. 84 If the suite source is installed locally, maybe you need to build 85 it. This method uses the standard STF techniques to create a Solaris 86 package, which will be installed under the base directory 87 "/opt/SUNWstc-fnfs". 88 89 Briefly, this build and installation is performed as follows: 90 91 # set path to STF bin directory 92 % PATH=<path-to-STF>/bin/`uname -p`:$PATH 93 % export PATH 94 95 # if not using teamware, define CODEMGR_WS 96 % CODEMGR_WS=<path-to-workspace> 97 % export CODEMGR_WS 98 99 % cd ${CODEMGR_WS}/src/suites/nfs/fnfs 100 % stf_build package 101 % cd ${CODEMGR_WS}/packages/`uname -p` 102 % sudo pkgadd -d `pwd` SUNWstc-fnfs 103 104 PREREQUISITES: 105 ============= 106 This is a client test suite, but we will need a NFS server system and 107 a filesystem from server to help testing the NFS mounting. Therefore, 108 two systems are needed. 109 110 Please prepare the followings before running the tests, otherwise 111 tests may fail unexpectedly: 112 113 1. Make sure STF Tools be in your PATH. 114 115 2. Define following environment variables: 116 % setenv SERVER your_remote_hostname_which_runs_nfsd->REQUIRED 117 118 The following variables are optional, if not set, the default 119 value (see config.vars) will be used: 120 % setenv MNTPTR Path_for_$SERVER_to_export->OPTIONAL 121 % setenv TMPDIR tmpdir_for_temp_files->OPTIONAL 122 123 3. SERVER must be different from the local_host. 124 125 4. You can define DNS_SERVER as your dns server, make sure the dns server 126 is available before testing, the default value is jurassic.sfbay.sun.com 127 128 5. Both systems under test (the SERVER and local_host) must be able to 129 do rcp/rsh to each other as root (i.e. add + to ~root/.rhosts). 130 131 6. The test suite requires "root" to run (for server setup and client 132 map installation). You can either run it as root, or enter the root 133 password when it is prompted on command line when you do 'stf_configure' 134 as a regular user. 135 136 7. Trusted Extensions over a CIPSO connection 137 138 If you want to test NFSv4 in Trusted Extensions over a CIPSO connection 139 you MUST define the variable "ZONE_PATH" with <non-global zone path> 140 141 example: 142 stf_configure -c "SERVER=myserver" -c "ZONE_PATH=/zone/public" 143 144 This would produce the resultant MNTPTR default of: 145 /zone/public/stc2_FNFS_$CLIENT 146 147 The default for this ZONE_PATH is NULL. 148 149 CONFIGURATION: 150 ============= 151 You can choose one of the following ways to define the variables and 152 configure your suite from the top level directory. 153 154 1) define environment variables 155 # export SERVER=myserver 156 # stf_configure 157 158 2) use '-c' option 159 # stf_configure -c "SERVER=myserver" \ 160 -c "DEBUG=ck_master:ck_mthome" 161 162 3) use '-f' option 163 # echo "export SERVER=myserver" > /tmp/varfile 164 # stf_configure -f /tmp/varfile 165 166 EXECUTION: 167 ========= 168 At execution phase, you can only run 'stf_execute', or run stf_execute with 169 '-c' option specifying other optional variables which will override those 170 specified at configure phase. 171 172 All results will be saved in the journal file under /var/tmp/fnfs/results 173 or the directory defined by 'STF_RESULTS'. 174 175 UNCONFIGURATION: 176 =============== 177 You can run from the top level directory. 178 # stf_unconfigure 179 180 HOW TO TURN ON DEBUGGING: 181 ======================== 182 1. To turn on one testcase's debug output, set the variable DEBUG with 183 the testcase's name before running the test. For example: 184 DEBUG=ck_cachefs01 185 2. To turn on more than one testcase's debug output, use ":" to sepatate 186 different testcase's name. For example: 187 DEBUG=ck_cachefs01:ck_cachefs02 188 3. To turn on the debug output of all testcase, set the variable DEBUG with 189 "all". For example: 190 DEBUG=all 191 192 TEST DEVELOPMENT: 193 ================ 194 If you develop new test case to this suite, you must: 195 - name the new test starting with 'ck_' 196 197 TEST STRUCTURE: 198 ============== 199 STF_TEST_SUITE--bin 200 |-doc 201 |-include 202 |-tests-----basic 203 |-misc 204 |-mntnet 205 |-mt 206 |-offset 207 |-others 208 |-readdir 209 210 - Programs used by tests are put into STF_TEST_SUITE/bin 211 - ksh script libs are put into STF_TEST_SUITE/include 212 - test cases are grouped into directories below: 213 - basic: Test basic map formats 214 - misc: Test miscellaneous features that need to restart autofs service 215 - mntnet: Test features related to "-host" map 216 - mt: Test multi-thread features 217 - offset: Test maps using offset entries 218 - others: Test miscellaneous features that do NOT need to restart 219 autofs service 220 - readdir: Test readdir operation on miscellaneous maps 221 222 - all maps setup for each subdir (except misc) are found in stf_setup/cleanup 223 inside the subdir. 224 225 NOTE: 226 ==== 227 228 - Some tests depend heavily on the naming services (e.g. NIS+) and the 229 automounter maps provided by the server. Tests may fail with unstable 230 naming services and if the maps are being changed at the time the tests 231 are running or if there is any inconsistency between naming maps. 232 233 - Tests may also fail if the network between the local system and SERVER 234 is unstable. 235 236 Please verify the failing tests by running them manually, 237 e.g. "stf_execute -r ck_master". 238 239 - Since the suite includes negative tests, there will be lots of messages 240 printed from the console when those tests are executed. If the tests 241 pass, you can just ignore those messages. 242 243 GOTCHAS: 244 ======= 245 1. Tests ck_cachefs01 and ck_cachefs02 may fail with the following message: 246 ck_cachefs01: FAILED 247 2:stat(/ck_cachefs01_A/t1/.t1) failed : Permission denied 248 249 and the console of the client shows: 250 Jul 9 19:23:55 pulsanet1 cachefs: WARNING: CacheFS: not enough space 251 to create sos3:_small_CFS_t1:_cfs_t1 252 253 This is NOT a test bug, but a bug in ON/CacheFS. See bugid 4090474 for 254 more information and this bug has been closed as "WILL NOT FIX". 255 256 257 ************************************************************************** 258 259 260 Last Modified: 08/05/29 261