FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: fix params in parallel/test-fs-null-bytes.js by vsemozhetbyt · Pull Request #11601 · nodejs/node · GitHub

/ node Public

test: fix params in parallel/test-fs-null-bytes.js - #11601

Merged
seishun merged 1 commit into
nodejs:masterfrom
vsemozhetbyt:test-fs-null-bytes
Mar 3, 2017
Merged

test: fix params in parallel/test-fs-null-bytes.js#11601
seishun merged 1 commit into
nodejs:masterfrom
vsemozhetbyt:test-fs-null-bytes

Conversation

vsemozhetbyt commented Feb 28, 2017
edited
Loading

Copy link
Copy Markdown
Contributor
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)

fs, test

parallel/test-fs-null-bytes.js tests fs.appendFile() and fs.writeFile() with wrong parameters scheme, i.e. without mandatory data parameter. This may be not very important for the test aim, but it makes it somehow compromised. This PR adds a simple data parameter to the 6 calls of these functions.

targos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. Can you add a Refs: line with the related issue URL?

Copy link
Copy Markdown
Contributor Author

@targos Added. Sorry, maybe I had to post 2 separate issues for these cases.

seishun left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
  1. Please add an explanation to the commit message explaining the change.
  2. Maybe someone has a better idea for the data than '1'. If not, feel free to ignore.

targos commented Feb 28, 2017

Copy link
Copy Markdown
Member

@seishun what about 'data'?

seishun commented Feb 28, 2017

Copy link
Copy Markdown
Contributor

@targos I think it's better to follow other tests. For example. test\parallel\test-fs-write-file-sync.js uses abc and 123.

mscdex added the fs Issues and PRs related to the fs subsystem / file system. label Feb 28, 2017

Copy link
Copy Markdown
Contributor Author

@seishun Done.

seishun left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Functions fs.appendFile() and fs.writeFile() were called without mandatory data parameter.

How about:

The functions fs.appendFile() and fs.writeFile() were called without the required data parameter.

Also is that how functions are usually referred to in commit messages, with empty brackets?

This PR adds a simple data parameter to 6 calls of these functions.

I don't think this line is necessary, but in any case commit messages don't usually refer to themselves as PRs.

vsemozhetbyt commented Feb 28, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

@seishun Fixed. As for 'how functions are usually referred to in commit messages' — I don't know. I just followed STYLE_GUIDE here:

References to methods should be used with parenthesis: socket.end() instead of socket.end.

Tell me if I should change this here.

seishun commented Feb 28, 2017

Copy link
Copy Markdown
Contributor

Agreed, let's keep the parentheses as-is.

Also, maybe "were being called" instead of "were called". And maybe "argument" instead of "parameter".

hiroppy commented Mar 1, 2017

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Contributor Author

Could this be landed, please?

seishun commented Mar 3, 2017

Copy link
Copy Markdown
Contributor

@vsemozhetbyt One more thing. The first line is too long. How about replace "params" with "args"?

The functions `fs.appendFile()` and `fs.writeFile()`
were being called without the required `data` argument.

Refs: #11595

Copy link
Copy Markdown
Contributor Author

@seishun Done.

seishun merged commit c500b5a into nodejs:master Mar 3, 2017
vsemozhetbyt deleted the test-fs-null-bytes branch March 3, 2017 14:14
addaleax pushed a commit that referenced this pull request Mar 5, 2017
The functions `fs.appendFile()` and `fs.writeFile()`
were being called without the required `data` argument.

Refs: #11595
PR-URL: #11601
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
evanlucas mentioned this pull request Mar 8, 2017

Copy link
Copy Markdown
Contributor

This does not land cleanly in LTS. Please feel free to manually backport. Please also feel free to replace the backport request label with do-not-land if it shouldn't land

Copy link
Copy Markdown
Contributor Author

@MylesBorins #12477

MylesBorins pushed a commit that referenced this pull request Apr 18, 2017
The functions `fs.appendFile()` and `fs.writeFile()`
were being called without the required `data` argument.

Refs: #11595
Backport-PR-URL: #12477
PR-URL: #11601
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
MylesBorins pushed a commit that referenced this pull request Apr 19, 2017
The functions `fs.appendFile()` and `fs.writeFile()`
were being called without the required `data` argument.

Refs: #11595
Backport-PR-URL: #12477
PR-URL: #11601
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
MylesBorins mentioned this pull request Apr 19, 2017
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
The functions `fs.appendFile()` and `fs.writeFile()`
were being called without the required `data` argument.

Refs: nodejs/node#11595
Backport-PR-URL: nodejs/node#12477
PR-URL: nodejs/node#11601
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fs Issues and PRs related to the fs subsystem / file system. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL