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]);