1 # 2 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 3 # Use is subject to license terms. 4 # 5 # ident "@(#)README.FC 1.6 09/04/14 SMI" 6 # 7 8 DESCRIPTION: 9 =========== 10 This test suite is mainly designed to test the functionality of COMSTAR 11 (Common Multiprotocol SCSI Target) 12 13 PREREQUISITES: 14 ============ 15 1. test configuration need FC Initiator and FC Target hosts, which are 16 both connected with Qlogic Switch. FC Initiator Host will reboot 17 itself automatically during Fault Injection testing. 18 19 2. FC Target Host should NOT have any existing LUs and related configuration 20 information such as target group, host group, view entry and mapping 21 association before test execution. 22 23 3. FC Target Host should disable other target port providers like disable 24 SMF service /network/iscsi/target, disable smf serverice /system/iscsitgt. 25 Otherwise, unexpected test failures will result. 26 27 4. FC Initiator Host should NOT probe any LUs except FC Target Host and 28 be bound to only one FC Target Host for testing. 29 30 5. The SUNWstc-tetlite test harness package is required to be installed, 31 or be accessible via nfs. 32 33 6. FC Initiator and Target hosts should accept rcp and rsh calls from 34 test hosts. 35 36 7. FC Initiator Host requires that the following package(s) are 37 installed on the test host: 38 - SUNWdiskomizer 39 location of latest version and install instructions at: 40 http://diskomizer.eng/latest/Downloading_Diskomizer.html 41 pkgadd -d http://diskomizer.eng.sun.com/6.1GA/SUNWdiskomizer.pkg 42 The SunWdiskomizer pkg must be installed in the default directory: 43 /opt/SUNWdiskomizer 44 45 8. For QLOGIC HBA, it's mandatory to switch into target mode by manual 46 procedures after OS refresh installation. Please refer to the web page 47 on opensolaris.org: 48 http://www.opensolaris.org/os/project/comstar/Documentation/AdminGuide 49 50 It is assumed that following INSTALLATION, CONFIGURATION, EXECUTION steps are 51 performed in a single shell environment. If they are performed in different 52 shell environment, please set up CTI_ROOT and PATH properly. 53 54 55 CTI-TET PACKAGE INSTALLATION: 56 ============================= 57 As root do the following : 58 pkgadd -d /ws/stcnv-gate/packages/`uname -p` SUNWstc-tetlite 59 60 It is also acceptable to use an NFS-accessible location of the tetlite package. 61 62 TEST SUITE INSTALLATION: 63 ======================= 64 The test suite can be installed locally to the testing system or 65 accessed via nfs over the network from a server. To install the 66 test root, as root do: 67 pkgadd -d /ws/stcnv-gate/packages/`uname -p` SUNWstc-storage-comstar 68 69 It is also acceptable to use an NFS accessible location of the test suite 70 package. 71 72 ALTERNATIVELY, the test suite source can be installed and built. To 73 build the test suite source, as any user, do: 74 $ workspace create /export/STC (example path) 75 $ bringover -p /ws/stcnv-gate -w /export/STC usr/closed/suites/storage/comstar 76 $ CTI_ROOT=/opt/SUNWstc-tetlite/contrib/ctitools 77 $ PATH=$CTI_ROOT/bin:$PATH 78 $ cd /export/STC/usr/closed/suites/storage/comstar 79 $ /usr/ccs/bin/make 80 81 To install test suite binaries in the proto tree, do 82 $ /usr/ccs/bin/make install 83 To create installable test suite packages, do 84 $ /usr/ccs/bin/make package 85 86 TEST SUITE CONFIGURATION: 87 ========================= 88 Test suite configuration must be done as root. 89 90 1. Set up the following environment variables 91 # CTI_ROOT=/opt/SUNWstc-tetlite/contrib/ctitools 92 # PATH=$CTI_ROOT/bin:$PATH 93 94 2. To configure the test suite : 95 96 # run_test \ 97 -v FC_IHOST=<FC Initiator IP Addr> \ 98 -v EXPECT=<EXPECT Script Parser Location> \ 99 -v "BDEVS=\"<Block disk device list separated by space>\"" \ 100 (Example: -v "BDEVS=\"/dev/dsk/c0t1d0s2 /dev/dsk/c0t2d0s2\"") 101 -v "RDEVS=\"<Raw disk device list separated by space>\"" \ 102 (Example: -v "RDEVS=\"/dev/rdsk/c0t1d0s2 /dev/rdsk/c0t2d0s2\"") 103 -v FC_TARGET_SWITCH_PORT=<FC Switch Model:FC Switch IP:Admin:Passwd:Port1,Port2...> \ 104 (Example: -v FC_TARGET_SWITCH_PORT=QLOGIC:127.0.0.1:admin:password:1,2) 105 comstar-tests fc_configure 106 107 The configuration file will be created as a result of the arguments specified 108 in the run_test command line. There is no need to manually edit the 109 configuration file as is required by some of the other test suites. 110 111 Other configurable variables that can be set in the configuration line : 112 113 FC_IHOST - [ fc initiator host ip address ] is a must 114 - only supports one fc initiator host nowadays 115 116 EXPECT - [ Expect script parser location ] is optional 117 - defaults to /usr/bin/expect 118 119 BDEVS - [ block disk device list ] is a must 120 121 RDEVS - [ raw disk device list ] is a must 122 123 FC_TARGET_SWITCH_PORT 124 - [ fc target host topology in fabric switch ] is a must 125 - QLOGIC and BROCADE fabric switches are supported 126 - for fault injection testing of target side cable pull 127 128 TEST SUITE EXECUTION : 129 ==================== 130 The test suite execution is required to be done as root. 131 132 To run the entire test suite do the following. 133 134 # run_test comstar-tests fc 135 136 To execute individual scenarios (sbdadm stmfadm misc fcinfo libstmf) 137 138 # run_test comstar-tests <scenario> 139 140 # run_test comstar-tests sbdadm 141 142 To execute Test Purposes within a scenario : 143 144 # run_test comstar-tests sbdadm/<test case dir>:<test purpose number> 145 146 # run_test comstar-tests sbdadm/create:1 147 # run_test comstar-tests stmfadm/create:1-2 148 # run_test comstar-tests fc/fault/forcelip:1,2 149 150 Test case directories are sbdadm, stmfadm, misc, fault, and libstmf 151 152 TEST SUITE UNCONFIGURE : 153 ====================== 154 155 # run_test comstar-tests fc_unconfigure