-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test-cli-permission tests fail when running with CWD containing /tmp #54021
Labels
Comments
Failure can be seen on debian ci too |
VoltrexKeyva
added
test
Issues and PRs related to the tests.
permission
Issues and PRs related to the Permission Model
labels
Jul 25, 2024
sendoru
added a commit
to sendoru/node
that referenced
this issue
Aug 3, 2024
`process.permission.has("fs")` checks if the process has permission for all files under `cwd`. Granting permission for `/tmp` and running tests with `cwd` containing `/tmp` will make the funtion return `true`, differing from expected results. Using relative paths ensures test paths are not `cwd` itself. Fixes: nodejs#54021
sendoru
added a commit
to sendoru/node
that referenced
this issue
Aug 3, 2024
Differing from the other subdirectories of `/` `/tmp` has rwx permissions for all users. In the case where `firstPath` is `/tmp`, the last test case will fail, as it expects granting permission to `firstPath` will be failed. This commit skips the last test case when `firstPath` is `/tmp`. Fixes: nodejs#54021
targos
pushed a commit
that referenced
this issue
Aug 14, 2024
`process.permission.has("fs")` checks if the process has permission for all files under `cwd`. Granting permission for `/tmp` and running tests with `cwd` containing `/tmp` will make the funtion return `true`, differing from expected results. Using relative paths ensures test paths are not `cwd` itself. Fixes: #54021 PR-URL: #54188 Reviewed-By: Antoine du Hamel <[email protected]>
targos
pushed a commit
that referenced
this issue
Aug 14, 2024
`process.permission.has("fs")` checks if the process has permission for all files under `cwd`. Granting permission for `/tmp` and running tests with `cwd` containing `/tmp` will make the funtion return `true`, differing from expected results. Using relative paths ensures test paths are not `cwd` itself. Fixes: #54021 PR-URL: #54188 Reviewed-By: Antoine du Hamel <[email protected]>
EarlyRiser42
pushed a commit
to EarlyRiser42/node
that referenced
this issue
Aug 14, 2024
`process.permission.has("fs")` checks if the process has permission for all files under `cwd`. Granting permission for `/tmp` and running tests with `cwd` containing `/tmp` will make the funtion return `true`, differing from expected results. Using relative paths ensures test paths are not `cwd` itself. Fixes: nodejs#54021 PR-URL: nodejs#54188 Reviewed-By: Antoine du Hamel <[email protected]>
targos
pushed a commit
that referenced
this issue
Sep 21, 2024
`process.permission.has("fs")` checks if the process has permission for all files under `cwd`. Granting permission for `/tmp` and running tests with `cwd` containing `/tmp` will make the funtion return `true`, differing from expected results. Using relative paths ensures test paths are not `cwd` itself. Fixes: #54021 PR-URL: #54188 Reviewed-By: Antoine du Hamel <[email protected]>
targos
pushed a commit
that referenced
this issue
Sep 26, 2024
`process.permission.has("fs")` checks if the process has permission for all files under `cwd`. Granting permission for `/tmp` and running tests with `cwd` containing `/tmp` will make the funtion return `true`, differing from expected results. Using relative paths ensures test paths are not `cwd` itself. Fixes: #54021 PR-URL: #54188 Reviewed-By: Antoine du Hamel <[email protected]>
targos
pushed a commit
that referenced
this issue
Oct 2, 2024
`process.permission.has("fs")` checks if the process has permission for all files under `cwd`. Granting permission for `/tmp` and running tests with `cwd` containing `/tmp` will make the funtion return `true`, differing from expected results. Using relative paths ensures test paths are not `cwd` itself. Fixes: #54021 PR-URL: #54188 Reviewed-By: Antoine du Hamel <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Version
20.15.1
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Be in (any) subdirectory of
/tmp
(as CWD) when running these tests.What is the expected behavior? Why is that the expected behavior?
The test succeeding, and not being dependent on CWD for a pass/fail.
What do you see instead?
and
Additional information
There's also some other code in
test/parallel/test-cli-permission-deny-fs.js
related to CWD which seems to be brittle.Shouldn't tests fail or succeed regardless of:
The text was updated successfully, but these errors were encountered: