xref: /illumos-gate/usr/src/test/smbclient-tests/doc/README (revision f52943a93040563107b95bccb9db87d9971ef47d)
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 2010 Sun Microsystems, Inc.  All rights reserved.
24# Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
25#
26
27
28Contents:
29
301. Introduction
312. How to configure SMB client
323. How to configure native SMB server
334. How to configure Windows 2003/2008 server (manual)
345. How to run the tests
356. How to get test result and logs
36
37
381. Introduction
39
40This test suite is designed for SMB client testing. It needs
41two machines (a test client and a SMB server) and the test suite runs
42on the client machine.
43
44Server machine can be one of the following systems:
45
46   1. Native SMB Server
47   2. Windows 2003
48   3. Windows 2008
49
50User must run the test suite as an ordinary user (not root)
51and that user must be able to "sudo" without a password.
52
53This testsuite also uses filebench, a framework of file system
54workloads for measuring and comparing file system performance.
55This testsuite uses the default configuration of filebench.
56
57
582. How to configure SMB client
59
60   - Install the "expect" package
61
62     # pkg install shell/expect
63
64   - Install the "Test Runner" package
65
66     # pkg install system/test/testrunner
67
68   - Create test directory, owned by whoever will run these tests.
69
70     # mkdir /var/tmp/smbclnt
71     # chown $USER /var/tmp/smbclnt
72
73   - Create additional test users: smbusera, smbuserb, smbuserc
74
75     # useradd -u 20100 -g 1 -d /export/home/smbusera smbusera
76     # useradd -u 20101 -g 1 -d /export/home/smbuserb smbuserb
77     # useradd -u 20102 -g 1 -d /export/home/smbuserc smbuserc
78
79     Set passwords on those accounts, i.e.
80
81     # echo A_nex_123 | passwd smbusera
82     # echo B_nex_123 | passwd smbuserb
83     # echo C_nex_123 | passwd smbuserc
84
85     Make sure those account names and passwords agree with the
86     variable settings in ../include/default_cfg.ksh
87     The accounts, UIDs, and passwords can be whatever you like,
88     but must be consistent with default_cfg.ksh
89
903. How to configure native SMB server
91
92   - Do as described in step 4 (windows server)
93
94
954. How to configure Windows 2003/2008 server (manual)
96
97   - Create test users (listed names and passwords are the default
98     ones, check config/config file to see/change them)
99     - Create user smbusera and use "A_nex_123" as its password
100     - Create user smbuserb and use "B_nex_123" as its password
101     - Create user smbuserc and use "C_nex_123" as its password
102
103   - Create test directories
104     - Create three windows share directories in a partition which has
105       more than 4G free space. The directory names are public,
106       a_share and b_share.
107
108   - Set permissions
109     - Assign read/write permission for the "public" share directory
110       to the following users: smbusera, smbuserb, smbuserc
111     - Assign read/write permission for the "a_share" share directory
112       to the following user: smbusera.
113     - Assign read/write permission for the "b_share" share directory
114       to the following user: smbuserb.
115
116   - Disable firewall
117
118
1195. How to run the tests
120
121   - Prerequisites: configure client and server (see above).
122
123   - Install an "exepct" package, i.e. with IPS
124	pkg install shell/expect
125
126   - Export the environment variables:
127
128     # export SRV=servername
129
130   - To run the all test cases, use the following command
131
132     # /opt/smbclient-tests/bin/smbclienttest
133
134   - To run a single test case, create a custom "run file"
135     based on: /opt/smbclient-tests/runfiles/default.run
136     and specify that run file via:
137
138     # /opt/smbclient-tests/bin/smbclienttest -c custom.run
139
140
1416. How to get the test result and logs
142
143Test results are saved in a directory under /var/tmp, e.g.
144/var/tmp/test_results/{date_stamp}
145