1 #
2 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
3 # Use is subject to license terms.
4 #
5
6 #
7 # BSD 3 Clause License
8 #
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
11 # are met:
12 # - Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 #
15 # - Redistributions in binary form must reproduce the above copyright
16 # notice, this list of conditions and the following disclaimer in
17 # the documentation and/or other materials provided with the
18 # distribution.
19 #
20 # - Neither the name of Sun Microsystems, Inc. nor the
21 # names of its contributors may be used to endorse or promote products
22 # derived from this software without specific prior written permission.
23 #
24 # THIS SOFTWARE IS PROVIDED BY SUN MICROSYSTEMS, INC. "AS IS" AND ANY
25 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 # DISCLAIMED. IN NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY
28 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES
30 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 #
35
36 #
37 # ident "@(#)README 1.4 09/04/08 SMI"
38 #
39
40
41 DESCRIPTION
42 ===========
43 This is the NDMP (Network Data Management Protocol) Protocol test suite.
44 It automates protocol testing of NDMP server.
45
46
47 PREREQUISITES
48 =============
49 1. A tape library is required.
50 2. The CTI-TET test harness lite package SUNWstc-tetlite is required.
51 You can find the package on the OpenSolaris Test Consolidation:
52 http://www.opensolaris.org/os/community/testing/testsuites/ctifortet/
53
54
55 CTI-TET INSTALLATION
56 ====================
57 In the majority of cases, the CTI-TET lite harness can be installed
58 from packages. Installation is via the standard Solaris package
59 installation tool, pkgadd(1M). The package is named SUNWstc-tetlite
60 and it installs into "/opt" by default.
61
62 To install SUNWstc-tetlite, enter the following command:
63
64 root# pkgadd -d <package_location> SUNWstc-tetlite
65
66 where <package_location> is the path containing the SUNWstc-tetlite
67 package directory. 'root#' indicates that this command must be run
68 as root.
69
70 o It is recommended that SUNWstc-tetlite be installed from scratch,
71 rather than on top of an existing installation. Thus, if a copy
72 of SUNWstc-tetlite is already installed, remove it:
73
74 root# pkgrm SUNWstc-tetlite
75
76
77 TEST SUITE INSTALLATION
78 =======================
79 In the majority of cases, the test suite can be installed from packages.
80 The package is called SUNWstc-storage-ndmp-protocol and it installs into
81 "/opt" by default. Installation is via the standard Solaris package
82 installation tool, pkgadd(1M). To install SUNWstc-storage-ndmp-protocol,
83 enter the following command:
84
85 root# pkgadd -d <package_location> SUNWstc-storage-ndmp-protocol
86
87 where <package_location> is the path containing the ndmp-protocol test
88 suite package directory.
89
90 It is recommended that the test suite package be installed from scratch,
91 rather than on top of an existing installation. Thus, if a version of
92 the test suite package is already installed, first remove it:
93
94 root# pkgrm SUNWstc-storage-ndmp-protocol
95
96 It is acceptable to use an NFS-accessible installation of the test suite.
97
98 ALTERNATIVELY, the test suite souce code can be installed and the test
99 suite package can be built from source. This is optional. Instructions
100 for building the test suite are provided in the section titled "BUILDING
101 TEST SUITE (OPTIONAL)".
102
103
104 TEST SUITE CONFIGURATION
105 ========================
106 Test suite configuration must be performed as 'root'.
107
108 1. Set the following environment variables
109
110 export TET_ROOT=/opt/SUNWstc-tetlite
111 export CTI_ROOT=$TET_ROOT/contrib/ctitools
112 export PATH=$PATH:$CTI_ROOT/bin
113 export TET_SUITE_ROOT=/opt/SUNWstc-storage-ndmp-protocol
114
115 The values used above for the different variables are for example only.
116 Make sure to substitute the correct directory paths based on the actual
117 install locations of SUNWstc-tetlite and SUNWstc-storage-ndmp-protocol
118
119 2. To configure the test suite
120
121 a. run the following command with the option to configure the test suite
122
123 root# run_test -v NDMP_SERVER_IP=<ip-address> \
124 -v NDMP_USER=<User Name> -v NDMP_PASSWORD=<password> \
125 -v NDMP_AUTH=NDMP_AUTH_TEXT -v NDMP_TAPE_DEV=<tape dev> \
126 -v NDMP_ROBOT=<tape changer> ndmp/protocol configure \
127 -v NDMP_FS=<NDMP server File system to backup>
128
129 Example: run_test -v NDMP_SERVER_IP=10.12.178.122 -v NDMP_USER=admin
130 -v NDMP_PASSWORD=admin -v NDMP_AUTH=NDMP_AUTH_TEXT
131 -v NDMP_TAPE_DEV=/dev/rmt/0n
132 -v NDMP_ROBOT=/dev/scsi/changer/c1t210000E08B86CCAFd2
133 -v NDMP_FS=/var/log/
134 ndmp/protocol configure
135
136 3. Configuration the NDMP server machine.
137
138 a. Create an NDMP admin user on the ndmp server:
139 root# ndmpadm enable -a <auth-type> <-u username>
140
141 For example
142 root# ndmpadm enable -a cleartext -u admin
143
144 A password will be required; please enter 'admin' as password.
145
146 b. Configure a tape library on the NDMP server machine.
147
148 Get the device mappings on the NDMP server by issuing:
149 root# ndmpadm show-devices
150
151 Make sure that tape-device has a tape loaded in the drive and is not busy.
152 The following command displays the status of the magnetic tape drive
153
154 root# mt -f <device-name> status
155
156
157 TEST SUITE EXECUTION
158 ====================
159 The test suite must be executed as root.
160
161 If not already done, from the configuration phase, do the following to
162 set the environmental variables:
163
164 Using NDMP Protocol test suite package:
165 export TET_ROOT=/opt/SUNWstc-tetlite
166 export CTI_ROOT=$TET_ROOT/contrib/ctitools
167 export PATH=$PATH:$CTI_ROOT/bin
168 export TET_SUITE_ROOT=/opt/SUNWstc-storage-ndmp-protocol
169
170 Once again, the values used above are for example only. Please make
171 sure to set the correct values based on the actual install location
172 of SUNWstc-tetlite and SUNWstc-storage-ndmp-protocol
173
174 To run the entire test suite do the following:
175
176 root# run_test ndmp/protocol
177
178 To run all the test purposes:
179
180 root# run_test ndmp/protocol all
181
182 To execute individual scenarios, run:
183 root# run_test ndmp/protocol <scenario>
184 For example:
185 root# run_test ndmp/protocol MOVER
186
187 To execute a Test Purpose within a scenario, run:
188 root# run_test ndmp/protocol \
189 <scenario>/<test case dir>:<test purpose number>
190 For example:
191 root# run_test ndmp/protocol MOVER/tp_MOVER_ABORT_ISE
192
193 Test case directories are CONFIG, DATA, POST, SCSI, MOVER and TAPE.
194 The log file will be located in /var/tmp/tests directory.
195
196
197 Note: You can define customized test scenarios by adding entries to
198 the test scenario file: $TET_SUITE_ROOT/ndmp/protocol/tet_scen.
199
200 For how to edit the test scenario file, refer to the TET user guide at:
201 http://tetworks.opengroup.org/tet/
202
203 TEST SUITE UNCONFIGURATION
204 ==========================
205 The test suite must be unconfigured as root.
206 root# run_test ndmp/protocol unconfigure
207
208 BUILDING THE TEST SUITE (OPTIONAL)
209 =================================
210 The following pre-requisites must be satisfied before the test
211 suite can be successfully built from source.
212
213 . Sun Solaris 10 and above Operating System is required.
214 . Sun Studio 11 should be installed
215 . Perl 5.8.4 should be installed
216 . /usr/ccs/bin/make should be used for making
217
218 Executing tests using precompiled test suite packages is the method we
219 strongly recommend. However, if, for some reason, you need to build
220 test suite binaries from source, simply do the following:
221
222 1. Install SUNWstc-tetlite (see instructions earlier in this file)
223 2. Obtain the ndmp protocol test suite source
224 3. Build Test Suite Binaries
225
226 (a) Install SUNWstc-tetlite
227
228 Install the precompiled SUNWstc-tetlite package. Detailed instructions
229 are provided earlier in this file.
230
231 (b) Obtain the ndmp-protocol test suite source
232
233 Obtain the test suite source code from your source code repository
234 which will contain the following directory structure
235 <WS_ROOT>/usr/src/suites/storage/ndmp/protocol
236
237 where <WS_ROOT> is the root of the workspace under which the
238 ndmp-protocol test suite resides.
239
240 (c) Build Test Suite Binaries
241
242 Building test suite binaries does not need 'root' permissions.
243
244 user$ export TET_ROOT=/opt/SUNWstc-tetlite
245 user$ export CTI_ROOT=$TET_ROOT/contrib/ctitools
246 user$ export PATH=$PATH:$CTI_ROOT/bin
247 user$ export TET_SUITE_ROOT=<WS_ROOT>/usr/src/suites/storage/
248 user$ cd <WS_ROOT>/usr/src/suites/storage/ndmp/protocol
249
250 where <WS_ROOT> is the root of the workspace under which the
251 ndmp-protocol test suite resides. Use 'make' to compile the source:
252
253 user$ make
254 ...
255 ... (many lines of 'make' and shell output ensue)
256 ...
257
258 The above command, if successful, will build the test suite 'proto'
259 directory. After a successful build, the proto area can be used to
260 construct the test suite package:
261
262 user$ make package
263
264 This will build the package supported by the current machine's system
265 architecure (e.g., if building on an x64 system, packages relevant to
266 the "i386" architecture will be built.)
267
268 Once the test suite package has been built, install the package as
269 instructed in the section "TEST SUITE INSTALLATION" in order to
270 install the test suite.
271
272