... and ssh and sshd log wrappers before recreating them. Prevents "can't
create" errors during tests when running tests without SUDO after having
run them with SUDO.
OpenBSD-Regress-ID: 2f0a83532e3dccd673a9bf0291090277268c69a6
by current OpenSSH. Allows subsequent test runs to work if OpenSSH is
rebuilt w/out OpenSSL.
OpenBSD-Regress-ID: e0129eb2b1d31771105903a8055216fbba20a770
to always generate ed25519 keys, other types only if OpenSSH has support
for the corresponding key type.
OpenBSD-Regress-ID: 8f91f12604cddb9f8d93aa34f3f93a3f6074395d
Handle replacement of 'id' the same way as we do other Portable specific
replacements in test-exec.sh. This brings percent.sh back into sync
with upstream.
$TEST_SHELL. Fixes test when run by a user whose login shell is tcsh.
Found by vinschen at redhat.com.
OpenBSD-Regress-ID: f68d79e7f00caa8d216ebe00ee5f0adbb944062a
Factor out PuTTY and call only when needed.
This allows us to avoid PuTTY key setup when it's not needed, which
speeds up the overall test run by a couple of percent.
OpenBSD-Regress-ID: c25eaccc3c91bc874400f7c85ce40e9032358c1c
We still need to check if we're using sudo since we don't want to chown
unecessarily, as on some platforms this causes an error which pollutes
stderr. We also don't want to unnecessarily invoke sudo, since it's
running in the context of the proxycommand, on *other* platforms it
may not be able to authenticate, and if we're using SUDO then it should
already be privileged.
OpenBSD-Regress-ID: 70d58df7503db699de579a9479300e5f3735f4ee
Right now this is only dbclient not the Dropbear server since it won't
currently run as a ProxyCommand.
OpenBSD-Regress-ID: 8cb898c414fcdb252ca6328896b0687acdaee496
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
before creating new ones. In -portable some platforms don't like
overwriting existing symlinks.
OpenBSD-Regress-ID: 7e7ddc0beb73e945e1c4c58d51c8a125b518120f
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
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
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
executable. No-op on most platforms but should prevent warnings in -portable
on systems that don't have 'date %s'.
OpenBSD-Regress-ID: e39d79867b8065e33d0c5926fa1a31f85659d2a4
"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.
If set, it is used to cache regress test names that have succeeded and
skip those on a re-run.
OpenBSD-Regress-ID: a7570dd29a58df59f2cca647c3c2ec989b49f247
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.
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.
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
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.
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