Skip to content

Commit 570af7a

Browse files
authored
testsuite, ci: rework the test matrix and expand coverage (#1122)
1 parent cf0f4ac commit 570af7a

934 files changed

Lines changed: 44344 additions & 50912 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
* text=auto eol=lf
22

3-
# The rsync-web/ subdirectory holds the project website source content
4-
# (mirrors what gets pushed to https://rsync.samba.org). Exclude it from
5-
# `git archive` output so the release source tarball produced by
6-
# packaging/release.py step_7_tarball does not bloat with HTML the
7-
# tarball doesn't need.
3+
# Website content is published separately from the release source archive.
84
/rsync-web/ export-ignore
95

10-
# old_versions/ holds static binaries of historical rsync releases, used by the
11-
# version-mixing test suite (.github/workflows/ubuntu-version-mix.yml) to run
12-
# the current code against a real old peer over the daemon / remote-shell.
13-
# Mark the binaries as binary so the `text=auto eol=lf` rule above can't try to
14-
# normalise line endings and corrupt them; export-ignore keeps them out of the
15-
# release source tarball.
6+
# Archived peers must retain their bytes and stay out of release archives.
167
/old_versions/rsync_* binary
178
/old_versions/rsync_* export-ignore
9+
/old_versions/binaries.json export-ignore

‎.github/INTEROPERABILITY.md‎

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1-
# Network checks
1+
# Cross-platform transfers
22

3-
CI / Interoperability contains Linux, FreeBSD, NetBSD, OpenBSD, macOS, Solaris and Cygwin endpoints. Linux, macOS and Cygwin execute on hosted runners; the BSD and Solaris binaries execute inside their guests. Guest forwarding exposes fixture ports only. Administrative SSH stays local to the VM host.
3+
We run Linux, FreeBSD, NetBSD, OpenBSD, macOS, Solaris and Cygwin endpoints. Linux, macOS and Cygwin run directly on hosted runners; BSD and Solaris run inside guests. We expose only the fixture ports through Tailscale and keep administrative SSH local to each guest host.
44

5-
The 168 cases cover every directed platform pair, push and pull initiation and SSH and daemon transport. Separate trees prevent concurrent cases from sharing destinations. Initial copies finish before verification and source updates; checksum updates finish before destination verification. Results include data, modes, integer timestamps, symlink targets and hard-link groups.
5+
We run push and pull transfers over SSH and daemon connections for every ordered platform pair, giving 168 data cases. We use separate trees so concurrent cases never share a destination. The first phase verifies the initial transfer. The second verifies checksum updates and deletion. We compare data, modes, integer timestamps, symlink targets and hard-link groups.
66

7-
The parent CI run and attempt identify each cohort. The tested revision comes from GitHub's resolved reusable-workflow commit and is checked against the native checkout. Endpoint records also contain the operating system, effective UID/GID and executable SHA-256. Required depends on all seven endpoint jobs, complete case results and confirmed network cleanup.
7+
We test compatible POSIX ACLs and xattrs separately. We return fake-super backups unchanged with `-XX` and decode them only on their originating platform. We require explicit errors for unsupported metadata and empty NTFS xattrs.
8+
9+
We bind every record to the parent CI run, attempt and tested revision. Endpoint records include the operating system, effective UID, effective GID and executable SHA-256. We accept the final result only after all seven endpoints complete every assigned case and we confirm network cleanup.
810

911
Artefact names end in `attempt-N`. Context and lease artefacts use the controller attempt; other interoperability artefacts use the parent CI attempt. The suffix prevents a rerun from consuming records from an earlier attempt.
1012

13+
We publish each phase result before waiting at the barrier, which keeps a failed endpoint available until its peers finish the current phase. We block later phases but still run local cleanup. A missing, failed or incomplete endpoint result fails the final check.
14+
1115
## Authentication
1216

13-
The Network controller uses trusted default-branch code through a workflow_run listener. It is deployed independently of the PR endpoint workflow and ignores CI runs which have not selected that workflow. Its existing OIDC identity has write access to auth_keys, policy_file, devices:core and devices:posture_attributes in the dedicated test tailnet. The posture scope is a dependency of policy-file writes. Enrolment is restricted to tag:quarantine.
17+
The Network controller runs trusted default-branch code through a `workflow_run` listener and ignores CI runs that did not select the endpoint workflow. We configure the dedicated test tailnet outside this repository. The controller identity needs write access to `auth_keys`, `policy_file`, `devices:core` and `devices:posture_attributes`. We restrict enrolment to `tag:quarantine`.
18+
19+
The controller checks CI and endpoint liveness before obtaining authority, requesting keys and publishing enrolment.
1420

15-
Endpoint jobs have read-only GitHub permissions and no OIDC permission. Each generates a temporary RSA recipient and receives one encrypted, single-use enrolment key. RSA-OAEP uses 3072-bit keys and SHA-256. Key files and recipient private keys are removed after enrolment. SSH private keys are removed when fixture services stop. Plaintext credentials are excluded from artifacts and job outputs.
21+
We give endpoint jobs read-only GitHub permissions and no OIDC permission. Each endpoint generates a temporary RSA recipient and receives one encrypted, single-use enrolment key. RSA-OAEP uses 3072-bit keys and SHA-256. We remove the enrolment files immediately and remove SSH private keys when fixture services stop. We never include plaintext credentials in artefacts or job output.
1622

17-
Endpoints authenticate through the supported Tailscale CLI. Client package checksums and the macOS source revision are pinned in interop-client.py. Route acceptance and DNS changes are disabled and checked through the client's active preferences. SSH host keys are pinned to endpoint identities.
23+
We pin the Tailscale CLI in `interop-client.py` and pin SSH host keys to endpoint identities. We disable route acceptance and DNS changes and verify the active preferences.
1824

19-
Admission permits only the cohort's registered IPv4 addresses on TCP ports 18731 and 18733. Conditional policy updates preserve other cohorts. Local service checks precede and follow denial probes. Key expiry limits unused enrolment credentials; active nodes require explicit removal.
25+
We admit only the cohort's registered IPv4 addresses on TCP ports 18731 and 18733. Policy updates preserve other cohorts. We check local services before and after the denial probes. Enrolment keys expire; we remove active nodes explicitly.
2026

2127
## Configuration
2228

23-
The production federated identity uses these claims:
29+
We configure the controller identity with these claims:
2430

2531
Field | Value
2632
--- | ---
@@ -32,14 +38,14 @@ event_name | workflow_run
3238
workflow_ref | RsyncProject/rsync/.github/workflows/interoperability*.yml@refs/heads/master
3339
runner_environment | github-hosted
3440

35-
Endpoint jobs have no federated identity. Controller discovery uses the parent CI run and attempt and verifies the controller's default-branch revision. No per-PR identity, branch or repository variable is required. The controller checks CI and endpoint liveness before obtaining authority, requesting keys and publishing enrolment.
41+
We give endpoint jobs no federated identity. We find the controller from the parent CI run and attempt. We then verify its default-branch revision. We do not need a per-PR identity, branch or repository variable.
3642

3743
## Recovery
3844

39-
Normal cleanup revokes the recorded grant, removes owned devices and revokes issued keys. An individual failure does not prevent attempts to remove the remaining resources. Device deletion checks the recorded node identity; reassigned devices remain untouched.
45+
We always try to revoke the cohort grant, remove its devices and revoke its enrolment keys. We remove a device only while its current node ID matches the lease. If a run fails before any key request, we record that no resources need cleanup without marking transfers as passed.
4046

41-
Keys created before enrolment delivery can be revoked from the local journal without an admission lease. An interrupted request with an unknown key ID or enrolment delivered without a lease requires reconciliation. A failed transfer remains failed even when resource cleanup succeeds.
47+
Keys created before enrolment delivery can be revoked from the local journal without an admission lease. An interrupted request with an unknown key ID or enrolment delivered without a lease requires reconciliation.
4248

43-
Admission leases are attested before access is granted. Recovery verifies the original lease bytes, repository, controller workflow, signing commit, source ref and run attempt before modifying the tailnet. Failed or cancelled controller runs trigger recovery from trusted code.
49+
We attest the admission lease before granting access. A failed or cancelled controller triggers the cleanup workflow. We first check whether cleanup already succeeded. Otherwise we verify the lease bytes, repository, controller workflow, signing commit, source reference and run attempt before changing the tailnet.
4450

45-
Missing leases and provider failures require reconciliation. Partial enrolment before a lease exists remains quarantined; hostnames alone are insufficient grounds for device deletion. Cleanup failure keeps the CI result unsuccessful.
51+
If automated cleanup fails, we use the attested `interoperability-lease-attempt-N` artefact from the controller run to identify the cohort. We remove only the recorded grant, keys and devices while each device's node ID still matches. Without an attested lease, we compare the `interoperability-ready-PLATFORM-attempt-N` artefacts with quarantined node IDs before making any change. A hostname alone is not enough to delete a device.
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
name: Directed transfers
2+
description: Native SSH and daemon transfers between seven endpoints
3+
inputs:
4+
platform:
5+
required: true
6+
description: Native endpoint
7+
guest:
8+
default: 'false'
9+
description: Use the existing local VM SSH connection
10+
outputs:
11+
blocked:
12+
description: A shared phase could not run
13+
value: ${{ steps.outcome.outputs.blocked }}
14+
runs:
15+
using: composite
16+
steps:
17+
- name: Install Tailscale
18+
shell: bash
19+
env:
20+
GH_TOKEN: ${{ github.token }}
21+
INTEROP_PLATFORM: ${{ inputs.platform }}
22+
INTEROP_GUEST: ${{ inputs.guest }}
23+
run: python3 -B -S .github/scripts/interop-host.py install "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
24+
- name: Generate enrolment recipient
25+
shell: bash
26+
env:
27+
GH_TOKEN: ${{ github.token }}
28+
INTEROP_PLATFORM: ${{ inputs.platform }}
29+
INTEROP_GUEST: ${{ inputs.guest }}
30+
run: python3 -B -S .github/scripts/interop-host.py recipient "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
31+
- name: Upload recipient
32+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
33+
with:
34+
name: interoperability-public-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
35+
path: ${{ runner.temp }}/interoperability/public-key.json
36+
if-no-files-found: error
37+
retention-days: 7
38+
- name: Join quarantine
39+
shell: bash
40+
env:
41+
GH_TOKEN: ${{ github.token }}
42+
INTEROP_PLATFORM: ${{ inputs.platform }}
43+
INTEROP_GUEST: ${{ inputs.guest }}
44+
run: python3 -B -S .github/scripts/interop-host.py connect "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
45+
- name: Start native fixture services
46+
if: env.INTEROP_BLOCKED != 'true'
47+
shell: bash
48+
env:
49+
GH_TOKEN: ${{ github.token }}
50+
INTEROP_PLATFORM: ${{ inputs.platform }}
51+
INTEROP_GUEST: ${{ inputs.guest }}
52+
run: python3 -B -S .github/scripts/interop-host.py prepare "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
53+
- name: Upload endpoint identity
54+
if: env.INTEROP_BLOCKED != 'true'
55+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
56+
with:
57+
name: interoperability-ready-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
58+
path: ${{ runner.temp }}/interoperability/ready.json
59+
if-no-files-found: error
60+
retention-days: 7
61+
- name: Check quarantine
62+
if: env.INTEROP_BLOCKED != 'true'
63+
shell: bash
64+
env:
65+
GH_TOKEN: ${{ github.token }}
66+
INTEROP_PLATFORM: ${{ inputs.platform }}
67+
INTEROP_GUEST: ${{ inputs.guest }}
68+
run: python3 -B -S .github/scripts/interop-host.py quarantine "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
69+
- name: Upload quarantine result
70+
if: env.INTEROP_BLOCKED != 'true'
71+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
72+
with:
73+
name: interoperability-quarantine-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
74+
path: ${{ runner.temp }}/interoperability/quarantine.json
75+
if-no-files-found: error
76+
retention-days: 7
77+
- name: Check admission
78+
if: env.INTEROP_BLOCKED != 'true'
79+
shell: bash
80+
env:
81+
GH_TOKEN: ${{ github.token }}
82+
INTEROP_PLATFORM: ${{ inputs.platform }}
83+
INTEROP_GUEST: ${{ inputs.guest }}
84+
run: python3 -B -S .github/scripts/interop-host.py admit "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
85+
- name: Upload endpoint admission
86+
if: env.INTEROP_BLOCKED != 'true'
87+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
88+
with:
89+
name: interoperability-admitted-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
90+
path: ${{ runner.temp }}/interoperability/admitted.json
91+
if-no-files-found: error
92+
retention-days: 7
93+
- name: Initial transfers
94+
id: transfer1
95+
if: env.INTEROP_BLOCKED != 'true'
96+
shell: bash
97+
env:
98+
GH_TOKEN: ${{ github.token }}
99+
INTEROP_PLATFORM: ${{ inputs.platform }}
100+
INTEROP_GUEST: ${{ inputs.guest }}
101+
run: python3 -B -S .github/scripts/interop-host.py transfer1 "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
102+
- name: Upload initial transfer completion
103+
id: transfer1_upload
104+
if: ${{ always() && !cancelled() && env.INTEROP_BLOCKED != 'true' && (steps.transfer1.outcome == 'success' || steps.transfer1.outcome == 'failure') }}
105+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
106+
with:
107+
name: interoperability-transfer1-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
108+
path: ${{ runner.temp }}/interoperability/transfer1.json
109+
if-no-files-found: error
110+
retention-days: 7
111+
- name: Complete initial transfer phase
112+
if: ${{ always() && !cancelled() && steps.transfer1_upload.outcome == 'success' }}
113+
shell: bash
114+
env:
115+
GH_TOKEN: ${{ github.token }}
116+
INTEROP_PLATFORM: ${{ inputs.platform }}
117+
run: python3 -B -S .github/scripts/interop-host.py wait1 "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
118+
- name: Verify initial data and update sources
119+
if: env.INTEROP_BLOCKED != 'true'
120+
shell: bash
121+
env:
122+
GH_TOKEN: ${{ github.token }}
123+
INTEROP_PLATFORM: ${{ inputs.platform }}
124+
INTEROP_GUEST: ${{ inputs.guest }}
125+
run: python3 -B -S .github/scripts/interop-host.py next "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
126+
- name: Upload update readiness
127+
if: env.INTEROP_BLOCKED != 'true'
128+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
129+
with:
130+
name: interoperability-next-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
131+
path: ${{ runner.temp }}/interoperability/next.json
132+
if-no-files-found: error
133+
retention-days: 7
134+
- name: Checksum updates and deletion
135+
id: transfer2
136+
if: env.INTEROP_BLOCKED != 'true'
137+
shell: bash
138+
env:
139+
GH_TOKEN: ${{ github.token }}
140+
INTEROP_PLATFORM: ${{ inputs.platform }}
141+
INTEROP_GUEST: ${{ inputs.guest }}
142+
run: python3 -B -S .github/scripts/interop-host.py transfer2 "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
143+
- name: Upload update completion
144+
id: transfer2_upload
145+
if: ${{ always() && !cancelled() && env.INTEROP_BLOCKED != 'true' && (steps.transfer2.outcome == 'success' || steps.transfer2.outcome == 'failure') }}
146+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
147+
with:
148+
name: interoperability-transfer2-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
149+
path: ${{ runner.temp }}/interoperability/transfer2.json
150+
if-no-files-found: error
151+
retention-days: 7
152+
- name: Complete updated transfer phase
153+
if: ${{ always() && !cancelled() && steps.transfer2_upload.outcome == 'success' }}
154+
shell: bash
155+
env:
156+
GH_TOKEN: ${{ github.token }}
157+
INTEROP_PLATFORM: ${{ inputs.platform }}
158+
run: python3 -B -S .github/scripts/interop-host.py wait2 "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
159+
- name: Verify updated native data
160+
if: env.INTEROP_BLOCKED != 'true'
161+
shell: bash
162+
env:
163+
GH_TOKEN: ${{ github.token }}
164+
INTEROP_PLATFORM: ${{ inputs.platform }}
165+
INTEROP_GUEST: ${{ inputs.guest }}
166+
run: python3 -B -S .github/scripts/interop-host.py verify "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
167+
- name: Upload transfer result
168+
if: env.INTEROP_BLOCKED != 'true'
169+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
170+
with:
171+
name: interoperability-result-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
172+
path: ${{ runner.temp }}/interoperability/result.json
173+
if-no-files-found: error
174+
retention-days: 7
175+
- name: Check revocation
176+
if: env.INTEROP_BLOCKED != 'true'
177+
shell: bash
178+
env:
179+
GH_TOKEN: ${{ github.token }}
180+
INTEROP_PLATFORM: ${{ inputs.platform }}
181+
INTEROP_GUEST: ${{ inputs.guest }}
182+
run: python3 -B -S .github/scripts/interop-host.py revoked "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
183+
- name: Upload revocation result
184+
if: env.INTEROP_BLOCKED != 'true'
185+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
186+
with:
187+
name: interoperability-revoked-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
188+
path: ${{ runner.temp }}/interoperability/revoked.json
189+
if-no-files-found: error
190+
retention-days: 7
191+
- name: Upload blocked phase
192+
if: ${{ always() && env.INTEROP_BLOCKED == 'true' }}
193+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
194+
with:
195+
name: interoperability-blocked-${{ inputs.platform }}-attempt-${{ github.run_attempt }}
196+
path: ${{ runner.temp }}/interoperability/blocked.json
197+
if-no-files-found: error
198+
retention-days: 7
199+
- name: Stop fixture services and leave the network
200+
if: always()
201+
shell: bash
202+
env:
203+
GH_TOKEN: ${{ github.token }}
204+
INTEROP_PLATFORM: ${{ inputs.platform }}
205+
INTEROP_GUEST: ${{ inputs.guest }}
206+
run: python3 -B -S .github/scripts/interop-host.py stop "$INTEROP_PLATFORM" --root "$RUNNER_TEMP/interoperability"
207+
- name: Record endpoint outcome
208+
id: outcome
209+
if: always()
210+
shell: bash
211+
run: |
212+
python3 -B -S - <<'PY'
213+
import os
214+
with open(os.environ['GITHUB_OUTPUT'], 'a') as output:
215+
output.write('blocked=' + os.environ.get('INTEROP_BLOCKED', 'false') + '\n')
216+
PY

0 commit comments

Comments
 (0)