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 # ident "@(#)README 1.5 07/07/10 SMI" 27 # 28 29 30 DESCRIPTION: 31 =========== 32 This test suite is designed to test the functionality of the sharemgr 33 file system share configuration utility. 34 35 PREREQUISITES: 36 ============ 37 1. 4 slices on a spare disk are required to test the sharemgr functionality. 38 39 2. The cti-tet test harness lite package is required to be installed, 40 or be accessible via nfs. 41 42 43 CTI-TET PACKAGE INSTALLATION: 44 =========================== 45 As root do the following : 46 47 In the majority of cases, the test suite can be installed from packages. The 48 package is called SUNWstc-tetlite and installs into "/opt" by default. 49 Installation is via the standard Solaris package installation tool pkgadd(1m). 50 To install SUNWstc-tetlite simply enter the following command line: 51 52 # pkgadd -d <package location> SUNWstc-tetlite 53 54 Where <package location> refers to the path containing the SUNWstc-tetlite 55 package directory. 56 57 o It is recommended that you install the packages from scratch, 58 rather than on top of an existing installation. Thus, if an old 59 version of the tests is installed: 60 61 # pkgrm SUNWstc-tetlite 62 63 It is also acceptable to use an nfs accessible version of the SUNWstc-tetlite 64 package. 65 66 TEST SUITE INSTALLATION : 67 ======================= 68 69 As root do the following : 70 71 In the majority of cases, the test suite can be installed from packages. The 72 package is called SUNWstc-share and installs into "/opt" by default. 73 Installation is via the standard Solaris package installation tool pkgadd(1m). 74 To install SUNWstc-share simply enter the following command line: 75 76 # pkgadd -d <package location> SUNWstc-share 77 78 Where <package location> refers to the path containing the SUNWstc-share 79 package directory. 80 81 o It is recommended that you install the packages from scratch, 82 rather than on top of an existing installation. Thus, if an old 83 version of the tests is installed: 84 85 # pkgrm SUNWstc-share 86 87 It is also acceptable to use an nfs accessible version of the SUNWstc-share 88 package. 89 90 The test suite source can also be installed locally, built in the source 91 tree and run from that location. (optional) 92 93 As any user do the following after installing the test suite source : 94 95 1. TET_ROOT=/opt/SUNWstc-tetlite 96 2. export TET_ROOT 97 3. CTI_ROOT=$TET_ROOT/contrib/ctitools 98 4. export CTI_ROOT 99 5. TET_SUITE_ROOT=/export/home/cti_share/src/suites (e.g location) 100 6. export TET_SUITE_ROOT 101 7. cd $TET_SUITE_ROOT/share 102 8. /usr/ccs/bin/make 103 104 The build can also install into a proto directory below the defined CODEMGR_WS 105 environment variable. In addition, test suite packages can be built using 106 the proto directory and stored in the packages directory below the defined 107 CODEMGR_WS environment variable. For example : 108 109 Define CODEMGR_WS, if not already defined. 110 111 9. export CODEMGR_WS=<workspace root> 112 113 Build the test suite code and install it under CODEMGR_WS/proto with : 114 115 10. /usr/ccs/bin/make install 116 117 Create the tests suite package under CODEMGR_WS/packages : 118 119 11. /usr/ccs/bin/make package 120 121 122 TEST SUITE CONFIGURATION : 123 ======================== 124 125 As root do the following steps : 126 127 1. Set the following environment variables 128 export TET_ROOT=/opt/SUNWstc-tetlite 129 export CTI_ROOT=$TET_ROOT/contrib/ctitools 130 export TET_SUITE_ROOT=/opt/SUNWstc-share (installation path of suite) 131 PATH=$PATH:$CTI_ROOT/bin 132 export PATH 133 134 2. To configure the test suite : 135 136 # run_test -v share_disk="slice1,slice2,slice3,slice4" share [<ufs_|zfs_>]configure 137 138 where slice<n> is one of either /dev/dsk/cntndnsn, cntndnsn or a lofi device of the 139 format /dev/lofi/n. 140 141 4 slices are required for the test suite to operate on. The slices do not have 142 to have filesystems created on them. The test suite will create the appropriate 143 filesystem types on the devices given, based on the configuration type. This 144 means that any data on the slices given will be destroyed. 145 146 ufs_ configures strict ufs filesystems. 147 zfs_ configures strict zfs filesystems. 148 neither will configure a mix of ufs and zfs filesystems. 149 150 TEST SUITE EXECUTION : 151 ==================== 152 153 The test suite executions is required to be done as root. 154 155 If not already done, from the configuration phase do the following to 156 set the environment variables : 157 158 export TET_ROOT=/opt/SUNWstc-tetlite 159 export CTI_ROOT=$TET_ROOT/contrib/ctitools 160 export TET_SUITE_ROOT=/opt/SUNWstc-share (installation path of suite) 161 PATH=$PATH:$CTI_ROOT/bin 162 export PATH 163 164 To run the entire test suite do the following. 165 166 # run_test share 167 168 The following is the syntax of the command line usage : 169 170 # run_test share [<scenario>|tc_dir:[tp_list]] 171 172 additional examples using optional arguments : 173 174 # run_test share create 175 176 # run_test share sharemgr/create:3 177 178 TEST SUITE UNCONFIGURE : 179 ====================== 180 181 The unconfiguration of the test suite simply takes out the configuration file 182 for the current host, so that an nfs mounted point for execution can be used. 183 This does not unconfigure any shares that might have been left due to test suite 184 failure. 185 186 # run_test share unconfigure 187