[openssh-commits] [openssh] 04/04: Enable password tests on Github ephemeral VMs.
git+noreply at mindrot.org
git+noreply at mindrot.org
Sun Jun 29 11:15:23 AEST 2025
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 8a9384de483b8fb69a800e0347273686a5715fc3
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Sun Jun 29 11:14:18 2025 +1000
Enable password tests on Github ephemeral VMs.
---
.github/setup_ci.sh | 18 +++++++++++++-----
.github/workflows/c-cpp.yml | 2 ++
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/.github/setup_ci.sh b/.github/setup_ci.sh
index 5e778d377..598b0624a 100755
--- a/.github/setup_ci.sh
+++ b/.github/setup_ci.sh
@@ -299,12 +299,20 @@ if [ ! -z "${INSTALL_PUTTY}" ]; then
/usr/local/bin/plink -V
fi
-# This is the github "target" as specificed in the yml file.
-case "${target}" in
-ubuntu-latest)
- echo ubuntu-latest target: setting random password string.
+# If we're running on an ephemeral VM, set a random password and set
+# up to run the password auth test.
+if [ ! -z "${EPHEMERAL_VM}" ]; then
+
+ # This is the github "target" as specified in the yml file.
+ # In particular, ubuntu-latest sets the password field to the locked
+ # value, so unless we reset it here most of the tests will fail.
+ case "${target}" in
+ ubuntu-*)
+ echo ${target} target: setting random password string.
pw=$(openssl rand -base64 9)
sudo usermod --password "${pw}" runner
sudo usermod --unlock runner
+ echo "${pw}" > regress/password
;;
-esac
+ esac
+fi
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 7ee179646..82087c057 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -121,6 +121,8 @@ jobs:
- { target: macos-15, config: pam }
runs-on: ${{ matrix.target }}
steps:
+ - env:
+ EPHEMERAL_VM: yes
- name: check RUN_ONLY_TARGET_CONFIG
if: vars.RUN_ONLY_TARGET_CONFIG != ''
run: sh -c 'if [ "${{ vars.RUN_ONLY_TARGET_CONFIG }}" != "${{ matrix.target }} ${{matrix.config }}" ]; then exit 1; else exit 0; fi'
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list