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

test: fs.link() test runs on same device by drewfish · Pull Request #4861 · nodejs/node · GitHub

/ node Public

test: fs.link() test runs on same device - #4861

Closed
drewfish wants to merge 2 commits into
nodejs:masterfrom
drewfish:test-hardlink-same-device
Closed

test: fs.link() test runs on same device#4861
drewfish wants to merge 2 commits into
nodejs:masterfrom
drewfish:test-hardlink-same-device

Conversation

Copy link
Copy Markdown
Contributor

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).

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).
mscdex added fs Issues and PRs related to the fs subsystem / file system. test Issues and PRs related to the tests. labels Jan 25, 2016

Copy link
Copy Markdown
Contributor Author

This PR possibly replaces PR #4859 (which is made against the v4.x branch).

Copy link
Copy Markdown
Contributor Author

I'm particularly interested in having this backported to the v4.x branch if that makes sense, as I'm running into the test failure while trying to build argon.

Comment thread test/parallel/test-fs-link.js Outdated

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

I'd simplify this to e.g.:

const srcPath = path.join(common.tmpDir, 'target.txt');
fs.writeFileSync(srcPath, 'hello world');

One fewer variable.

Copy link
Copy Markdown
Contributor Author

updated

Trott commented Jan 25, 2016

Copy link
Copy Markdown
Member

LGTM if CI is happy.

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

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>

Copy link
Copy Markdown
Member

CI is green. Landed in 9b1bc1d with a slightly amended commit log ("created", not "copied"). Thanks!

bnoordhuis closed this Jan 26, 2016
drewfish deleted the test-hardlink-same-device branch January 26, 2016 18:13
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>
MylesBorins mentioned this pull request Feb 18, 2016
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 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

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.

5 participants


Back | FazBrowse Home | New Git URL