windows: CI gives the SSH test's sshd its privilege separation

The job runs as root in the runner's container, where sshd separates
privileges and needs /var/empty (root's, not writable by others) and the
sshd user; the image lacks the directory, so the test's sshd exited and
an_ssh_tunnel failed. A step makes both. The test now waits for its sshd
and, should it exit, says why.

Checked as root in docker.gitea.com/runner-images:ubuntu-24.04: the
end-to-end tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Opus 5.5 committed 2026-10-27 15:35:49 +03:00
1 parent 8d9705cd3a
commit 69e70d6f74
2 files changed
+22 -2

No files matched your search

+13 -1
View File
@@ -75,7 +75,19 @@ jobs:
working-directory: windows
run: nix develop --command rustup toolchain install
# The default members: everything the zip carries, not the app (GPUI) yet.
# The SSH tunnel's end-to-end test runs an sshd of its own. As root (the job's user in the
# runner's container) sshd separates privileges: it needs its empty, root-owned directory
# and its unprivileged user, which the image does not have.
- name: Test prerequisites
run: |
set -euo pipefail
if [ "$(id -u)" = 0 ]; then
install -d -m 0755 -o root -g root /var/empty
id sshd >/dev/null 2>&1 || useradd --system --no-create-home --home-dir /var/empty --shell /usr/sbin/nologin sshd
fi
# The default members: the service, proxy-ctl, the client and core (the app's crate is
# built by Package).
- name: Test
working-directory: windows
run: nix develop --command cargo test --locked