NameDateSize

..19-Mar-2024319

addrmatch.shH A D08-Sep-20212.4 KiB

agent-getpeereid.shH A D17-Mar-20231.4 KiB

agent-pkcs11-cert.shH A D07-Jan-20242.9 KiB

agent-pkcs11-restrict.shH A D07-Jan-20245.6 KiB

agent-pkcs11.shH A D07-Jan-20241.2 KiB

agent-ptrace.shH A D11-Aug-20231.4 KiB

agent-restrict.shH A D17-Mar-202314.6 KiB

agent-subprocess.shH A D08-Sep-2021517

agent-timeout.shH A D08-Sep-2021986

agent.shH A D17-Mar-20236.6 KiB

allow-deny-users.shH A D08-Sep-20211.4 KiB

authinfo.shH A D22-Jun-2021574

banner.shH A D08-Sep-20211.3 KiB

broken-pipe.shH A D22-Jun-2021281

brokenkeys.shH A D22-Jun-2021462

cert-file.shH A D08-Sep-20215.3 KiB

cert-hostkey.shH A D14-Apr-202210.5 KiB

cert-userkey.shH A D14-Apr-202211.8 KiB

cfginclude.shH A D08-Sep-20214.5 KiB

cfgmatch.shH A D08-Sep-20214.8 KiB

cfgmatchlisten.shH A D22-Jun-20216.3 KiB

cfgparse.shH A D08-Sep-20212.2 KiB

channel-timeout.shH A D19-Mar-20244.3 KiB

check-perm.cH A D22-Jun-20214.3 KiB

cipher-speed.shH A D14-Apr-20221 KiB

conch-ciphers.shH A D07-Jan-2024879

connect-privsep.shH A D08-Sep-2021992

connect-uri.shH A D22-Jun-2021816

connect.shH A D08-Sep-2021407

connection-timeout.shH A D07-Feb-20232 KiB

dhgex.shH A D17-Mar-20231.5 KiB

dropbear-ciphers.shH A D07-Jan-2024937

dropbear-kex.shH A D07-Jan-2024928

dsa_ssh2.prvH A D22-Jun-2021863

dsa_ssh2.pubH A D22-Jun-2021732

dynamic-forward.shH A D19-Mar-20242.8 KiB

ed25519_openssh.prvH A D08-Sep-2021419

ed25519_openssh.pubH A D08-Sep-202181

envpass.shH A D21-Oct-20223.2 KiB

exit-status-signal.shH A D20-Dec-2021481

exit-status.shH A D22-Jun-2021562

forcecommand.shH A D07-Jan-20242.2 KiB

forward-control.shH A D11-Aug-20237.5 KiB

forwarding.shH A D08-Sep-20214.3 KiB

host-expand.shH A D08-Sep-2021384

hostbased.shH A D07-Feb-20232.1 KiB

hostkey-agent.shH A D14-Apr-20222.8 KiB

hostkey-rotate.shH A D14-Apr-20225.1 KiB

integrity.shH A D17-Mar-20232.3 KiB

kextype.shH A D08-Sep-2021587

key-options.shH A D08-Sep-20213.4 KiB

keygen-change.shH A D08-Sep-2021522

keygen-comment.shH A D08-Sep-20211.4 KiB

keygen-convert.shH A D08-Sep-20211.7 KiB

keygen-knownhosts.shH A D08-Sep-20216.4 KiB

keygen-moduli.shH A D08-Sep-2021900

keygen-sshfp.shH A D17-Mar-20231.7 KiB

keys-command.shH A D14-Apr-20222.4 KiB

keyscan.shH A D08-Sep-2021492

keytype.shH A D08-Sep-20212.4 KiB

knownhosts-command.shH A D20-Dec-20211.6 KiB

knownhosts.shH A D17-Mar-20231.2 KiB

krl.shH A D07-Feb-20237 KiB

limit-keytype.shH A D08-Sep-20214.7 KiB

localcommand.shH A D08-Sep-2021351

login-timeout.shH A D14-Apr-2022581

MakefileH A D19-Mar-20249.1 KiB

match-subsystem.shH A D10-Oct-20232.2 KiB

misc/H08-Sep-20215

mkdtemp.cH A D22-Jun-20211.5 KiB

modpipe.cH A D08-Sep-20213.8 KiB

moduli.inH A D22-Jun-20211.6 KiB

multiplex.shH A D19-Mar-20247.7 KiB

multipubkey.shH A D08-Sep-20212.7 KiB

netcat.cH A D08-Sep-202140.4 KiB

percent.shH A D11-Aug-20233.6 KiB

