GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: added input validation test for fchmod by lucamaraschi · Pull Request #18217 · nodejs/node

Conversation

@lucamaraschi

@lucamaraschi lucamaraschi commented Jan 18, 2018

Copy link
Copy Markdown
Contributor

Added a test to ensure input validation for FD and mode for fs.fchmod.
Removed check for values lower than 0 for mode as it's already checked
by validateUint32.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test, fs

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

BridgeAR reacted with thumbs up emoji BridgeAR reacted with hooray emoji
All reactions
  • 👍 1 reaction
  • 🎉 1 reaction
@nodejs-github-bot nodejs-github-bot added the fs Issues and PRs related to file-system APIs and the fs module. label Jan 18, 2018
jasnell
jasnell approved these changes Jan 18, 2018
View reviewed changes
cjihrig
cjihrig approved these changes Jan 18, 2018
View reviewed changes
@jasnell

jasnell commented Jan 18, 2018

Copy link
Copy Markdown
Member

Hey look @cjihrig ... @lucamaraschi submitted a test case! How many more does he have to go ;-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cjihrig

cjihrig commented Jan 18, 2018

Copy link
Copy Markdown
Contributor

@jasnell if my math is right, 90 once this lands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Jan 18, 2018

Copy link
Copy Markdown
Member

@jasnell @cjihrig I am working on reducing that number:

BridgeAR [7:46 PM]
If you write at least three tests each day, I will not remind you at all! Think about that! :smile:
Luca Maraschi [7:47 PM]
3 tests a day, keep Ruben away!
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

BridgeAR
BridgeAR approved these changes Jan 18, 2018
View reviewed changes
addaleax
addaleax approved these changes Jan 18, 2018
View reviewed changes
@addaleax

addaleax commented Jan 18, 2018

Copy link
Copy Markdown
Member

CI: https://ci.nodejs.org/job/node-test-commit/15502/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax addaleax added author ready PRs with CI started, the required approvals, and no outstanding review comments. and removed author ready PRs with CI started, the required approvals, and no outstanding review comments. labels Jan 18, 2018
@addaleax

addaleax commented Jan 18, 2018

Copy link
Copy Markdown
Member

CI complains about a syntax error:

/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-fs-fchmod.js:47
common.mustCall(() => fs.fchmod(1, modeUpperBoundaryValue);
                                                         ^

SyntaxError: missing ) after argument list
    at new Script (vm.js:50:7)
    at createScript (vm.js:137:10)
    at Object.runInThisContext (vm.js:185:10)
    at Module._compile (module.js:628:28)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:577:32)
    at tryModuleLoad (module.js:517:12)
    at Function.Module._load (module.js:509:3)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:194:16)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell reviewed Jan 18, 2018
View reviewed changes
Comment thread test/parallel/test-fs-fchmod.js Outdated

@jasnell jasnell Jan 18, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing parens at the end of both of these lines.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lucamaraschi
lucamaraschi force-pushed the test-fs-fchmod branch from 572c760 to b16a6e5 Compare January 18, 2018 16:33
targos
targos reviewed Jan 20, 2018
View reviewed changes
Comment thread test/parallel/test-fs-fchmod.js Outdated

@targos targos Jan 20, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it me or something is missing? The function returned by common.mustCall is never called, so I expect the test to fail.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@BridgeAR BridgeAR Jan 20, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. And neither of these two entries should require being wrapped in a mustCall.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lucamaraschi added 3 commits January 20, 2018 12:27
@lucamaraschi
test: added input validation test for fchmod
6cd50ac
Added a test to ensure input validation for FD and mode for fs.fchmod.
Removed check for values lower than 0 for `mode` as it's already checked
by `validateUint32`.
@lucamaraschi
Fixed ) nit
cc739e1
@lucamaraschi
Fixed assert
61d47f2
@lucamaraschi
lucamaraschi force-pushed the test-fs-fchmod branch from b16a6e5 to 61d47f2 Compare January 20, 2018 20:28
@maclover7
maclover7 force-pushed the master branch from bb5575a to 993b716 Compare January 26, 2018 22:02
@cjihrig
cjihrig force-pushed the master branch from 993b716 to 082f952 Compare January 26, 2018 22:36
@BridgeAR

BridgeAR commented Feb 1, 2018

Copy link
Copy Markdown
Member

New CI https://ci.nodejs.org/job/node-test-pull-request/12894/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR BridgeAR added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Feb 1, 2018
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Feb 6, 2018
@lucamaraschi @BridgeAR
test: added input validation test for fchmod
075eef5
Added a test to ensure input validation for FD and mode for fs.fchmod.
Removed check for values lower than 0 for `mode` as it's already checked
by `validateUint32`.

PR-URL: nodejs#18217
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@BridgeAR

BridgeAR commented Feb 6, 2018

Copy link
Copy Markdown
Member

