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 (c) 2012 by Delphix. All rights reserved.
14# Copyright 2020 Tintri by DDN, Inc. All rights reserved.
15#
16
17libmlrpc Unit Test Suite README
18
191. Building and installing this Unit Test Suite
202. Running this Unit Test Suite
213. Test results
22
23--------------------------------------------------------------------------------
24
251. Building and installing this Unit Test Suite
26
27This Test Suite runs under the testrunner framework (which can be installed
28as pkg:/system/test/testrunner). To build both this Unit Test Suite and the
29testrunner without running a full nightly:
30
31	build_machine$ bldenv [-d] <your_env_file>
32	build_machine$ cd $SRC/test
33	build_machine$ dmake install
34	build_machine$ cd $SRC/pkg
35	build_machine$ dmake install
36
37Then set the publisher on the test machine to point to your repository and
38install the Utils Unit Test Suite.
39
40	test_machine# pkg install pkg:/system/test/libmlrpctest
41
42Note, the framework will be installed automatically, as this test suite
43depends on it.
44
452. Running this Unit Test Suite
46
47The pre-requisites for running the this Unit Test Suite are:
48	- A non-root user with the ability to sudo(1M) to root without a
49	  password or the root user must run the test.
50	    (The samlogon test requires a user with 'solaris.smf.read.smb'
51	    authorization, such as root.)
52	- The libmlrpc library must be installed.
53	- The system must be joined to the domain.
54	- Certain information must be collected from a packet capture performing
55	    NTLM authentication against the system using a domain user, all from
56	    the NetrSamLogon(Ex) request:
57		- IDENTITY_INFO/Domain
58		- IDENTITY_INFO/Acct Name
59		- IDENTITY_INFO/Wkst Name
60		- three binary files, exported from Wireshark:
61		  1. NETWORK_INFO/Challenge (8 bytes)
62		  2. First NETWORK_INFO/'LM Chal resp'/Bytes array/'LM Chal resp'
63		      (variable - the first is NT)
64		  3. Second NETWORK_INFO/'LM Chal resp'/Bytes array/'LM Chal resp'
65		      (variable - the second is LM)
66	- Enter configuration data in /opt/libmlrpc-tests/cfg/samlogon.config.
67
68Once the pre-requisites are satisfied, simply run the script:
69
70	test_machine$ /opt/libmlrpc-tests/bin/libmlrpctest
71
723. Test results
73
74While the Unit Test Suite is running, one informational line is printed at
75the end of each test, and a results summary is printed at the end of the run.
76The results summary includes the location of the complete logs, which is of the
77form /var/tmp/test_results/<ISO 8601 date>.