1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2021 Tintri by DDN, Inc. All rights reserved.
14#
15
16SMB Server Test Suite README
17
181. Building and installing the SMB Server Test Suite
192. Running the SMB Server Test Suite
203. Test Results
21
22--------------------------------------------------------------------------------
23
241. Building and installing the SMB Server Test Suite
25
26The SMB Server test suite uses external programs including:
27	smbtorture (and more to come)
28which is installed via a package dependency on:
29	service/network/samba
30Those are run by python and ksh wrappers found here.
31
32To build, just do:
33	cd $SRC/test/smbsrv-tests
34	make install
35
36To install the full suite, run:
37	pkg install pkg:/system/test/smbsrvtest
38
39--------------------------------------------------------------------------------
40
412. Running the SMB Server Test Suite
42
43The default configuration:
44	/opt/smbsrv-tests/include/default.cfg
45runs tests against a server instance on "localhost",
46using a share named "test" and user=test, pw=test
47
48It's common to copy that default.cfg to something new
49and modify the SMBT_... variables to specify different
50host, share, user, etc.
51
52To run all tests using the default configuration run:
53	/opt/smbsrv-tests/bin/smbsrvtests
54
55To run all tests using a different configuration:
56	/opt/smbsrv-tests/bin/smbsrvtests -c config_file
57
58You can also run individual tests found under:
59	/opt/smbsrv-tests/tests/*
60For example:
61	/opt/smbsrv-tests/tests/smbtorture/runst-smb2
62
63These take similar options (eg. -c config_file).
64
65To run only a subset of the tests, you can pass match patterns
66as additional arguments to the individual test, eg
67	/opt/smbsrv-tests/tests/smbtorture/runst-smb2 smb2.lease
68
69--------------------------------------------------------------------------------
70
713. Test Results
72
73While the SMB Server Test Suite is running, one informational line is
74printed for each test, ending with one of:
75	PASS, FAIL, SKIP, KILLED, UNKNOWN
76
77The test outputs can be found in:
78	/var/tmp/test_results/smbsrv-tests/
79For example:
80	smbtor-smb2-20210317T162827.summary
81	smbtor-smb2-20210317T162827.log
82
83The *.summary file is the same as what's shown while the test runs.
84The *.log file is the detailed output from the test program(s).
85