From 8ed3e251bef207679c05ec47ed27c8f22b9d2431 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Fri, 20 Nov 2026 11:44:14 -0600 Subject: [PATCH] test(harness): pi-fit-tmp: the /tmp test's link to its temp directory sits in the pi's package, which the sandbox mounts, so bwrap follows it; without the scratch under the real path that case fails --- packages/harness/tests/pi-fit.test.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/harness/tests/pi-fit.test.mjs b/packages/harness/tests/pi-fit.test.mjs index dfe8ac873..14f31d2d7 100644 --- a/packages/harness/tests/pi-fit.test.mjs +++ b/packages/harness/tests/pi-fit.test.mjs @@ -1031,9 +1031,10 @@ test("pi-fit-tmp: with its temp directory under /tmp the fit check gives the ver const under = checkWith(dir); assert.deepEqual([under.ok, under.undecided, under.message], [elsewhere.ok, elsewhere.undecided, elsewhere.message]); assert.deepEqual(readdirSync(dir), [], "the check left something in its temp directory under /tmp"); - // TMPDIR a link to the directory under /tmp: the scratch goes under the real path, so the - // binds' order sees it under /tmp. - const link = join(s.root, "tmp-link"); + // TMPDIR a link to the directory under /tmp, in a directory the sandbox mounts (the pi's own + // package), so bwrap follows the link: the scratch goes under the real path, so the binds' + // order sees it under /tmp. + const link = join(dirname(dirname(dirname(s.cli))), "tmp-link"); symlinkSync(dir, link); const linked = checkWith(link); assert.deepEqual([linked.ok, linked.undecided, linked.message], [elsewhere.ok, elsewhere.undecided, elsewhere.message]);