Skip to content

Commit 70fd0fe

Browse files
authored
test: run privileged enclave storage suite in CI
1 parent 0c1c3a1 commit 70fd0fe

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

‎.github/workflows/test-cloud-hypervisor.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,24 @@ jobs:
6969
"$RUNNER_TEMP/microvm-supervisor.test" \
7070
-test.run '^TestEnclaveGuestLimitsLive$' -test.count=1 -test.v
7171
72+
- name: Set up Node.js
73+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
74+
with:
75+
node-version: '22'
76+
cache: npm
77+
78+
- name: Run privileged enclave host storage enforcement suite
79+
# Mounts the real role-sized invocation tmpfs backing stores and
80+
# host memory cgroups in a private mount namespace, then proves
81+
# aggregate ENOSPC, isolation, cgroup accounting, and busy-unmount
82+
# behavior. The suite is skipped without AWF_TEST_ENCLAVE_STORAGE.
83+
run: |
84+
npm ci
85+
sudo unshare --mount --propagation private \
86+
env "PATH=$PATH" AWF_TEST_ENCLAVE_STORAGE=1 \
87+
npx jest --ci --runInBand \
88+
src/cloud-hypervisor/enclave-storage.integration.test.ts
89+
7290
- name: Install deterministic guest build prerequisites
7391
run: |
7492
sudo apt-get update

‎docs/cloud-hypervisor-foundation.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ unmount failure. It also fills storage in the production host cgroup budget whil
304304
holding the guest-RAM equivalent resident, with swap disabled, to check that
305305
storage exhaustion is not preempted by a cgroup OOM. Run it as root in a private mount namespace with
306306
`AWF_TEST_ENCLAVE_STORAGE=1 npm test -- --runInBand enclave-storage.integration.test.ts`.
307+
The `build-test-artifacts` job in `.github/workflows/test-cloud-hypervisor.yml`
308+
runs this suite on every matching pull request via `sudo unshare --mount --propagation private`.
307309
Live guest transport conformance additionally requires the release-attested role
308310
artifacts and KVM runtime wiring.
309311

‎src/enclave/host-executor-broker.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ describe('finite-disclosure broker → authenticated Unix host → concrete micr
119119
copySparseFile: noop,
120120
removeArtifactSnapshot: async (directory) => fs.rm(directory, { recursive: true, force: true }),
121121
mountTmpfs: noop,
122+
verifyStorage: noop,
122123
unmount: async () => {
123124
cleaned();
124125
if (cleanupError) throw new Error('PRIVATE_RAW_CLEANUP_ERROR');

0 commit comments

Comments
 (0)