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: add support for NODE_TEST_DIR on a separate mount point by aduh95 · Pull Request #21552 · nodejs/node

Conversation

@aduh95

@aduh95 aduh95 commented Jun 26, 2018

Copy link
Copy Markdown
Contributor

Linux permits a filesystem to be mounted at multiple points, but fs.renameSync does not work across different mount points, even if the same filesystem is mounted on both.
This fixes failing tests when NODE_TEST_DIR mount point is different from the one on which the tests are executed (E.G. on a separate partition).

On my configuration, I have the node source on a NTFS partition (dual-boot Windows), and I want to avoid the tests on the chmod to fail (the chmod is partition-wide and set when mounting). This PR allows to run the tests using a different tmpdir without having to move the node source to the same mount point.

NODE_TEST_DIR=/tmp/ make test -j4

Ref: http://man7.org/linux/man-pages/man2/rename.2.html

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@aduh95
test: add support for NODE_TEST_DIR on a separate mount point
cf8a1ec
Linux permits a filesystem to be mounted at multiple points, but
`fs.renameSync` does not work across different mount points, even if the
same filesystem is mounted on both.
This fixes failing tests when NODE_TEST_DIR mount point is different
from the one on which the tests are executed (E.G. on a separate
partition).

Ref: http://man7.org/linux/man-pages/man2/rename.2.html
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to Node.js core tests and test infrastructure. label Jun 26, 2018
@jasnell
jasnell requested review from joyeecheung and targos June 29, 2018 19:12
jasnell
jasnell approved these changes Jun 29, 2018
View reviewed changes
@jasnell

jasnell commented Jun 29, 2018

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@Trott

Trott commented Jun 29, 2018

Copy link
Copy Markdown
Member

@nodejs/testing

All reactions

Sorry, something went wrong.

Uh oh!

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

@bcoe

bcoe commented Jun 29, 2018

Copy link
Copy Markdown
Contributor

this seems reasonable to me, @cjihrig did you have similar reasoning around the ENOTSUP and ENOTTY checks -- attempt to determine whether copyFileSync could even function on the system before failing the whole test?

All reactions

Sorry, something went wrong.

Uh oh!

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

@cjihrig

cjihrig commented Jun 29, 2018

Copy link
Copy Markdown
Contributor

did you have similar reasoning around the ENOTSUP and ENOTTY checks -- attempt to determine whether copyFileSync could even function on the system before failing the whole test?

Yes, specifically the COPYFILE_FICLONE_FORCE flag, which isn't supported everywhere. Unfortunately, different errors are returned depending on the OS. Side note - ENOTTY shouldn't be a valid option anymore, as of libuv 1.21.0.

All reactions

Sorry, something went wrong.

Uh oh!

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

@richardlau richardlau mentioned this pull request Jul 5, 2018
test/parallel/test-fs-error-messages fails if tmpdir on different mount than tests #21669
Closed
@aduh95

aduh95 commented Jul 17, 2018

Copy link
Copy Markdown
Contributor Author

Has my PR anything to do with intl or is it just a random CI fail? Is there something I can do to fix this fail?

All reactions

Sorry, something went wrong.

Uh oh!

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

@Trott

Trott commented Jul 17, 2018

Copy link
Copy Markdown
Member

@nodejs/fs

All reactions

Sorry, something went wrong.

Uh oh!

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

@Trott

Trott commented Jul 17, 2018

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@Trott

Trott commented Jul 17, 2018

Copy link
Copy Markdown
Member

Has my PR anything to do with intl or is it just a random CI fail? Is there something I can do to fix this fail?

Probably unrelated to this. Re-running CI now since it's been a while anyway.

All reactions

Sorry, something went wrong.

Uh oh!

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

joyeecheung
joyeecheung approved these changes Jul 18, 2018
View reviewed changes
richardlau
richardlau approved these changes Jul 18, 2018
View reviewed changes
bcoe
bcoe approved these changes Jul 18, 2018
View reviewed changes
Trott pushed a commit to Trott/io.js that referenced this pull request Jul 18, 2018
@aduh95 @Trott
test: add support for NODE_TEST_DIR on a separate mount point
b75bde3
Linux permits a filesystem to be mounted at multiple points, but
`fs.renameSync` does not work across different mount points, even if the
same filesystem is mounted on both.
This fixes failing tests when NODE_TEST_DIR mount point is different
from the one on which the tests are executed (E.G. on a separate
partition).

Ref: http://man7.org/linux/man-pages/man2/rename.2.html

PR-URL: nodejs#21552
Refs: http://man7.org/linux/man-pages/man2/rename.2.html
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Ben Coe <[email protected]>
@Trott

Trott commented Jul 18, 2018

Copy link
Copy Markdown
Member

Landed in b75bde3

All reactions

Sorry, something went wrong.

Uh oh!

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

@Trott Trott closed this Jul 18, 2018
targos pushed a commit that referenced this pull request Jul 18, 2018
@aduh95 @targos
test: add support for NODE_TEST_DIR on a separate mount point
0108ff6
Linux permits a filesystem to be mounted at multiple points, but
`fs.renameSync` does not work across different mount points, even if the
same filesystem is mounted on both.
This fixes failing tests when NODE_TEST_DIR mount point is different
from the one on which the tests are executed (E.G. on a separate
partition).

Ref: http://man7.org/linux/man-pages/man2/rename.2.html

PR-URL: #21552
Refs: http://man7.org/linux/man-pages/man2/rename.2.html
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Ben Coe <[email protected]>
@targos targos mentioned this pull request Jul 18, 2018
v10.7.0 proposal #21851
Merged
This was referenced Jul 18, 2018
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#207
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#208
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#209
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#210
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#211
Closed
@ljharb ljharb mentioned this pull request Jun 14, 2019
lib: port rimraf to core as shutil.rmtree #28208
Closed
2 of 5 tasks
@aduh95
aduh95 deleted the test-cross-device branch November 14, 2020 11:14
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
@joyeecheung joyeecheung joyeecheung approved these changes
@richardlau richardlau richardlau approved these changes
@targos targos Awaiting requested review from targos
+1 more reviewer
@bcoe bcoe bcoe approved these changes
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

test Issues and PRs related to Node.js core tests and test infrastructure.

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

@aduh95 @jasnell @Trott @bcoe @cjihrig @joyeecheung @richardlau @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.