Public: anyone can read this; the crew can change it.

Main green on Linux: the protection notes test pins Landlock off instead of depending on the runner's kernel #16944

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

fix/lack-notes-flake → main 0 commits

  • Merged. fix/lack-notes-flake was merged into main as 02c4531.

Review

Sign in to review this change.
1 file changed +8 −4
test/protection.test.ts +8 −4
@@ -32,8 +32,12 @@ test("a part that recovers clears its own line", () => {
3232
3333 // Run in a process of its own: the probes are cached per process, and the
3434 // host is made to refuse by its environment (`FORGE_CELLS=off`, no
35 // `bwrap` on an empty `PATH`), so removing either `noteProtection` call
36 // from `AppsRuntime.start` or `startCrew` turns this red.
35 // `bwrap` on an empty `PATH`, and `FORGE_LANDLOCK=off`, since where bwrap
36 // cannot run a kernel with Landlock now holds the crew to that floor
37 // instead, #16888), so removing either `noteProtection` call from
38 // `AppsRuntime.start` or `startCrew` turns this red. Without the last, a
39 // Linux runner whose kernel has Landlock read the crew as held, and the
40 // test was red there and green on a Mac, which skips the Linux line.
3741 test("AppsRuntime.start and startCrew each note what they lack", async () => {
3842 const dir = await mkdtemp(join(tmpdir(), "forge-protection-"));
3943 try {
@@ -60,7 +64,7 @@ test("AppsRuntime.start and startCrew each note what they lack", async () => {
6064 process.exit(0);
6165 `;
6266 const run = Bun.spawnSync([process.execPath, "-e", script], {
63 env: { FORGE_CELLS: "off", PATH: "", HOME: dir, TMPDIR: dir },
67 env: { FORGE_CELLS: "off", FORGE_LANDLOCK: "off", PATH: "", HOME: dir, TMPDIR: dir },
6468 cwd: join(import.meta.dir, ".."),
6569 timeout: 30_000,
6670 });
@@ -69,7 +73,7 @@ test("AppsRuntime.start and startCrew each note what they lack", async () => {
6973 expect(seen.afterApps).toContain("apps (FORGE_CELLS=off)");
7074 expect(seen.afterApps).not.toContain("crew shells");
7175 if (process.platform === "linux")
72 expect(seen.afterCrew).toContain("crew shells (bwrap is not installed)");
76 expect(seen.afterCrew).toContain("crew shells (bwrap is not installed; FORGE_LANDLOCK=off)");
7377 } finally {
7478 await rm(dir, { recursive: true, force: true });
7579 }

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs