blob: 9b99bdacb6cff39e16dc12c2020669ac4ab04729 [file] [log] [blame]
Darren Tucker9d9d4482003-09-04 15:39:54 +10001Overview.
2
3$ ./configure && make tests
4
5You'll see some progress info. A failure will cause either the make to
6abort or the driver script to report a "FATAL" failure.
7
8The test consists of 2 parts. The first is the file-based tests which is
9driven by the Makefile, and the second is a set of network or proxycommand
10based tests, which are driven by a driver script (test-exec.sh) which is
11called multiple times by the Makefile.
12
13Failures in the first part will cause the Makefile to return an error.
14Failures in the second part will print a "FATAL" message for the failed
15test and continue.
16
17OpenBSD has a system-wide regression test suite. OpenSSH Portable's test
18suite is based on OpenBSD's with modifications.
19
20
21Environment variables.
22
23SUDO: path to sudo command, if desired. Note that some systems (notably
24 systems using PAM) require sudo to execute some tests.
Tim Rice3084a612004-01-26 09:37:09 -080025TEST_SSH_TRACE: set to "yes" for verbose output from tests
Darren Tucker9d9d4482003-09-04 15:39:54 +100026TEST_SSH_QUIET: set to "yes" to suppress non-fatal output.
27TEST_SSH_x: path to "ssh" command under test, where x=SSH,SSHD,SSHAGENT,SSHADD
28 SSHKEYGEN,SSHKEYSCAN,SFTP,SFTPSERVER
29OBJ: used by test scripts to access build dir.
Darren Tucker7a06f622004-06-16 21:08:32 +100030TEST_SHELL: shell used for running the test scripts.
Darren Tuckerf9eb2b02004-06-28 15:52:50 +100031TEST_SSH_PORT: TCP port to be used for the listening tests.
Damien Miller07ad3892010-08-17 07:04:28 +100032TEST_SSH_SSH_CONFOPTS: Configuration directives to be added to ssh_config
Darren Tuckerf9eb2b02004-06-28 15:52:50 +100033 before running each test.
Darren Tuckerd9b9b432015-04-07 09:10:00 +100034TEST_SSH_SSHD_CONFOPTS: Configuration directives to be added to sshd_config
Darren Tuckerf9eb2b02004-06-28 15:52:50 +100035 before running each test.
Darren Tucker9d9d4482003-09-04 15:39:54 +100036
37
38Individual tests.
39
Darren Tucker13fbe572004-06-18 14:14:43 +100040You can run an individual test from the top-level Makefile, eg:
41$ make tests LTESTS=agent-timeout
42
43If you need to manipulate the environment more you can invoke test-exec.sh
44directly if you set up the path to find the binaries under test and the
45test scripts themselves, for example:
Darren Tucker9d9d4482003-09-04 15:39:54 +100046
47$ cd regress
Darren Tucker7a06f622004-06-16 21:08:32 +100048$ PATH=`pwd`/..:$PATH:. TEST_SHELL=/bin/sh sh test-exec.sh `pwd` \
49 agent-timeout.sh
Darren Tucker9d9d4482003-09-04 15:39:54 +100050ok agent timeout test
51
52
53Files.
54
55test-exec.sh: the main test driver. Sets environment, creates config files
56and keys and runs the specified test.
57
58At the time of writing, the individual tests are:
59agent-timeout.sh: agent timeout test
60agent.sh: simple agent test
61broken-pipe.sh: broken pipe test
62connect-privsep.sh: proxy connect with privsep
63connect.sh: simple connect
64exit-status.sh: remote exit status
65forwarding.sh: local and remote forwarding
66keygen-change.sh: change passphrase for key
67keyscan.sh: keyscan
68proto-mismatch.sh: protocol version mismatch
69proto-version.sh: sshd version with different protocol combinations
70proxy-connect.sh: proxy connect
71sftp.sh: basic sftp put/get
72ssh-com-client.sh: connect with ssh.com client
73ssh-com-keygen.sh: ssh.com key import
74ssh-com-sftp.sh: basic sftp put/get with ssh.com server
75ssh-com.sh: connect to ssh.com server
76stderr-after-eof.sh: stderr data after eof
77stderr-data.sh: stderr data transfer
78transfer.sh: transfer data
79try-ciphers.sh: try ciphers
80yes-head.sh: yes pipe head
81
82
83Problems?
84
85Run the failing test with shell tracing (-x) turned on:
86$ PATH=`pwd`/..:$PATH:. sh -x test-exec.sh `pwd` agent-timeout.sh
87
88Failed tests can be difficult to diagnose. Suggestions:
89- run the individual test via ./test-exec.sh `pwd` [testname]
90- set LogLevel to VERBOSE in test-exec.sh and enable syslogging of
91 auth.debug (eg to /var/log/authlog).
92
93
94Known Issues.
95
Darren Tucker1f85dc72005-10-03 20:14:18 +100096- Similarly, if you do not have "scp" in your system's $PATH then the
97 multiplex scp tests will fail (since the system's shell startup scripts
98 will determine where the shell started by sshd will look for scp).
99
Darren Tuckerbad5f2d2004-08-17 22:31:32 +1000100- Recent GNU coreutils deprecate "head -[n]": this will cause the yes-head
101 test to fail. The old behaviour can be restored by setting (and
102 exporting) _POSIX2_VERSION=199209 before running the tests.
103
Damien Millerf22019b2011-05-05 13:48:37 +1000104$Id: README.regress,v 1.12 2011/05/05 03:48:42 djm Exp $