1 #
   2 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
   3 # Use is subject to license terms.
   4 #
   5 # Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
   6 #
   7 #
   8 
   9 DESCRIPTION:
  10 ===========
  11 This test suite is mainly designed to test the functionality of COMSTAR 
  12 (Common Multiprotocol SCSI Target) 
  13 
  14 PREREQUISITES:
  15 ============
  16 1. Test configuration needs ISCSI Initiator and ISCSI Target hosts.
  17 
  18    On both hosts, it is desirable to have an additional 2 NICs for test 
  19    transports.  Hosts will have an on-board interface to house the host 
  20    IP address being used for ssh communication between the target and 
  21    initiator host.  The other two NICs should be configured with IPs
  22    under different subnets for physical multi-path. 
  23 
  24    The ISCSI Initiator host will reboot itself automatically during 
  25    Fault Injection testing.
  26 
  27 2. ISCSI Target Host should NOT have any existing LUs and related
  28    configuration information such as target group, host group, view 
  29    entry and mapping association before test execution. 
  30 
  31 3. ISCSI Target Host should disable other target port providers,
  32    for example by unloading FC target driver, disabling the SMF 
  33    service /system/iscsitgt.  Otherwise unxepected failures will
  34    be produced during test execution.
  35 
  36 4. ISCSI Initiator Host should NOT probe any LUs except the ISCSI 
  37    Target Host and be bound with only one ISCSI Target Host for testing.
  38 
  39 5. The SUNWstc-tetlite test harness package is required to be installed
  40    on the ISCSI Target host, or to be accessible via NFS.
  41 
  42 6. ISCSI Initiator and Target hosts should be set up to accept scp and 
  43    ssh from test hosts (by root) and also allow root remote login.
  44 
  45 7. ISCSI Initiator Host requires that the following package(s) are 
  46    installed on the test host:
  47         - SUNWdiskomizer 
  48         - The SunWdiskomizer pkg must be installed in the default directory:
  49           /opt/SUNWdiskomizer 
  50 
  51 It is assumed that the following INSTALLATION, CONFIGURATION, EXECUTION 
  52 steps are performed in a single shell environment, or, if they are performed
  53 in different shell environments, the environment variables CTI_ROOT and
  54 and PATH are set up properly.
  55 
  56 CTI-TET PACKAGE INSTALLATION:
  57 ===========================
  58 For example, as root do the following :
  59         pkgadd -d /ws/stcnv-gate/packages/`uname -p` SUNWstc-tetlite
  60 
  61 It is also acceptable to use an NFS-accessible location of the tetlite package.
  62 
  63 TEST SUITE INSTALLATION:
  64 =======================
  65 The test suite can be installed locally to the testing system or
  66 accessed via nfs over the network from a server.  For example, to install the
  67 test root, as root do:
  68         pkgadd -d /ws/stcnv-gate/packages/`uname -p` SUNWstc-storage-comstar
  69 
  70 It is also acceptable to use an NFS accessible location of the test suite
  71 package.
  72 
  73 TEST SUITE CONFIGURATION :
  74 ========================
  75 Test suite configuration must be done as root.
  76         
  77 1. Set up the following environment variables
  78         # CTI_ROOT=/opt/SUNWstc-tetlite/contrib/ctitools
  79         # PATH=$CTI_ROOT/bin:$PATH
  80 
  81 2. To configure the test suite :
  82 
  83 # run_test \
  84   -v TRANSPORT=SOCKETS
  85   -v EXPECT=<EXPECT Script Parser Location>
  86   -v ISCSI_THOST=<ISCSI Target IP Addr> \
  87   -v ISCSI_IHOST=<ISCSI Initiator IP Addr> \
  88   -v ISNS_HOST=<ISNS Target IP Addr> \
  89   -v "BDEVS=\"<Block disk device separated by space>\"" \ 
  90         (Example: -v "BDEVS=\"/dev/dsk/c0t1d0s2 /dev/dsk/c0t2d0s2\"")
  91   -v "RDEVS=\"<Raw disk device separated by space>\"" \ 
  92         (Example: -v "RDEVS=\"/dev/rdsk/c0t1d0s2 /dev/rdsk/c0t2d0s2\"")
  93   comstar-tests iscsi_configure
  94 
  95 The configuration file will be created as a result of the arguments specified 
  96 in the run_test command line.  
  97 
  98 Other configurable variables that can be set in the configuration line :
  99 
 100 TRANSPORT       - [ SOCKETS or ALL transport can be specified ]
 101                 - SOCKETS transport goes through only the ethernet interfaces
 102                 - ALL transport goes through all the networking interfaces
 103 
 104 EXPECT          - [ Expect script parser location ] is optional
 105                 - default is /usr/bin/expect
 106 
 107 ISCSI_THOST     - [ iscsi target host ip address ] is a must
 108                 - only supports one target initiator host nowadays
 109 
 110 ISCSI_IHOST     - [ iscsi initiator host ip address ] is a must
 111                 - only supports one iscsi initiator host nowadays
 112 
 113 ISNS_HOST       - [ isns server host ip address ] is a must
 114 
 115 BDEVS           - [ block disk device list ] is a must
 116 
 117 RDEVS           - [ raw disk device list ] is a must
 118 
 119 ISCSI_TARGET_SWITCH_PORT
 120                 - [ ethernet interface topology on switch ] is obsolete 
 121                   temporarily
 122                 - switch cable pull is unsupported currently
 123 
 124 RADIUS_HOST     - [ radius server host ip address ] is optional
 125                 - radius authentication feature is unsupported currently
 126                 - RADIUS_HOST defaults to ISCSI_IHOST implicitly for 
 127                   itadm utility testing
 128 
 129 TEST SUITE EXECUTION :
 130 ==================== 
 131 
 132 The following setup is required prior to the test run.
 133 
 134    - Allow root to do ssh and scp to/from the remote initiator.  Require .ssh setup 
 135      for root.
 136 
 137    - Allow root to log in remotely.  Require changes to /etc/ssh/sshd_config file.
 138      Make sure the following lines are in remote's sshd_config file.
 139 
 140              PermitRootLogin yes
 141              PermitRootLogin without-password
 142 
 143      and restart the service.
 144 
 145 The test suite execution is required to be done as root.
 146 
 147 To run the entire test suite do the following.
 148 
 149 # run_test comstar-tests iscsi
 150 
 151 To execute individual scenarios (itadm iscsi_auth iscsi_discovery iscsi_io
 152 iscsi_fs iscsi_smf iscsi_visible)
 153 
 154 # run_test comstar-tests <scenario>
 155 
 156 # run_test comstar-tests itadm
 157 
 158 To execute Test Purposes within a scenario :
 159 
 160 # run_test comstar-tests iscsi/<test case dir>:<test purpose number>
 161 
 162 # run_test comstar-tests iscsi/auth:1
 163 # run_test comstar-tests iscsi/auth:1-2
 164 # run_test comstar-tests iscsi/auth:1,2
 165 
 166 Test case directories are iscsi,itadm
 167 
 168 TEST SUITE UNCONFIGURE :
 169 ======================
 170 
 171 # run_test comstar-tests iscsi_unconfigure
 172 
 173