test: fs.link() test runs on same device#4861
Closed
drewfish wants to merge 2 commits intonodejs:masterfrom
drewfish:test-hardlink-same-device
Closed
test: fs.link() test runs on same device#4861drewfish wants to merge 2 commits intonodejs:masterfrom drewfish:test-hardlink-same-device
drewfish wants to merge 2 commits intonodejs:masterfrom
drewfish:test-hardlink-same-device
Conversation
When running the tests if `NODE_TEST_DIR` is set to a device different than the location of the test files (where this repo is checked out), then the parallel/test-fs-link.js test will fail with `EXDEV: cross-device link not permitted`. The code works fine (and is in fact throwing an error as desired) but the test fails. This commit first copies the "source" file to the same directory as the "destination" (where the hardlink will be created).
Contributor
Author
|
This PR possibly replaces PR #4859 (which is made against the |
Contributor
Author
|
I'm particularly interested in having this backported to the |
test/parallel/test-fs-link.js
Outdated
Member
There was a problem hiding this comment.
I'd simplify this to e.g.:
const srcPath = path.join(common.tmpDir, 'target.txt');
fs.writeFileSync(srcPath, 'hello world');One fewer variable.
Contributor
Author
|
updated |
Member
|
LGTM if CI is happy. |
bnoordhuis
pushed a commit
that referenced
this pull request
Jan 26, 2016
When running the tests if `NODE_TEST_DIR` is set to a device different than the location of the test files (where this repo is checked out), then the parallel/test-fs-link.js test will fail with `EXDEV: cross-device link not permitted`. The code works fine (and is in fact throwing an error as desired) but the test fails. This commit first creates the "source" file in the same directory as the "destination" (where the hardlink will be created). PR-URL: #4861 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
Member
|
CI is green. Landed in 9b1bc1d with a slightly amended commit log ("created", not "copied"). Thanks! |
rvagg
pushed a commit
that referenced
this pull request
Jan 27, 2016
When running the tests if `NODE_TEST_DIR` is set to a device different than the location of the test files (where this repo is checked out), then the parallel/test-fs-link.js test will fail with `EXDEV: cross-device link not permitted`. The code works fine (and is in fact throwing an error as desired) but the test fails. This commit first creates the "source" file in the same directory as the "destination" (where the hardlink will be created). PR-URL: #4861 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
benjamingr
pushed a commit
to benjamingr/io.js
that referenced
this pull request
Jan 27, 2016
When running the tests if `NODE_TEST_DIR` is set to a device different than the location of the test files (where this repo is checked out), then the parallel/test-fs-link.js test will fail with `EXDEV: cross-device link not permitted`. The code works fine (and is in fact throwing an error as desired) but the test fails. This commit first creates the "source" file in the same directory as the "destination" (where the hardlink will be created). PR-URL: nodejs#4861 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
rvagg
pushed a commit
that referenced
this pull request
Feb 8, 2016
When running the tests if `NODE_TEST_DIR` is set to a device different than the location of the test files (where this repo is checked out), then the parallel/test-fs-link.js test will fail with `EXDEV: cross-device link not permitted`. The code works fine (and is in fact throwing an error as desired) but the test fails. This commit first creates the "source" file in the same directory as the "destination" (where the hardlink will be created). PR-URL: #4861 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Feb 17, 2016
When running the tests if `NODE_TEST_DIR` is set to a device different than the location of the test files (where this repo is checked out), then the parallel/test-fs-link.js test will fail with `EXDEV: cross-device link not permitted`. The code works fine (and is in fact throwing an error as desired) but the test fails. This commit first creates the "source" file in the same directory as the "destination" (where the hardlink will be created). PR-URL: #4861 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Feb 18, 2016
When running the tests if `NODE_TEST_DIR` is set to a device different than the location of the test files (where this repo is checked out), then the parallel/test-fs-link.js test will fail with `EXDEV: cross-device link not permitted`. The code works fine (and is in fact throwing an error as desired) but the test fails. This commit first creates the "source" file in the same directory as the "destination" (where the hardlink will be created). PR-URL: #4861 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Mar 2, 2016
When running the tests if `NODE_TEST_DIR` is set to a device different than the location of the test files (where this repo is checked out), then the parallel/test-fs-link.js test will fail with `EXDEV: cross-device link not permitted`. The code works fine (and is in fact throwing an error as desired) but the test fails. This commit first creates the "source" file in the same directory as the "destination" (where the hardlink will be created). PR-URL: #4861 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
scovetta
pushed a commit
to scovetta/node
that referenced
this pull request
Apr 2, 2016
When running the tests if `NODE_TEST_DIR` is set to a device different than the location of the test files (where this repo is checked out), then the parallel/test-fs-link.js test will fail with `EXDEV: cross-device link not permitted`. The code works fine (and is in fact throwing an error as desired) but the test fails. This commit first creates the "source" file in the same directory as the "destination" (where the hardlink will be created). PR-URL: nodejs#4861 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
This was referenced Oct 16, 2022
This was referenced Oct 16, 2022
This was referenced Jul 7, 2023
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
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.
When running the tests if
NODE_TEST_DIRis set to a device differentthan the location of the test files (where this repo is checked out),
then the parallel/test-fs-link.js test will fail with
EXDEV: cross-device link not permitted. The code works fine (and is infact throwing an error as desired) but the test fails.
This commit first copies the "source" file to the same directory as the
"destination" (where the hardlink will be created).