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
This commit is contained in:
1 parent
784748347b
commit
8ed3e251be
1 file changed
+4
-3
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user