summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
Commit message (Collapse)AuthorAgeFilesLines
* upstream: Remove SUDO in proxy command wrapper. Anything that needsdtucker@openbsd.org2023-03-021-5/+5
| | | | | | sudo is already run by it, and it breaks if root isn't in sudoers. OpenBSD-Regress-ID: 6cf22fda32a89c16915f31a6ed9bbdbef2a3bac9
* upstream: Fix breakage on dhgex test.dtucker@openbsd.org2023-03-021-6/+9
| | | | | | | | | This was due to the sshd logs being written to the wrong log file. While there, make save_debug_logs less verbose, write the name of the tarball to regress.log and use $SUDO to remove the old symlinks (which shouldn't be needed, but won't hurt). Initial problem spotted by anton@. OpenBSD-Regress-ID: 9c44fb9cd418e6ff31165e7a6c1f9f11a6d19f5b
* upstream: Remove old log symlinksdtucker@openbsd.org2023-03-021-3/+5
| | | | | | | before creating new ones. In -portable some platforms don't like overwriting existing symlinks. OpenBSD-Regress-ID: 7e7ddc0beb73e945e1c4c58d51c8a125b518120f
* upstream: Rework logging for the regression tests.dtucker@openbsd.org2023-03-011-15/+65
| | | | | | | | | | | | | | | | | | Previously we would log to ssh.log and sshd.log, but that is insufficient for tests that have more than one concurent ssh/sshd. Instead, we'll log to separate datestamped files in a $OBJ/log/ and leave a symlink at the previous location pointing at the most recent instance with an entry in regress.log showing which files were created at each point. This should be sufficient to reconstruct what happened even for tests that use multiple instances of each program. If the test fails, tar up all of the logs for later analysis. This will let us also capture the output from some of the other tools which was previously sent to /dev/null although most of those will be in future commits. OpenBSD-Regress-ID: f802aa9e7fa51d1a01225c05fb0412d015c33e24
* Revert explicit chmods on private keys.Darren Tucker2023-02-251-3/+0
| | | | | This should no longer be needed on Cygwin test runners due to previous commit.
* Explicitly set permissions on user and host keys.Darren Tucker2023-02-241-0/+3
| | | | | On cygwin, the umask might not be sufficient. Should fix tests on Github runners.
* Always use the openssl binary configure tells us.Darren Tucker2023-02-201-1/+2
| | | | | This fixes tests on platforms that do not have the openssl tool installed at all.
* upstream: Move scp path setting to a helper function. The previousdtucker@openbsd.org2023-01-131-8/+13
| | | | | | | | commit to add scp to the test sshd's path causes the t-envpass test to fail when the test scp is given using a fully qualified path. Put this in a helper function and only call it from the scp tests. OpenBSD-Regress-ID: 7533dc1c4265c1de716abb062957994195b36df4
* upstream: Add scp's path to test sshd's PATH.dtucker@openbsd.org2023-01-131-1/+8
| | | | | | | | If the scp we're testing is fully qualified (eg it's not in the system PATH) then add its path to the under-test sshd's PATH so we can find it. Prompted by bz#3518. OpenBSD-Regress-ID: 7df4f5a0be3aa135495b7e5a6719d3cbc26cc4c0
* upstream: Restore missing "!" in TEST_SSH_ELAPSED_TIMES test.dtucker@openbsd.org2022-07-251-2/+2
| | | | OpenBSD-Regress-ID: 38783f9676ec348c5a792caecee9a16e354b37b0
* upstream: Test TEST_SSH_ELAPSED_TIMES for empty string notdtucker@openbsd.org2022-07-251-2/+2
| | | | | | | executable. No-op on most platforms but should prevent warnings in -portable on systems that don't have 'date %s'. OpenBSD-Regress-ID: e39d79867b8065e33d0c5926fa1a31f85659d2a4
* Convert "have_prog" function into "which".Darren Tucker2022-07-231-1/+9
| | | | | | | "which" and its behaviour is not standardized, so convert the existing have_prog function into "which" so we can rely on it being available and what its semantics are. Add a have_prog wrapper that maintains the existing behaviour.
* upstream: Add TEST_REGRESS_CACHE_DIR.dtucker@openbsd.org2022-07-041-1/+28
| | | | | | | If set, it is used to cache regress test names that have succeeded and skip those on a re-run. OpenBSD-Regress-ID: a7570dd29a58df59f2cca647c3c2ec989b49f247
* find sk-dummy.so when build_dir != src_dirDamien Miller2022-02-171-0/+2
| | | | spotted by Corinna Vinschen; feedback & ok dtucker@
* Improve compatibility of early exit trap handling.Darren Tucker2022-01-201-2/+7
| | | | | | | | | Dash (as used by the github runners) has some differences in its trap builtin: - it doesn't have -p (which is fine, that's not in posix). - it doesn't work in a subshell (which turns out to be in compliance with posix, which means bash isn't). - it doesn't work in a pipeline, ie "trap|cat" produces no output.
* Invoke EXIT handler early when using Valgrind.Darren Tucker2022-01-191-0/+13
| | | | | | | | | When using Valgrind, we need to wait for all invoked programs to complete before checking their valgrind logs. Some tests, notably agent-restrict, set an EXIT trap handler to clean up things like ssh-agent, but those do not get invoked until test-exec.sh exits. This causes the Valgrind wait to deadlock, so if present invoke the EXIT handler before checking the Valgrind logs.
* Remove sort wrapper.Darren Tucker2022-01-131-6/+0
| | | | agent-restrict now takes care of this itself.
* Add "rev" command replacement if needed.Darren Tucker2022-01-121-0/+6
|
* Add wrapper for "sort" to set LC_ALL=C.Darren Tucker2022-01-101-0/+6
| | | | Found by djm, this should make sorts stable and reduce test flakiness.
* upstream: Don't explicitly set HostbasedAuthentication indtucker@openbsd.org2022-01-071-2/+1
| | | | | | | sshd_config. It defaults to "no", and not explicitly setting it allows us to enable it for the (optional) hostbased test. OpenBSD-Regress-ID: aa8e3548eb5793721641d26e56c29f363b767c0c
* upstream: Log command invocation while debugging.dtucker@openbsd.org2022-01-051-1/+2
| | | | | | This will aid in manually reproducing failing commands. OpenBSD-Regress-ID: b4aba8d5ac5675ceebeeeefa3261ce344e67333a
* Move the fgrep replacement to hostkey-rotate.sh.Darren Tucker2021-09-241-19/+0
| | | | | The fgrep replacement for buggy greps doesn't work in the sftp-glob test so move it to just where we know it's needed.
* Replacement function for buggy fgrep.Darren Tucker2021-09-241-0/+19
| | | | | | GNU (f)grep <=2.18, as shipped by FreeBSD<=12 and NetBSD<=9 will occasionally fail to find ssh host keys in the hostkey-rotate test. If we have those versions, use awk instead.
* upstream: Add a function to skip remaining tests.dtucker@openbsd.org2021-09-011-1/+9
| | | | | | | Many tests skip tests for various reasons but not in a consistent way and don't always clean up, so add that and switch the tests that do that over. OpenBSD-Regress-ID: 72d2ec90a3ee8849486956a808811734281af735
* upstream: Although it's POSIX, not all shells used in Portable supportdtucker@openbsd.org2021-08-081-2/+2
| | | | | | the implicit 'in "$@"' after 'for i'. OpenBSD-Regress-ID: 3c9aec6bca4868f85d2742b6ba5223fce110bdbc
* Move portable specific settings down.Darren Tucker2021-08-081-24/+26
| | | | | | This brings the top hunk of the file back in sync with OpenBSD so patches to the CVS Id should apply instead of always being rejected.
* upstream: Move setting of USER further down the startup In portabledtucker@openbsd.org2021-08-081-15/+15
| | | | | | | we have to change this and having it in the same hunk as the CVS Id string means applying changes fails every. single. time. OpenBSD-Regress-ID: 87cd603eb6db58c9b430bf90adacb7f90864429b
* upstream: Drop -q in ssh-log-wrapper.sh to preserve logs.dtucker@openbsd.org2021-08-081-4/+9
| | | | | | | | | | scp and sftp like to add -q to the command line passed to ssh which overrides the LogLevel we set in the config files and suppresses output to the debug logs so drop any "-q" from the invoked ssh. In the one case where we actually want to use -q in the banner test, call the ssh binary directly bypassing the logging wrapper. OpenBSD-Regress-ID: e2c97d3c964bda33a751374c56f65cdb29755b75
* upstream: Replace OPENSSL as the variable that points to thedtucker@openbsd.org2021-07-251-4/+4
| | | | | | | | | openssl binary with OPENSSL_BIN. This will allow us to use the OPENSSL variable from mk.conf or the make(1) command line indicating if we're building with our without OpenSSL, and ultimately get the regress tests working in the OPENSSL=no configuration. OpenBSD-Regress-ID: 2d788fade3264d7803e5b54cae8875963f688c4e
* upstream: Set umask when creating hostkeys to prevent excessivedtucker@openbsd.org2021-06-101-2/+2
| | | | | | permissions warning. OpenBSD-Regress-ID: 382841db0ee28dfef7f7bffbd511803e1b8ab0ef
* Check for $OPENSSL in md5 fallback too.Darren Tucker2021-06-021-0/+2
|
* upstream: Use a default value for $OPENSSL,dtucker@openbsd.org2021-06-021-2/+2
| | | | | | | allowing it to be overridden. Do the same in the PuTTY tests since it's needed there and not exported by test-exec.sh. OpenBSD-Regress-ID: c49dcd6aa7602a8606b7afa192196ca1fa65de16
* upstream: Find openssl binary via environment variable. Thisdtucker@openbsd.org2021-06-011-1/+5
| | | | | | | allows overriding if necessary (eg in -portable where we're testing against a specific version of OpenSSL). OpenBSD-Regress-ID: 491f39cae9e762c71aa4bf045803d077139815c5
* Remove only use of warn().Darren Tucker2021-04-071-6/+0
| | | | | | | The warn() function is only used in one place in portable and does not exist upstream. Upgrade the only instance it's used to fail() (the privsep/sandbox+proxyconnect, from back when that was new) and remove the now-unused function.
* Move make_tmpdir() into portable-specific area.Darren Tucker2021-04-071-6/+6
| | | | | Reduces diff vs OpenBSD and makes it more likely diffs will apply cleanly.
* upstream: Add TEST_SSH_ELAPSED_TIMES environment variable to print thedtucker@openbsd.org2021-04-071-1/+10
| | | | | | | elapsed time in seconds of each test. This depends on "date +%s" which is not specified by POSIX but is commonly implemented. OpenBSD-Regress-ID: ec3c8c19ff49b2192116a0a646ee7c9b944e8a9c
* Move the TEST_SSH_PORT section down a bit.Darren Tucker2021-04-071-6/+6
| | | | | This groups the portable-specific changes together and makes it a little more likely that patches will apply cleanly.
* upstream: Add TEST_SSH_MODULI_FILE variable to allow overriding of thedtucker@openbsd.org2021-03-131-2/+7
| | | | | | moduli file used during the test run. OpenBSD-Regress-ID: be10f785263120edb64fc87db0e0d6570a10220a
* upstream: Make sure puttygen is new enough to successfully run thedtucker@openbsd.org2021-02-171-10/+9
| | | | | | PuTTY interop tests, otherwise skip them. OpenBSD-Regress-ID: 34565bb50b8aec58331ed02a5e9e0a9a929bef51
* Add a hostname function for systems that don't have it.Darren Tucker2021-02-061-0/+9
| | | | | | Some systems don't have a hostname command (it's not required by POSIX). The do have uname -n (which is), but as found by tim@ some others (eg UnixWare) do not report the FQDN from uname -n.
* ensure $LOGNAME is set in testsDamien Miller2020-12-221-0/+4
|
* Skip security key tests if ENABLE_SK not set.Darren Tucker2020-05-051-1/+3
|
* Pass configure's egrep through to test-exec.sh.Darren Tucker2020-04-221-0/+10
| | | | | | Use it to create a wrapper function to call it from tests. Fixes the keygen-comment test on platforms with impoverished default egrep (eg Solaris).
* upstream: Indicate if we're using a cached key in trace output.dtucker@openbsd.org2020-04-051-3/+5
| | | | OpenBSD-Regress-ID: 409a7b0e59d1272890fda507651c0c3d2d3c0d89
* upstream: regress test for sshd_config Include directive; from Jakubdjm@openbsd.org2020-02-011-1/+2
| | | | | | Jelen OpenBSD-Regress-ID: 0d9224de3297c7a5f51ba68d6e3725a2a9345fa4
* upstream: Move setting $NC into test-exec since it's now used bydtucker@openbsd.org2020-01-251-1/+4
| | | | | | | multiple tests, and in -portable we use our own local copy to avoid portability problems. OpenBSD-Regress-ID: ceb78445fcaac317bec2fc51b3f0d9589048c114
* upstream: Do not warn about permissions on symlinks.dtucker@openbsd.org2020-01-241-2/+2
| | | | OpenBSD-Regress-ID: 339d4cbae224bd8743ffad9c3afb0cf3cb66c357
* upstream: When checking for unsafe directories, ignore non-directoriesdtucker@openbsd.org2020-01-231-4/+6
| | | | | | (ie symlinks, where permissions are not relevant). OpenBSD-Regress-ID: fb6cfc8b022becb62b2dcb99ed3f072b3326e501
* upstream: Check for and warn about StrictModes permission problems. ok tb@dtucker@openbsd.org2020-01-231-1/+24
| | | | OpenBSD-Regress-ID: 4841704ccdee50ee7efc6035bc686695c6ac2991
* upstream: pass SSH_SK_HELPER explicitly past $SUDO to avoid it gettingdjm@openbsd.org2020-01-211-3/+4
| | | | | | cleared; with dtucker@ OpenBSD-Regress-ID: 03178a0580324bf0dff28f7eac6c3edbc5407f8e