portnum.shH A D08-Sep-2021624

principals-command.shH A D14-Apr-20225.2 KiB

proto-mismatch.shH A D22-Jun-2021368

proto-version.shH A D22-Jun-2021527

proxy-connect.shH A D08-Sep-2021706

putty-ciphers.shH A D19-Mar-20241.4 KiB

putty-kex.shH A D19-Mar-2024970

putty-transfer.shH A D19-Mar-20241,015

README.regressH A D08-Sep-20215.7 KiB

reconfigure.shH A D08-Sep-20211.4 KiB

reexec.shH A D07-Feb-20231.1 KiB

rekey.shH A D08-Sep-20214.1 KiB

rsa_openssh.prvH A D22-Jun-2021883

rsa_openssh.pubH A D22-Jun-2021213

rsa_ssh2.prvH A D22-Jun-2021924

scp-ssh-wrapper.shH A D08-Sep-20211 KiB

scp-uri.shH A D07-Feb-20232.2 KiB

scp.shH A D10-Oct-20236 KiB

scp3.shH A D10-Oct-20231.7 KiB

servcfginclude.shH A D08-Sep-20213.8 KiB

setuid-allowed.cH A D22-Jun-20211.5 KiB

sftp-badcmds.shH A D08-Sep-20212.2 KiB

sftp-batch.shH A D22-Jun-20211.2 KiB

sftp-chroot.shH A D11-Aug-20231.2 KiB

sftp-cmds.shH A D21-Oct-20227.4 KiB

sftp-glob.shH A D22-Jun-20212.5 KiB

sftp-perm.shH A D08-Sep-20215.4 KiB

sftp-uri.shH A D22-Jun-20211.6 KiB

sftp.shH A D22-Jun-2021737

ssh-com-client.shH A D22-Jun-20213 KiB

ssh-com-keygen.shH A D22-Jun-20211.4 KiB

ssh-com-sftp.shH A D22-Jun-20211.2 KiB

ssh-com.shH A D22-Jun-20212.7 KiB

ssh2putty.shH A D08-Sep-2021746

sshcfgparse.shH A D08-Sep-20214.8 KiB

sshfp-connect.shH A D20-Dec-20212.8 KiB

sshsig.shH A D07-Jan-202421.9 KiB

stderr-after-eof.shH A D22-Jun-2021603

stderr-data.shH A D22-Jun-2021709

t11.okH A D22-Jun-202151

t4.okH A D22-Jun-202152

t5.okH A D22-Jun-202166

test-exec.shH A D19-Mar-202425.6 KiB

timestamp.cH A D17-Mar-20231.4 KiB

transfer.shH A D22-Jun-2021583

try-ciphers.shH A D22-Jun-2021715

unittests/H19-Mar-202416

valgrind-unit.shH A D08-Sep-2021640

