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 2009 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 # ident "@(#)README 1.1 09/02/23 SMI" 27 # 28 29 DESCRIPTION 30 =========== 31 This is a test suite for fwflash(1m) utility. 32 33 PREREQUISITES 34 ============ 35 1. fwflash(1) utility on Solaris or OpenSolaris. 36 2. The test harness package SUNWstc-tetlite is required to be installed. 37 You can find the package on OpenSolaris Test Consolidation: 38 http://www.opensolaris.org/os/community/testing/testsuites/ctifortet/ 39 3. At least one InfiniBand (IB) device or SCSI Enclosure Services (ses or sgen) 40 devices was connected to test host. 41 42 CTI-TET PACKAGE INSTALLATION 43 =========================== 44 To install CTI-TET, obtain the SUNWstc-tetlite package and, as root, 45 do the following: 46 # pkgadd -d <package_location> SUNWstc-tetlite 47 where <package_location> is the path containing the SUNWstc-tetlite 48 package directory. 49 50 TEST SUITE INSTALLATION 51 ======================= 52 In the majority of cases, the test suite can be installed from packages. 53 The package is called SUNWstc-storage-fwflash and it installs into "/opt" 54 by default. Alternatively, you may choose to download the test suite 55 source and build the binaries in the source tree. Both methods are 56 equally acceptable. 57 58 I. Using the test suite package 59 60 Test suite package installation and uninstallation must be done as root. 61 Follow these steps: 62 63 1. Obtain the SUNWstc-storage-fwflash package 64 2. Use the pkgadd(1M) command to install it: 65 66 root# pkgadd -d <package_location> SUNWstc-storage-fwflash 67 68 where <package_location> is the path to the test suite package 69 directory. 70 71 o It is recommended that the test suite package be installed from 72 scratch, rather than on top of an existing installation. Thus, 73 if a version of SUNWstc-storage-fwflash is already installed, first 74 remove it: 75 76 # pkgrm SUNWstc-storage-fwflash 77 78 79 II. Using the source code of this test suite 80 81 Test suite source code compilation does not need to be done as root. 82 Follow these steps: 83 84 1. Obtain the fwflash source code. 85 2. Set up your environment and invoke 'make' 86 87 $ export CTI_ROOT=/opt/SUNWstc-tetlite/contrib/ctitools 88 $ export PATH=$CTI_ROOT/bin:$PATH 89 $ /usr/ccs/bin/make 90 91 The build can also install binaries into a proto directory below the 92 workspace root. The workspace root is the directory under which the 93 usr/src directory resides (in the example above, the workspace root 94 is "/export/STC"). To install binaries into the proto area, do: 95 96 user$ /usr/ccs/bin/make install 97 98 In addition, test suite binary packages can be constructed using the 99 contents of the proto directory. To build test suite packages, do: 100 101 user$ /usr/ccs/bin/make package 102 103 This can be done instead of, or in addition to, 'make install'. The 104 package thus constructed will be placed in the 'packages' directory 105 under the workspace root. And you can install the package from 'packages' 106 directory. 107 108 TEST SUITE CONFIGURATION 109 ======================== 110 Test suite configuration is required to be done as root. 111 112 I. Using fwflash package. 113 114 Set the following environment variables: 115 116 export CTI_ROOT=$TET_ROOT/contrib/ctitools 117 export PATH=$PATH:$CTI_ROOT/bin 118 119 II. Using fwflash source code. 120 121 Set the following environment variables: 122 123 export CTI_ROOT=$TET_ROOT/contrib/ctitools 124 export PATH=$PATH:$CTI_ROOT/bin 125 126 2. To configure the test suite 127 128 Assume the flashable device is /devices/pci@0,0/pci8086,25e3/pci1000,30a0@0/ 129 ses@74,0:0 and the firmware is /export/fwimage.sw, then user can run following 130 command to configure the test suite firstly. 131 132 # run_test -v FWIMAGE=/export/fwimage.sw -v FWDEV1=/devices/pci@0,0/ 133 pci8086,25e3/pci1000,30a0@0/ses@74,0:0 fwflash configure 134 135 Another variable that can be set in the configuration line: 136 137 debug - [ TRUE || FALSE ] default FALSE 138 139 Following is an example to enable debug: 140 # run_test -v FWIMAGE=/export/fwimage.sw -v FWDEV1=/devices/pci@0,0/ 141 pci8086,25e3/pci1000,30a0@0/ses@74,0:0 -v debug=TRUE fwflash configure 142 143 TEST SUITE EXECUTION 144 ==================== 145 The test suite must be executed as root. 146 147 If not already available from the configuration phase, set the 148 required environment variables: 149 150 I. Using fwflash package: 151 export CTI_ROOT=$TET_ROOT/contrib/ctitools 152 export PATH=$PATH:$CTI_ROOT/bin 153 154 II. Using fwflash source code: 155 export CTI_ROOT=$TET_ROOT/contrib/ctitools 156 export PATH=$PATH:$CTI_ROOT/bin 157 158 To run all fwflash regression tests, do the following: 159 root# run_test fwflash 160 (this will run all test purposes of the list and operate 161 cases) 162 163 To execute individual scenarios (list,operate): 164 root# run_test fwflash <scenario> 165 For example: 166 root# run_test fwflash operate 167 168 To execute a Test Purpose within a scenario operate: 169 root# run_test fwflash operate:<test purpose number> 170 For example: 171 root# run_test fwflash operate:1 172 173 NOTE: You can define customized test scenarios by adding entries to 174 the test scenario file: $CTI_SUITE/tet_scen. 175 176 For how to edit the test scenario file, refer to the TET user guide at: 177 http://tetworks.opengroup.org/tet/ 178 179 TEST SUITE UNCONFIGURATION 180 ========================== 181 182 # run_test fwflash unconfigure 183