1*96c8483aSYuri Pankov# 2*96c8483aSYuri Pankov# CDDL HEADER START 3*96c8483aSYuri Pankov# 4*96c8483aSYuri Pankov# The contents of this file are subject to the terms of the 5*96c8483aSYuri Pankov# Common Development and Distribution License (the "License"). 6*96c8483aSYuri Pankov# You may not use this file except in compliance with the License. 7*96c8483aSYuri Pankov# 8*96c8483aSYuri Pankov# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*96c8483aSYuri Pankov# or http://www.opensolaris.org/os/licensing. 10*96c8483aSYuri Pankov# See the License for the specific language governing permissions 11*96c8483aSYuri Pankov# and limitations under the License. 12*96c8483aSYuri Pankov# 13*96c8483aSYuri Pankov# When distributing Covered Code, include this CDDL HEADER in each 14*96c8483aSYuri Pankov# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*96c8483aSYuri Pankov# If applicable, add the following below this CDDL HEADER, with the 16*96c8483aSYuri Pankov# fields enclosed by brackets "[]" replaced with your own identifying 17*96c8483aSYuri Pankov# information: Portions Copyright [yyyy] [name of copyright owner] 18*96c8483aSYuri Pankov# 19*96c8483aSYuri Pankov# CDDL HEADER END 20*96c8483aSYuri Pankov# 21*96c8483aSYuri Pankov 22*96c8483aSYuri Pankov# 23*96c8483aSYuri Pankov# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 24*96c8483aSYuri Pankov# Copyright 2015 Nexenta Systems, Inc. All rights reserved. 25*96c8483aSYuri Pankov# 26*96c8483aSYuri Pankov 27*96c8483aSYuri Pankov 28*96c8483aSYuri PankovContents: 29*96c8483aSYuri Pankov 30*96c8483aSYuri Pankov1. Introduction 31*96c8483aSYuri Pankov2. How to configure SMB client 32*96c8483aSYuri Pankov3. How to configure native SMB server 33*96c8483aSYuri Pankov4. How to configure Windows 2003/2008 server (manual) 34*96c8483aSYuri Pankov5. How to run the tests 35*96c8483aSYuri Pankov6. How to get test result and logs 36*96c8483aSYuri Pankov 37*96c8483aSYuri Pankov 38*96c8483aSYuri Pankov1. Introduction 39*96c8483aSYuri Pankov 40*96c8483aSYuri PankovThis test suite is designed for SMB client testing. It needs 41*96c8483aSYuri Pankovtwo machines (a test client and a SMB server) and the test suite runs 42*96c8483aSYuri Pankovon the client machine. 43*96c8483aSYuri Pankov 44*96c8483aSYuri PankovServer machine can be one of the following systems: 45*96c8483aSYuri Pankov 46*96c8483aSYuri Pankov 1. Native SMB Server 47*96c8483aSYuri Pankov 2. Windows 2003 48*96c8483aSYuri Pankov 3. Windows 2008 49*96c8483aSYuri Pankov 50*96c8483aSYuri PankovUser must run the test suite as an ordinary user (not root) 51*96c8483aSYuri Pankovand that user must be able to "sudo" without a password. 52*96c8483aSYuri Pankov 53*96c8483aSYuri PankovThis testsuite also uses filebench, a framework of file system 54*96c8483aSYuri Pankovworkloads for measuring and comparing file system performance. 55*96c8483aSYuri PankovThis testsuite uses the default configuration of filebench. 56*96c8483aSYuri Pankov 57*96c8483aSYuri Pankov 58*96c8483aSYuri Pankov2. How to configure SMB client 59*96c8483aSYuri Pankov 60*96c8483aSYuri Pankov - Install the "expect" package 61*96c8483aSYuri Pankov 62*96c8483aSYuri Pankov # pkg install shell/expect 63*96c8483aSYuri Pankov 64*96c8483aSYuri Pankov - Install the "Test Runner" package 65*96c8483aSYuri Pankov 66*96c8483aSYuri Pankov # pkg install system/test/testrunner 67*96c8483aSYuri Pankov 68*96c8483aSYuri Pankov - Create test directory, owned by whoever will run these tests. 69*96c8483aSYuri Pankov 70*96c8483aSYuri Pankov # mkdir /var/tmp/smbclnt 71*96c8483aSYuri Pankov # chown $USER /var/tmp/smbclnt 72*96c8483aSYuri Pankov 73*96c8483aSYuri Pankov - Create additional test users: smbusera, smbuserb, smbuserc 74*96c8483aSYuri Pankov 75*96c8483aSYuri Pankov # useradd -u 20100 -g 1 -d /export/home/smbusera smbusera 76*96c8483aSYuri Pankov # useradd -u 20101 -g 1 -d /export/home/smbuserb smbuserb 77*96c8483aSYuri Pankov # useradd -u 20102 -g 1 -d /export/home/smbuserc smbuserc 78*96c8483aSYuri Pankov 79*96c8483aSYuri Pankov Set passwords on those accounts, i.e. 80*96c8483aSYuri Pankov 81*96c8483aSYuri Pankov # echo A_nex_123 | passwd smbusera 82*96c8483aSYuri Pankov # echo B_nex_123 | passwd smbuserb 83*96c8483aSYuri Pankov # echo C_nex_123 | passwd smbuserc 84*96c8483aSYuri Pankov 85*96c8483aSYuri Pankov Make sure those account names and passwords agree with the 86*96c8483aSYuri Pankov variable settings in ../include/default_cfg.ksh 87*96c8483aSYuri Pankov The accounts, UIDs, and passwords can be whatever you like, 88*96c8483aSYuri Pankov but must be consistent with default_cfg.ksh 89*96c8483aSYuri Pankov 90*96c8483aSYuri Pankov3. How to configure native SMB server 91*96c8483aSYuri Pankov 92*96c8483aSYuri Pankov - Do as described in step 4 (windows server) 93*96c8483aSYuri Pankov 94*96c8483aSYuri Pankov 95*96c8483aSYuri Pankov4. How to configure Windows 2003/2008 server (manual) 96*96c8483aSYuri Pankov 97*96c8483aSYuri Pankov - Create test users (listed names and passwords are the default 98*96c8483aSYuri Pankov ones, check config/config file to see/change them) 99*96c8483aSYuri Pankov - Create user smbusera and use "A_nex_123" as its password 100*96c8483aSYuri Pankov - Create user smbuserb and use "B_nex_123" as its password 101*96c8483aSYuri Pankov - Create user smbuserc and use "C_nex_123" as its password 102*96c8483aSYuri Pankov 103*96c8483aSYuri Pankov - Create test directories 104*96c8483aSYuri Pankov - Create three windows share directories in a partition which has 105*96c8483aSYuri Pankov more than 4G free space. The directory names are public, 106*96c8483aSYuri Pankov a_share and b_share. 107*96c8483aSYuri Pankov 108*96c8483aSYuri Pankov - Set permissions 109*96c8483aSYuri Pankov - Assign read/write permission for the "public" share directory 110*96c8483aSYuri Pankov to the following users: smbusera, smbuserb, smbuserc 111*96c8483aSYuri Pankov - Assign read/write permission for the "a_share" share directory 112*96c8483aSYuri Pankov to the following user: smbusera. 113*96c8483aSYuri Pankov - Assign read/write permission for the "b_share" share directory 114*96c8483aSYuri Pankov to the following user: smbuserb. 115*96c8483aSYuri Pankov 116*96c8483aSYuri Pankov - Disable firewall 117*96c8483aSYuri Pankov 118*96c8483aSYuri Pankov 119*96c8483aSYuri Pankov5. How to run the tests 120*96c8483aSYuri Pankov 121*96c8483aSYuri Pankov - Prerequisites: configure client and server (see above). 122*96c8483aSYuri Pankov 123*96c8483aSYuri Pankov - Install an "exepct" package, i.e. with IPS 124*96c8483aSYuri Pankov pkg install shell/expect 125*96c8483aSYuri Pankov 126*96c8483aSYuri Pankov - Export the environment variables: 127*96c8483aSYuri Pankov 128*96c8483aSYuri Pankov # export SRV=servername 129*96c8483aSYuri Pankov 130*96c8483aSYuri Pankov - To run the all test cases, use the following command 131*96c8483aSYuri Pankov 132*96c8483aSYuri Pankov # /opt/smbclient-tests/bin/smbclienttest 133*96c8483aSYuri Pankov 134*96c8483aSYuri Pankov - To run a single test case, create a custom "run file" 135*96c8483aSYuri Pankov based on: /opt/smbclient-tests/runfiles/default.run 136*96c8483aSYuri Pankov and specify that run file via: 137*96c8483aSYuri Pankov 138*96c8483aSYuri Pankov # /opt/smbclient-tests/bin/smbclienttest -c custom.run 139*96c8483aSYuri Pankov 140*96c8483aSYuri Pankov 141*96c8483aSYuri Pankov6. How to get the test result and logs 142*96c8483aSYuri Pankov 143*96c8483aSYuri PankovTest results are saved in a directory under /var/tmp, e.g. 144*96c8483aSYuri Pankov/var/tmp/test_results/{date_stamp} 145