Landed in 075eef5

@lucamaraschi you are very much behind with those tests!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR BridgeAR closed this Feb 6, 2018
@MylesBorins MylesBorins added the backport-requested-v9.x label Feb 21, 2018
@MylesBorins

MylesBorins commented Feb 21, 2018

Copy link
Copy Markdown
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos targos added backported-to-v9.x and removed backport-requested-v9.x labels Mar 30, 2018
This was referenced Apr 7, 2024
[Snyk] Security upgrade eslint from 4.19.1 to 9.0.0 aliscco/alisco-node#1365
Open
[Snyk] Security upgrade eslint from 4.19.1 to 9.0.0 aliscco/alisco-node#1366
Open
This was referenced Apr 7, 2024
[Snyk] Security upgrade eslint from 8.57.0 to 9.0.0 leonardoadame/node#760
Open
[Snyk] Security upgrade eslint from 8.57.0 to 9.0.0 leonardoadame/node#761
Open
[Snyk] Security upgrade eslint from 8.14.0 to 9.0.0 leonardoadame/node#762
Open
[Snyk] Security upgrade eslint from 7.32.0 to 9.0.0 leonardoadame/node#763
Open
[Snyk] Security upgrade eslint from 8.14.0 to 9.0.0 leonardoadame/node#764
Open
This was referenced Apr 7, 2024
[Snyk] Security upgrade eslint from 5.16.0 to 9.0.0 aliscco/alisco-node#1367
Open
[Snyk] Security upgrade eslint from 6.8.0 to 9.0.0 aliscco/alisco-node#1368
Open
[Snyk] Security upgrade eslint from 6.8.0 to 9.0.0 aliscco/alisco-node#1369
Open
[Snyk] Security upgrade eslint from 7.32.0 to 9.0.0 aliscco/alisco-node#1370
Open
[Snyk] Security upgrade eslint from 7.32.0 to 9.0.0 aliscco/alisco-node#1371
Open
@baby636 baby636 mentioned this pull request Apr 7, 2024
[Snyk] Security upgrade eslint from 7.32.0 to 9.0.0 baby636/node#145
Open
@ryan-ally ryan-ally mentioned this pull request Apr 7, 2024
[Snyk] Security upgrade eslint from 6.8.0 to 9.0.0 ryan-ally/node#106
Open
This was referenced Apr 7, 2024
[Snyk] Security upgrade eslint from 7.32.0 to 9.0.0 leonardoadame/node#765
Open
[Snyk] Security upgrade eslint from 8.57.0 to 9.0.0 leonardoadame/node#766
Open
[Snyk] Security upgrade eslint from 4.12.1 to 9.0.0 leonardoadame/node#767
Open
[Snyk] Security upgrade eslint from 8.37.0 to 9.0.0 leonardoadame/node#768
Open
[Snyk] Security upgrade eslint from 7.32.0 to 9.0.0 leonardoadame/node#769
Open
@aliscco aliscco mentioned this pull request Apr 7, 2024
[Snyk] Security upgrade eslint from 3.19.0 to 9.0.0 aliscco/alisco-node#1372
Open
@leonardoadame leonardoadame mentioned this pull request Apr 7, 2024
[Snyk] Security upgrade eslint from 3.19.0 to 9.0.0 leonardoadame/node#770
Open
This was referenced Apr 8, 2024
[Snyk] Security upgrade eslint from 4.19.1 to 9.0.0 aliscco/alisco-node#1375
Open
[Snyk] Security upgrade eslint from 7.32.0 to 9.0.0 aliscco/alisco-node#1376
Open
[Snyk] Security upgrade eslint from 5.16.0 to 9.0.0 aliscco/alisco-node#1377
Open
@wedataintelligence wedataintelligence mentioned this pull request Oct 9, 2024
[Snyk] Fix for 3 vulnerabilities wedataintelligence/node#127
Open
@ron-a20 ron-a20 mentioned this pull request Oct 9, 2024
[Snyk] Fix for 3 vulnerabilities ron-a20/node#142
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request Oct 11, 2024
[Snyk] Fix for 4 vulnerabilities aliceUnhinged613/node#146
Open
This was referenced Oct 21, 2024
[Snyk] Fix for 6 vulnerabilities Graybar-codespace/node#38
Open
[Snyk] Fix for 16 vulnerabilities Graybar-codespace/node#61
Open
[Snyk] Fix for 5 vulnerabilities Graybar-codespace/node#93
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@BridgeAR BridgeAR BridgeAR approved these changes
@addaleax addaleax addaleax approved these changes
@cjihrig cjihrig cjihrig approved these changes
+1 more reviewer
@targos targos targos left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. fs Issues and PRs related to file-system APIs and the fs module.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@lucamaraschi @jasnell @cjihrig @BridgeAR @addaleax @MylesBorins @targos @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.