README
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.5 09/05/21 SMI"
27 #
28
29 1. INTRODUCTION
30 2. HOW TO CONFIGURE CIFS CLIENT
31 3. HOW TO CONFIGURE SAMBA SERVER
32 4. HOW TO CONFIGURE SUN CIFS SERVER
33 5. HOW TO CONFIGURE WINDOWS 2003/2008 SERVER(MANUAL)
34 6. HOW TO CONFIGURE NAS SERVER(MANUAL)
35 7. HOW TO RUN THE TESTS
36 8. HOW TO CLEAN TEST ENVIRONMENT
37 9. HOW TO GET TEST RESULT AND LOGS
38 10. CONTACT US
39
40 1. INTRODUCTION
41
42 This test suite is designed for CIFS client testing. It needs
43 two machines (a test client and a CIFS server) and the test suite runs
44 on the client machine.
45
46 Client machine must run snv_84 or later. Server machine can
47 be one of the following five systems:
48
49 1. Samba Server (snv_84 or later)
50 2. Sun CIFS Server (snv_84 or later)
51 3. Windows 2003
52 4. Windows 2008
53 5. Sun NAS system
54
55 User must run the test suite as root
56
57 2. HOW TO CONFIGURE CIFS CLIENT
58
59 a. Select a client that runs on snv_84 or later
60
61 b. Install the SUNWstc-dtet package
62
63 - Create a text file named /tmp/INET_TET which only contain one word 'root'.
64 - Check this file content by using cat or more command. E.g.
65 # cat /tmp/INET_TET
66 root
67
68 - Add the SUNWstc-dtet package
69 # pkgadd -d <package-location> SUNWstc-dtet
70
71 c. Make sure the user has rsh access to server as root
72
73 - Create .rhosts file.
74 # echo "+" > ~root/.rhosts
75
76 CAUTION: THIS WILL MAKE THE SYSTEM TOTALLY INSECURE (any user
77 on any system can remote-login to the CIFS server as root)
78
79 - Modify /etc/default/login file to allow remote root access
80 # grep console /etc/default/login
81 #CONSOLE=/dev/console
82
83 - Enable rlogin service
84 # svcadm enable svc:/network/login:rlogin
85 # svcadm enable svc:/network/shell:default
86
87 d. Compile and install the test suite
88 There are two ways to set up the test environment.
89 1. Install the pre-built package,
90 2. Compile the source code and execute it.
91
92 1. Install test suite package
93 In majority of the cases, the test suite can be installed from
94 packages.
95
96 # pkgadd -d <package-location> SUNWstc-fs-cifs-client
97 E.g. # pkgadd -d /ws/stcnv-gate/packages/`uname -p` SUNWstc-fs-cifs-client
98
99 Always install a fresh copy of the test suite package. If a version
100 of the package is already installed on the system, first remove it:
101
102 # pkgrm SUNWstc-fs-cifs-client
103
104 ALTERNATIVELY, the test suite can be compiled from source. To do
105 this, perform the following steps.
106
107 - obtain the test suite source as a non-root user
108
109 Obtain the test suite source code from your source code repository
110 which will contain the following directory structure
111 <WS_ROOT>/usr/src/suites/fs/cifs-client
112
113 where <WS_ROOT> is the root of the workspace under which the
114 cifs-client test suite resides.
115
116 - set up CTI-TET environment variables and PATH
117
118 $ export CTI_ROOT=/opt/SUNWstc-dtet/contrib/ctitools
119 $ export PATH=$CTI_ROOT/bin:$PATH
120
121 - compile the test suite and create the test suite package
122
123 $ cd <WS_ROOT>/usr/src/suites/fs/cifs-client
124 $ /usr/ccs/bin/make package
125
126 This will create the installable test suite package corresponding
127 to the machine architecture of the build system. The package will
128 be placed in <WS_ROOT>/packages/<arch>
129
130 - install the test suite package
131
132 # pkgadd -d <WS_ROOT>/packages/<arch> SUNWstc-fs-cifs-client
133
134 2. Compile test suite source code(need not install package)
135 To do this, perform the following steps.
136
137 - obtain the test suite source as a non-root user
138
139 Obtain the test suite source code from your source code repository
140 which will contain the following directory structure
141 <WS_ROOT>/usr/src/suites/fs/cifs-client
142
143 where <WS_ROOT> is the root of the workspace under which the
144 cifs-client test suite resides.
145
146 - set up CTI-TET environment variables and PATH
147
148 $ export CTI_ROOT=/opt/SUNWstc-dtet/contrib/ctitools
149 $ export PATH=<PATH-of-cc>:$CTI_ROOT/bin:$PATH
150
151 - compile the test suite and create the test suite package
152
153 $ cd <WS_ROOT>/usr/src/suites/fs/cifs-client
154 $ /usr/ccs/bin/make
155 After compiling the source, any test case can be executed directly.
156
157 e. Setup the client for testing
158
159 - Setup local test directory. You need to have a free disk slice
160 larger than 11G. If you want to test UFS, run the following
161 command to create a UFS directory:
162 # run_test -v test_disk="c1t0d0s7" cifs-client ufs_create
163
164 If you want to test ZFS, run the following command to create
165 zfs test directory:
166 # run_test -v test_disk="c1t0d0s7" cifs-client zfs_create
167
168 - Create test users
169 # run_test cifs-client user_create
170
171 - Edit /opt/SUNWstc-dtet/systems.equiv file and add server
172 hostname int this file if it is Samba Server.
173
174 f. This testsuite also uses filebench, which is a framework of
175 file system workloads for measuring and comparing file system performance.
176 You can find more information about filebench and configuration on
177 opensolaris.org at
178 http://opensolaris.org/os/community/performance/filebench/
179
180 This testsuite uses the default configuration of filebench.
181
182
183 3. How TO CONFIGURE SAMBA SERVER
184
185 Do all the steps in section 2, except adding client's hostname
186 in /opt/SUNWstc-dtet/systems.equiv in last step.
187
188 Then run the following command:
189 # run_test cifs-client smbs_setup
190
191 4. HOW TO CONFIGURE THE SUN CIFS SERVER
192
193 Do all the steps in section 2, except adding client's hostname
194 in /opt/SUNWstc-dtet/systems.equiv in last step.
195
196 Then run the following command:
197 # run_test cifs-client cifss_setup
198
199 5. HOW TO CONFIGURE WINDOWS 2003/2008 SERVER(MANUAL)
200
201 a. Create test users
202 - Create user cifs_user and use "C_sun_123" as its password
203 - Create user cifs_user1 and use "C_sun_123" as its password
204 - Create user a_share and use "A_sun_123" as its password
205 - Create user b_share and use "B_sun_123" as its password
206
207 b. Create test directories
208 - Create three windows share directories in a partition which has
209 more than 4G free space. The directory names are public,
210 a_share and b_share.
211
212 c. Set permissions
213 - Assign read/write permission for the "public" share directory
214 to the following users: cifs_user, cifs_user1, a_share and
215 b_share.
216 - Assign read/write permission for the "a_share" share directory
217 to the following user: a_share.
218 - Assign read/write permission for the "b_share" share directory
219 to the following user: b_share.
220
221 d. Disable firewall
222
223 6. HOW TO CONFIGURE NAS SERVER(MANUAL)
224
225 On the browser, use "https://[NAS_Server]" url to login "Sun
226 StorageTek NAS OS Web Admin". Or on the Solaris terminal, telnet
227 the NAS Server and use menu command to open the "StorageTek
228 [NAS_model_No] NAS Menu" to do the following operations:
229
230 a. Create test users
231 - Create user cifs_user and use "C_sun_123" as its password
232 - Create user cifs_user1 and use "C_sun_123" as its password
233 - Create user a_share and use "A_sun_123" as its password
234 - Create user b_share and use "B_sun_123" as its password
235 b. Create test directories
236 - Create three share directories: public, a_share and b_share.
237 c. Configure the Domain
238 - Select "Domain Configuration" (CIFS/SMB Configuration on telnet)
239 or "Configure Domains and Workgroups" (on Web Admin)
240 d. Reboot the system
241 - Reboot the NAS Server to make the configuration effective.
242
243 7. HOW TO RUN THE TESTS
244
245 a. Export the environment variables
246 - same as step 2.c
247
248 b. Run tests
249
250 - To run the tests against a Samba server
251 # run_test -R <Server's host name> cifs-client all
252
253 - To run the tests against a CIFS server
254 # run_test -v SRV=<Server's host name> cifs-client all
255
256 - To run the tests against a Windows server
257 # run_test -v SRV=<Server's host name> cifs-client all
258
259 - To run the tests against Sun NAS server (We just run smbfs
260 tests for NAS Server)
261 # run_test -v SRV=<Server's host name> cifs-client smbfs
262 # run_test -v SRV=<Server's host name> cifs-client performance/filebench
263
264 - To run a single test case
265 # run_test -v SRV=<Server's host name> cifs-client \
266 <test_case_name>:<testcase_id>
267 For example:
268 # run_test -v SRV=<Server's host name> cifs-client smbfs/mvtest:1
269
270 8. HOW TO CLEAN UP TEST ENVIRONMENT
271
272 Here is the procedure to clean up test setup on client and server:
273
274 a. Client
275
276 - delete the users
277 # run_test cifs-client user_delete
278
279 - delete test directories
280 To delete UFS test directories:
281 # run_test cifs-client ufs_delete
282 To delete ZFS test directories:
283 # run_test cifs-client zfs_delete
284
285 b. Samba server
286
287 - clean up server setup
288 # run_test cifs-client smbs_clean
289
290 - delete test directories
291 To delete UFS test directories:
292 # run_test cifs-client ufs_delete
293 To delete ZFS test directories:
294 # run_test cifs-client zfs_delete
295
296 - delete test users
297 # run_test cifs-client user_delete
298
299 c. CIFS server
300
301 - clean up server setup
302 # run_test cifs-client cifss_clean
303 - delete the test directory
304 To delete UFS test directories:
305 # run_test cifs-client ufs_delete
306 To delete ZFS test directories:
307 # run_test cifs-client zfs_delete
308
309 - delete the users
310 # run_test cifs-client user_delete
311
312 9. HOW TO GET THE TEST RESULT AND LOGS
313
314 Test results are saved in a directory under /var/tmp, e.g.
315 /var/tmp/results.195672.
316
317 10. CONTACT US
318
319 If you have questions or comments on the test suite, please
320 send email to the STC_CONTACT alias mentioned in the STC.INFO
321 file of this test suite. Details on filing bugs against the test
322 suite are also included in the STC.INFO file.
323