Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# usage: configs vmname test_config (or '' for default)
|
|
|
|
#
|
|
|
|
# Sets the following variables:
|
|
|
|
# CONFIGFLAGS options to ./configure
|
|
|
|
# SSHD_CONFOPTS sshd_config options
|
|
|
|
# TEST_TARGET make target used when testing. defaults to "tests".
|
|
|
|
# LTESTS
|
|
|
|
|
|
|
|
config=$1
|
|
|
|
|
|
|
|
TEST_TARGET="tests"
|
|
|
|
LTESTS=""
|
2021-02-21 21:09:27 +00:00
|
|
|
SKIP_LTESTS=""
|
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
SUDO=sudo # run with sudo by default
|
|
|
|
TEST_SSH_UNSAFE_PERMISSIONS=1
|
|
|
|
|
|
|
|
CONFIGFLAGS=""
|
|
|
|
LIBCRYPTOFLAGS=""
|
|
|
|
|
|
|
|
case "$config" in
|
|
|
|
default|sol64)
|
|
|
|
;;
|
2021-04-26 04:49:59 +00:00
|
|
|
c89)
|
|
|
|
CC="gcc"
|
|
|
|
CFLAGS="-Wall -std=c89 -pedantic -Werror=vla"
|
2021-09-29 07:48:09 +00:00
|
|
|
CONFIGFLAGS="--without-zlib"
|
|
|
|
LIBCRYPTOFLAGS="--without-openssl"
|
2021-04-26 04:49:59 +00:00
|
|
|
TEST_TARGET=t-exec
|
|
|
|
;;
|
2021-09-29 01:36:13 +00:00
|
|
|
clang*|gcc*)
|
|
|
|
CC="$config"
|
|
|
|
;;
|
2021-02-17 07:41:30 +00:00
|
|
|
kitchensink)
|
2021-02-18 03:54:07 +00:00
|
|
|
CONFIGFLAGS="--with-kerberos5 --with-libedit --with-pam"
|
|
|
|
CONFIGFLAGS="${CONFIGFLAGS} --with-security-key-builtin --with-selinux"
|
|
|
|
CONFIGFLAGS="${CONFIGFLAGS} --with-cflags=-DSK_DEBUG"
|
2021-02-17 07:41:30 +00:00
|
|
|
;;
|
|
|
|
hardenedmalloc)
|
|
|
|
CONFIGFLAGS="--with-ldflags=-lhardened_malloc"
|
|
|
|
;;
|
|
|
|
kerberos5)
|
|
|
|
CONFIGFLAGS="--with-kerberos5"
|
|
|
|
;;
|
|
|
|
libedit)
|
|
|
|
CONFIGFLAGS="--with-libedit"
|
|
|
|
;;
|
2021-04-23 00:26:35 +00:00
|
|
|
pam-krb5)
|
|
|
|
CONFIGFLAGS="--with-pam --with-kerberos5"
|
|
|
|
SSHD_CONFOPTS="UsePam yes"
|
|
|
|
;;
|
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
*pam)
|
|
|
|
CONFIGFLAGS="--with-pam"
|
|
|
|
SSHD_CONFOPTS="UsePam yes"
|
|
|
|
;;
|
2021-04-26 04:02:03 +00:00
|
|
|
libressl-*)
|
|
|
|
LIBCRYPTOFLAGS="--with-ssl-dir=/opt/libressl --with-rpath=-Wl,-rpath,"
|
2021-02-17 07:41:30 +00:00
|
|
|
;;
|
2021-04-26 04:02:03 +00:00
|
|
|
openssl-*)
|
|
|
|
LIBCRYPTOFLAGS="--with-ssl-dir=/opt/openssl --with-rpath=-Wl,-rpath,"
|
2021-02-17 07:41:30 +00:00
|
|
|
;;
|
|
|
|
selinux)
|
|
|
|
CONFIGFLAGS="--with-selinux"
|
|
|
|
;;
|
|
|
|
sk)
|
|
|
|
CONFIGFLAGS="--with-security-key-builtin"
|
|
|
|
;;
|
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
without-openssl)
|
|
|
|
LIBCRYPTOFLAGS="--without-openssl"
|
2021-02-17 07:41:30 +00:00
|
|
|
TEST_TARGET=t-exec
|
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
;;
|
2021-04-08 04:20:12 +00:00
|
|
|
valgrind-[1-4]|valgrind-unit)
|
2021-02-20 02:34:02 +00:00
|
|
|
# rlimit sandbox and FORTIFY_SOURCE confuse Valgrind.
|
|
|
|
CONFIGFLAGS="--without-sandbox --without-hardening"
|
|
|
|
CONFIGFLAGS="$CONFIGFLAGS --with-cppflags=-D_FORTIFY_SOURCE=0"
|
2021-04-07 00:05:10 +00:00
|
|
|
TEST_TARGET="t-exec USE_VALGRIND=1"
|
|
|
|
TEST_SSH_ELAPSED_TIMES=1
|
|
|
|
export TEST_SSH_ELAPSED_TIMES
|
2021-02-20 02:34:02 +00:00
|
|
|
# Valgrind slows things down enough that the agent timeout test
|
|
|
|
# won't reliably pass, and the unit tests run longer than allowed
|
2021-04-07 00:05:10 +00:00
|
|
|
# by github so split into three separate tests.
|
|
|
|
tests2="rekey integrity"
|
|
|
|
tests3="krl forward-control sshsig"
|
|
|
|
tests4="cert-userkey cert-hostkey kextype sftp-perm keygen-comment"
|
|
|
|
case "$config" in
|
|
|
|
valgrind-1)
|
|
|
|
# All tests except agent-timeout (which is flaky under valgrind)
|
|
|
|
#) and slow ones that run separately to increase parallelism.
|
|
|
|
SKIP_LTESTS="agent-timeout ${tests2} ${tests3} ${tests4}"
|
|
|
|
;;
|
|
|
|
valgrind-2)
|
|
|
|
LTESTS="${tests2}"
|
|
|
|
;;
|
|
|
|
valgrind-3)
|
|
|
|
LTESTS="${tests3}"
|
|
|
|
;;
|
|
|
|
valgrind-4)
|
|
|
|
LTESTS="${tests4}"
|
|
|
|
;;
|
2021-04-08 03:31:08 +00:00
|
|
|
valgrind-unit)
|
|
|
|
TEST_TARGET="unit USE_VALGRIND=1"
|
|
|
|
;;
|
2021-04-07 00:05:10 +00:00
|
|
|
esac
|
2021-02-18 23:16:56 +00:00
|
|
|
;;
|
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
*)
|
|
|
|
echo "Unknown configuration $config"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# The Solaris 64bit targets are special since they need a non-flag arg.
|
|
|
|
case "$config" in
|
|
|
|
sol64*)
|
|
|
|
CONFIGFLAGS="x86_64 --with-cflags=-m64 --with-ldflags=-m64 ${CONFIGFLAGS}"
|
|
|
|
LIBCRYPTOFLAGS="--with-ssl-dir=/usr/local/ssl64"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "${TARGET_HOST}" in
|
2021-08-15 02:45:10 +00:00
|
|
|
dfly58*|dfly60*)
|
2021-08-13 03:00:14 +00:00
|
|
|
# scp 3-way connection hangs on these so skip until sorted.
|
|
|
|
SKIP_LTESTS=scp3
|
|
|
|
;;
|
2021-08-15 09:37:22 +00:00
|
|
|
hurd)
|
2021-08-15 13:25:26 +00:00
|
|
|
SKIP_LTESTS="forwarding multiplex proxy-connect hostkey-agent agent-ptrace"
|
2021-08-15 09:37:22 +00:00
|
|
|
;;
|
2021-05-27 11:23:15 +00:00
|
|
|
minix3)
|
|
|
|
CC="clang"
|
|
|
|
LIBCRYPTOFLAGS="--without-openssl"
|
|
|
|
# Minix does not have a loopback interface so we have to skip any
|
|
|
|
# test that relies on it.
|
|
|
|
TEST_TARGET=t-exec
|
|
|
|
SKIP_LTESTS="addrmatch cfgparse key-options reexec agent connect"
|
|
|
|
SKIP_LTESTS="$SKIP_LTESTS keyscan rekey allow-deny-users connect-uri"
|
|
|
|
SKIP_LTESTS="$SKIP_LTESTS knownhosts-command sftp-uri brokenkeys"
|
|
|
|
SKIP_LTESTS="$SKIP_LTESTS exit-status login-timeout stderr-data"
|
|
|
|
SKIP_LTESTS="$SKIP_LTESTS cfgmatch forward-control multiplex transfer"
|
|
|
|
SKIP_LTESTS="$SKIP_LTESTS cfgmatchlisten forwarding reconfigure"
|
|
|
|
SUDO=""
|
|
|
|
;;
|
2021-04-25 04:15:02 +00:00
|
|
|
nbsd4)
|
|
|
|
# System compiler will ICE on some files with fstack-protector
|
|
|
|
CONFIGFLAGS="${CONFIGFLAGS} --without-hardening"
|
|
|
|
;;
|
2021-02-17 23:10:00 +00:00
|
|
|
sol10|sol11)
|
|
|
|
# sol10 VM is 32bit and the unit tests are slow.
|
|
|
|
# sol11 has 4 test configs so skip unit tests to speed up.
|
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
TEST_TARGET="tests SKIP_UNIT=1"
|
|
|
|
;;
|
2021-04-20 15:08:04 +00:00
|
|
|
win10)
|
|
|
|
# No sudo on Windows.
|
|
|
|
SUDO=""
|
|
|
|
;;
|
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
# If we have a local openssl/libressl, use that.
|
|
|
|
if [ -z "${LIBCRYPTOFLAGS}" ]; then
|
|
|
|
# last-match
|
2021-02-17 07:41:30 +00:00
|
|
|
for i in /usr/local /usr/local/ssl /usr/local/opt/openssl; do
|
2021-02-17 09:21:29 +00:00
|
|
|
if [ -x ${i}/bin/openssl ]; then
|
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
LIBCRYPTOFLAGS="--with-ssl-dir=${i}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
CONFIGFLAGS="${CONFIGFLAGS} ${LIBCRYPTOFLAGS}"
|
|
|
|
|
2021-04-26 04:29:03 +00:00
|
|
|
if [ -x "$(which plink 2>/dev/null)" ]; then
|
|
|
|
REGRESS_INTEROP_PUTTY=yes
|
|
|
|
export REGRESS_INTEROP_PUTTY
|
|
|
|
fi
|
|
|
|
|
2021-04-26 07:18:25 +00:00
|
|
|
export CC CFLAGS LTESTS SUDO TEST_TARGET TEST_SSH_UNSAFE_PERMISSIONS
|