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

test: fix writefile with fd by Linkgoron · Pull Request #38820 · nodejs/node · GitHub

/ node Public

test: fix writefile with fd - #38820

Closed
Linkgoron wants to merge 2 commits into
nodejs:masterfrom
Linkgoron:fs-fix-writefile-with-fd
Closed

test: fix writefile with fd#38820
Linkgoron wants to merge 2 commits into
nodejs:masterfrom
Linkgoron:fs-fix-writefile-with-fd

Conversation

Linkgoron commented May 26, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

Fix writefile with fd so that it'll close the fds that it uses during the test, as it breaks the build on Windows, after #38684

fix writefile with fd so that it'll close the fds
that is uses during the test.
github-actions Bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels May 26, 2021

Copy link
Copy Markdown
Collaborator

richardlau 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

Would it be more "correct" to wrap the expected-to-fail writeFile() calls in a try-finally block and close the fd in the finally block?

Linkgoron commented May 26, 2021
edited
Loading

Copy link
Copy Markdown
Contributor Author

Would it be more "correct" to wrap the expected-to-fail writeFile() calls in a try-finally block and close the fd in the finally block?

What I did was definitely wrong for the sync write, as if one of those asserts fails I would miss registering the beforeExit.

For the other paths - I think that its simpler to push the fds into an array, because everything is async and I would need to make sure that all of the paths are covered.

Linkgoron force-pushed the fs-fix-writefile-with-fd branch from 3e3264c to 280e745 Compare May 26, 2021 16:13

Copy link
Copy Markdown
Collaborator

nodejs-github-bot commented May 26, 2021
edited by Linkgoron
Loading

Copy link
Copy Markdown
Collaborator

nodejs-github-bot commented May 27, 2021
edited by Linkgoron
Loading

Copy link
Copy Markdown
Collaborator

Linkgoron added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label May 27, 2021
targos added the fast-track PRs that do not need to wait for 48 hours to land. label May 28, 2021

Copy link
Copy Markdown
Contributor

Fast-track has been requested by @targos. Please 👍 to approve.

targos pushed a commit that referenced this pull request May 28, 2021
fix writefile with fd so that it'll close the fds
that is uses during the test.

PR-URL: #38820
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>

targos commented May 28, 2021

Copy link
Copy Markdown
Member

Landed in 0222a10

targos closed this May 28, 2021
danielleadams pushed a commit that referenced this pull request May 31, 2021
fix writefile with fd so that it'll close the fds
that is uses during the test.

PR-URL: #38820
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
danielleadams mentioned this pull request May 31, 2021
richardlau pushed a commit that referenced this pull request Jul 16, 2021
fix writefile with fd so that it'll close the fds
that is uses during the test.

PR-URL: #38820
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
richardlau pushed a commit that referenced this pull request Jul 19, 2021
fix writefile with fd so that it'll close the fds
that is uses during the test.

PR-URL: #38820
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
richardlau pushed a commit that referenced this pull request Jul 20, 2021
fix writefile with fd so that it'll close the fds
that is uses during the test.

PR-URL: #38820
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
richardlau mentioned this pull request Jul 20, 2021
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

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. fast-track PRs that do not need to wait for 48 hours to land. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL