fs: special input -1 on chown, lchown and fchown#58836
fs: special input -1 on chown, lchown and fchown#58836nodejs-github-bot merged 1 commit intonodejs:mainfrom
-1 on chown, lchown and fchown#58836Conversation
|
I didn't see any test about valid input in chown. well do we need add one? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #58836 +/- ##
==========================================
- Coverage 90.08% 90.07% -0.01%
==========================================
Files 640 640
Lines 188375 188447 +72
Branches 36939 36966 +27
==========================================
+ Hits 169698 169745 +47
- Misses 11397 11405 +8
- Partials 7280 7297 +17
🚀 New features to boost your workflow:
|
f912834 to
6fa93e5
Compare
-1 input on chown-1 on chown, lchown and fchown
74479c1 to
64f6f95
Compare
64f6f95 to
0a3e989
Compare
| } else { | ||
| CHECK(value->IsNumber()); | ||
| } | ||
| return static_cast<T>(value.As<v8::Uint32>()->Value()); |
There was a problem hiding this comment.
Pretty sure that at least according to the V8 API contract, IsUint32() is a prerequisite for this case to be valid in the first place – overall, I'd say it's better to handle these values in the *Chown functions rather than in the generic helpers here
Commit Queue failed- Loading data for nodejs/node/pull/58836 ✔ Done loading data for nodejs/node/pull/58836 ----------------------------------- PR info ------------------------------------ Title fs: special input `-1` on `chown`, `lchown` and `fchown` (#58836) Author Alex Yang <himself65@outlook.com> (@himself65) Branch himself65:himself65/2025/06/25/loose -> nodejs:main Labels c++, fs, needs-ci Commits 1 - fs: special input `-1` on `chown`, `lchown` and `fchown` Committers 1 - Alex Yang <alex@runllama.ai> PR-URL: https://github.com/nodejs/node/pull/58836 Fixes: https://github.com/nodejs/node/issues/58826 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/58836 Fixes: https://github.com/nodejs/node/issues/58826 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Wed, 25 Jun 2025 17:35:29 GMT ✔ Approvals: 1 ✔ - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/58836#pullrequestreview-2965372044 ✘ This PR needs to wait 116 more hours to land (or 0 hours if there is one more approval) ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-06-27T20:21:59Z: https://ci.nodejs.org/job/node-test-pull-request/67691/ - Querying data for job/node-test-pull-request/67691/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/15936207250 |
Commit Queue failednode:internal/process/promises:394
triggerUncaughtException(err, true /* fromPromise */);
^
https://github.com/nodejs/node/actions/runs/15944896023 |
Commit Queue failed- Loading data for nodejs/node/pull/58836 ✔ Done loading data for nodejs/node/pull/58836 ----------------------------------- PR info ------------------------------------ Title fs: special input `-1` on `chown`, `lchown` and `fchown` (#58836) Author Alex Yang <himself65@outlook.com> (@himself65) Branch himself65:himself65/2025/06/25/loose -> nodejs:main Labels c++, fs, author ready, needs-ci Commits 1 - fs: special input `-1` on `chown`, `lchown` and `fchown` Committers 1 - Alex Yang <alex@runllama.ai> PR-URL: https://github.com/nodejs/node/pull/58836 Fixes: https://github.com/nodejs/node/issues/58826 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/58836 Fixes: https://github.com/nodejs/node/issues/58826 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Wed, 25 Jun 2025 17:35:29 GMT ✔ Approvals: 1 ✔ - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/58836#pullrequestreview-2965372044 ✘ This PR needs to wait 94 more hours to land (or 0 hours if there is one more approval) ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-06-27T21:22:30Z: https://ci.nodejs.org/job/node-test-pull-request/67691/ - Querying data for job/node-test-pull-request/67691/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/15947155809 |
|
Landed in 8b199ee |
Fixes: #58826
-1is a special input for chown, means won't change anything according to the spec.https://stackoverflow.com/questions/21370094/is-the-uid-t-type-signed-or-unsigned