Name Date Size #Lines LOC

..--

misc/H14-Sep-2021-576483

unittests/H14-Sep-2021-7,3366,204

MakefileHD14-Sep-20216.6 KiB234188

README.regressHD14-Sep-20213.7 KiB10578

addrmatch.shHD14-Sep-20212.1 KiB5746

agent-getpeereid.shHD14-Sep-20211.1 KiB5745

agent-pkcs11.shHD14-Sep-20211.9 KiB7254

agent-ptrace.shHD14-Sep-20211.3 KiB6755

agent-timeout.shHD14-Sep-2021928 3730

agent.shHD14-Sep-20212 KiB8268

allow-deny-users.shHD14-Sep-20211.2 KiB4129

banner.shHD14-Sep-20211.2 KiB4532

broken-pipe.shHD14-Sep-2021367 1611

brokenkeys.shHD14-Sep-2021477 2412

cert-file.shHD14-Sep-20215.6 KiB170122

cert-hostkey.shHD14-Sep-202110.1 KiB315268

cert-userkey.shHD14-Sep-202111.9 KiB391318

cfginclude.shHD14-Sep-20214.4 KiB294202

cfgmatch.shHD14-Sep-20213.8 KiB12898

cfgparse.shHD14-Sep-20212.2 KiB7652

check-perm.cHD14-Sep-20214.3 KiB206163

cipher-speed.shHD14-Sep-20211.2 KiB5242

conch-ciphers.shHD14-Sep-2021796 2919

connect-privsep.shHD14-Sep-20211.2 KiB4230

connect.shHD14-Sep-2021293 148

dhgex.shHD14-Sep-20211.5 KiB6147

dsa_ssh2.prvHD14-Sep-2021863 1514

dsa_ssh2.pubHD14-Sep-2021732 1413

dynamic-forward.shHD14-Sep-20211.5 KiB6050

envpass.shHD14-Sep-20211.5 KiB6148

exit-status.shHD14-Sep-2021677 2518

forcecommand.shHD14-Sep-20211.3 KiB4533

forward-control.shHD14-Sep-20215.4 KiB169143

forwarding.shHD14-Sep-20214.6 KiB150124

host-expand.shHD14-Sep-2021468 2012

hostkey-agent.shHD14-Sep-20211.6 KiB5441

hostkey-rotate.shHD14-Sep-20213.9 KiB11178

integrity.shHD14-Sep-20212.3 KiB7559

kextype.shHD14-Sep-2021587 2617

key-options.shHD14-Sep-20211.9 KiB7256

keygen-change.shHD14-Sep-2021639 2921

keygen-convert.shHD14-Sep-20211.1 KiB3422

keygen-knownhosts.shHD14-Sep-20215.8 KiB198132

keygen-moduli.shHD14-Sep-2021702 1910

keys-command.shHD14-Sep-20212.4 KiB8362

keyscan.shHD14-Sep-2021459 2516

keytype.shHD14-Sep-20211.9 KiB7462

krl.shHD14-Sep-20215.7 KiB186144

limit-keytype.shHD14-Sep-20213.6 KiB9868

localcommand.shHD14-Sep-2021398 1610

login-timeout.shHD14-Sep-2021947 3324

modpipe.cHD14-Sep-20213.8 KiB151123

moduli.inHD14-Sep-20211.6 KiB43

multiplex.shHD14-Sep-20217.1 KiB191153

multipubkey.shHD14-Sep-20212.3 KiB6742

netcat.cHD14-Sep-202139.8 KiB1,6601,293

portnum.shHD14-Sep-2021624 3527

principals-command.shHD14-Sep-20215.5 KiB169130

proto-mismatch.shHD14-Sep-2021473 2216

proto-version.shHD14-Sep-2021676 3730

proxy-connect.shHD14-Sep-2021973 3325

putty-ciphers.shHD14-Sep-2021692 2719

putty-kex.shHD14-Sep-2021546 2315

putty-transfer.shHD14-Sep-20211.1 KiB4233

reconfigure.shHD14-Sep-2021996 4834

reexec.shHD14-Sep-20211.1 KiB7145

rekey.shHD14-Sep-20214.1 KiB173150

rsa_openssh.prvHD14-Sep-2021883 1615

rsa_openssh.pubHD14-Sep-2021213 21

rsa_ssh2.prvHD14-Sep-2021924 1716

scp-ssh-wrapper.shHD14-Sep-2021914 6051

scp.shHD14-Sep-20213.5 KiB127101

setuid-allowed.cHD14-Sep-20211.4 KiB5831

sftp-badcmds.shHD14-Sep-20212.2 KiB6650

sftp-batch.shHD14-Sep-20211.2 KiB5638

sftp-chroot.shHD14-Sep-2021840 3221

sftp-cmds.shHD14-Sep-20217.3 KiB233174

sftp-glob.shHD14-Sep-20212.5 KiB7663

sftp-perm.shHD14-Sep-20215.2 KiB270217

sftp.shHD14-Sep-2021758 3326

ssh-com-client.shHD14-Sep-20213 KiB131102

ssh-com-keygen.shHD14-Sep-20211.4 KiB7564

ssh-com-sftp.shHD14-Sep-20211.2 KiB6654

ssh-com.shHD14-Sep-20212.7 KiB12095

ssh2putty.shHD14-Sep-2021693 3524

sshcfgparse.shHD14-Sep-20211.3 KiB3021

sshd-log-wrapper.shHD14-Sep-2021285 123

stderr-after-eof.shHD14-Sep-2021610 2517

stderr-data.shHD14-Sep-2021758 3024

t11.okHD14-Sep-202151 21

t4.okHD14-Sep-202152 21

t5.okHD14-Sep-202166 21

test-exec.shHD14-Sep-202112.6 KiB581458

transfer.shHD14-Sep-2021680 2721

try-ciphers.shHD14-Sep-20211,017 4333

valgrind-unit.shHD14-Sep-2021497 2113

yes-head.shHD14-Sep-2021451 1611

README.regress

1Overview.
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.
25TEST_SSH_TRACE: set to "yes" for verbose output from tests
26TEST_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.
30TEST_SHELL: shell used for running the test scripts.
31TEST_SSH_PORT: TCP port to be used for the listening tests.
32TEST_SSH_SSH_CONFOPTS: Configuration directives to be added to ssh_config
33	before running each test.
34TEST_SSH_SSHD_CONFOPTS: Configuration directives to be added to sshd_config
35	before running each test.
36
37
38Individual tests.
39
40You 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:
46
47$ cd regress
48$ PATH=`pwd`/..:$PATH:. TEST_SHELL=/bin/sh sh test-exec.sh `pwd` \
49    agent-timeout.sh
50ok 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
96- 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
100- 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
104$Id: README.regress,v 1.12 2011/05/05 03:48:42 djm Exp $
105