yes-head.shH A D07-Feb-2023403

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
23SKIP_UNIT: Skip unit tests.
24SUDO: path to sudo/doas command, if desired. Note that some systems
25	(notably systems using PAM) require sudo to execute some tests.
26LTESTS: Whitespace separated list of tests (filenames without the .sh
27	extension) to run.
28SKIP_LTESTS: Whitespace separated list of tests to skip.
29OBJ: used by test scripts to access build dir.
30TEST_SHELL: shell used for running the test scripts.
31TEST_SSH_FAIL_FATAL: set to "yes" to make any failure abort the test
32	currently in progress.
33TEST_SSH_PORT: TCP port to be used for the listening tests.
34TEST_SSH_QUIET: set to "yes" to suppress non-fatal output.
35TEST_SSH_SSHD_CONFOPTS: Configuration directives to be added to sshd_config
36	before running each test.
37TEST_SSH_SSH_CONFOPTS: Configuration directives to be added to
38	ssh_config before running each test.
39TEST_SSH_TRACE: set to "yes" for verbose output from tests 
40TEST_SSH_x: path to "ssh" command under test, where x is one of
41	SSH, SSHD, SSHAGENT, SSHADD, SSHKEYGEN, SSHKEYSCAN, SFTP or
42	SFTPSERVER
43USE_VALGRIND: Run the tests under valgrind memory checker.
44
45
46Individual tests.
47
48You can run an individual test from the top-level Makefile, eg:
49$ make tests LTESTS=agent-timeout
50
51If you need to manipulate the environment more you can invoke test-exec.sh
52directly if you set up the path to find the binaries under test and the
53test scripts themselves, for example:
54
55$ cd regress
56$ PATH=`pwd`/..:$PATH:. TEST_SHELL=/bin/sh sh test-exec.sh `pwd` \
57    agent-timeout.sh
58ok agent timeout test
59
60
61Files.
62
63test-exec.sh: the main test driver. Sets environment, creates config files
64and keys and runs the specified test.
65
66At the time of writing, the individual tests are:
67connect.sh:		simple connect
68proxy-connect.sh:	proxy connect
69connect-privsep.sh:	proxy connect with privsep
70connect-uri.sh:		uri connect
71proto-version.sh:	sshd version with different protocol combinations
72proto-mismatch.sh:	protocol version mismatch
73exit-status.sh:		remote exit status
74envpass.sh:		environment passing
75transfer.sh:		transfer data
76banner.sh:		banner
77rekey.sh:		rekey
78stderr-data.sh:		stderr data transfer
79stderr-after-eof.sh:	stderr data after eof
80broken-pipe.sh:		broken pipe test
81try-ciphers.sh:		try ciphers
82yes-head.sh:		yes pipe head
83login-timeout.sh:	connect after login grace timeout
84agent.sh:		simple connect via agent
85agent-getpeereid.sh:	disallow agent attach from other uid
86agent-timeout.sh:	agent timeout test
87agent-ptrace.sh:	disallow agent ptrace attach
88keyscan.sh:		keyscan
89keygen-change.sh:	change passphrase for key
90keygen-convert.sh:	convert keys
91keygen-moduli.sh:	keygen moduli
92key-options.sh:		key options
93scp.sh:			scp
94scp-uri.sh:		scp-uri
95sftp.sh:		basic sftp put/get
96sftp-chroot.sh:		sftp in chroot
97sftp-cmds.sh:		sftp command
98sftp-badcmds.sh:	sftp invalid commands
99sftp-batch.sh:		sftp batchfile
100sftp-glob.sh:		sftp glob
101sftp-perm.sh:		sftp permissions
102sftp-uri.sh:		sftp-uri
103ssh-com-client.sh:	connect with ssh.com client
104ssh-com-keygen.sh:	ssh.com key import
105ssh-com-sftp.sh:	basic sftp put/get with ssh.com server
106ssh-com.sh:		connect to ssh.com server
107reconfigure.sh:		simple connect after reconfigure
108dynamic-forward.sh:	dynamic forwarding
109forwarding.sh:		local and remote forwarding
110multiplex.sh:		connection multiplexing
111reexec.sh:		reexec tests
112brokenkeys.sh:		broken keys
113sshcfgparse.sh:		ssh config parse
114cfgparse.sh:		sshd config parse
115cfgmatch.sh:		sshd_config match
116cfgmatchlisten.sh:	sshd_config matchlisten
117addrmatch.sh:		address match
118localcommand.sh:	localcommand
119forcecommand.sh:	forced command
120portnum.sh:		port number parsing
121keytype.sh:		login with different key types
122kextype.sh:		login with different key exchange algorithms
123cert-hostkey.sh		certified host keys
124cert-userkey.sh:	certified user keys
125host-expand.sh:		expand %h and %n
126keys-command.sh:	authorized keys from command
127forward-control.sh:	sshd control of local and remote forwarding
128integrity.sh:		integrity
129krl.sh:			key revocation lists
130multipubkey.sh:		multiple pubkey
131limit-keytype.sh:	restrict pubkey type
132hostkey-agent.sh:	hostkey agent
133keygen-knownhosts.sh:	ssh-keygen known_hosts
134hostkey-rotate.sh:	hostkey rotate
135principals-command.sh:	authorized principals command
136cert-file.sh:		ssh with certificates
137cfginclude.sh:		config include
138allow-deny-users.sh:	AllowUsers/DenyUsers
139authinfo.sh:		authinfo
140
141
142Problems?
143
144Run the failing test with shell tracing (-x) turned on:
145$ PATH=`pwd`/..:$PATH:. sh -x test-exec.sh `pwd` agent-timeout.sh
146
147Failed tests can be difficult to diagnose. Suggestions:
148- run the individual test via ./test-exec.sh `pwd` [testname]
149- set LogLevel to VERBOSE in test-exec.sh and enable syslogging of
150  auth.debug (eg to /var/log/authlog).
151
152
153Known Issues.
154
155- Similarly, if you do not have "scp" in your system's $PATH then the
156  multiplex scp tests will fail (since the system's shell startup scripts
157  will determine where the shell started by sshd will look for scp).
158
159- Recent GNU coreutils deprecate "head -[n]": this will cause the yes-head
160  test to fail.  The old behaviour can be restored by setting (and
161  exporting) _POSIX2_VERSION=199209 before running the tests.
162