Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
f65eadc
assert: change status of legacy asserts
jasnell Apr 6, 2021
8951c19
deps: V8: cherry-pick 501482cbc704
cjihrig Apr 2, 2021
aa0d814
test: add regression test for serdes readDouble()
cjihrig Apr 8, 2021
e999da7
test: fix flaky test-zlib-unused-weak.js
oyyd Apr 8, 2021
552c945
test: remove unneeded m flag on regular expressions
Trott Apr 7, 2021
424c8e1
doc: add link to V8
VoltrexKeyva Apr 8, 2021
c7981da
test: skip test-hash-seed on armv6 and armv7
Trott Apr 4, 2021
058abbe
test: skip test-vm-memleak in ASAN
Trott Apr 6, 2021
5667d0a
build: don't run test workflow on doc dir on macOS
ycjcl868 Mar 31, 2021
ce70ea8
test: skip fs.watch() test on IBMi
Trott Apr 11, 2021
4350bf5
doc: mention cryptographic prng in description of randomUUID
srknzl Apr 4, 2021
c7c8722
doc: update links in ICU guide
targos Apr 9, 2021
c00c31c
benchmark: improve compare.R output
mscdex Apr 6, 2021
be28376
doc: add command flag to import.meta.resolve
iguessitsokay Apr 9, 2021
bb8db84
doc: clarify child_process close event
Linkgoron Apr 10, 2021
605f830
test: add undefined fatalException exit code test
Linkgoron Apr 6, 2021
723977f
crypto: reduce range of size to int max
Ayase-252 Apr 5, 2021
95c7dab
test: fix typo in gtest-all.cc
eltociear Apr 13, 2021
a4275ee
test: fix typo in comment in binding.c
tniessen Apr 12, 2021
e6c599b
doc: standardize command flag notes
iguessitsokay Apr 11, 2021
08a6d9e
util: add getSystemErrorMap() impl
eladkishon Apr 5, 2021
e2c2f2b
typings: add JSDoc types to lib/path
Skn0tt Apr 10, 2021
796007b
test: fix test-https-agent-additional-options.js
Trott Apr 11, 2021
ae44e5f
test: add tests for missing https agent options
Trott Apr 11, 2021
5dfe5af
doc: revise TLS minVersion/maxVersion text
Trott Apr 11, 2021
530e69e
typings: add JSDoc typings for assert
VoltrexKeyva Apr 10, 2021
ec4be2d
src: fix finalization crash
jasnell Apr 15, 2021
60c7591
typings: add JSDoc typings for http
VoltrexKeyva Apr 10, 2021
9265027
doc: change "oject" to "object"
arkerone Apr 16, 2021
ea1183c
test: fixup failing test/internet/test-dns.js
jasnell Apr 14, 2021
46651b6
dns: refactor cares_wrap internals
jasnell Apr 8, 2021
885ed96
doc: fix typo in repl.md
arkerone Apr 15, 2021
0544410
buffer,errors: add missing n literal in range error string
cactysman Mar 14, 2021
599434a
typings: add JSDoc Types to lib/querystring
Skn0tt Apr 10, 2021
face4b8
typings: add JSDoc to os module functions
xavdid Apr 11, 2021
2e81ded
test: fix flaky test-dns and test-dns-lookup
Trott Apr 18, 2021
5ed770e
src: cache some context in locals
XadillaX Feb 22, 2021
ed7c0d7
tools: skip macOS GitHub Actions test on doc-only changes
Trott Apr 19, 2021
2e7f74c
doc: harmonize changes list ordering
aduh95 Oct 1, 2020
cbb0a45
tools: bump remark-lint-preset-node to 1.17.1
Trott Oct 16, 2020
ac70a59
tools: bump remark-lint-preset-node to 2.0.0
Trott Nov 1, 2020
c8f77f2
tools: update ini in tools/node-lint-md-cli-rollup
MylesBorins Dec 10, 2020
abd45d3
tools: update all lint-md rollup dependencies
targos Jan 8, 2021
5afaeaf
tools: bump remark-present-lint-node from 2.0.0 to 2.0.1
Trott Feb 8, 2021
b76aa10
tools: update remark-preset-lint-node to 2.1.1
Trott Mar 4, 2021
2c49953
tools: update glob-parent to 5.1.2
Trott Mar 7, 2021
cd95bf3
test: change Fixes: to Refs:
Trott Jul 30, 2020
93c917c
test: move buffer-as-path symlink test to its own test file
Trott Jul 30, 2020
9c9726b
node-api: faster threadsafe_function
indutny May 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: move buffer-as-path symlink test to its own test file
The buffer-as-path test for fs.symlinkSync() is a bit unusual and
potentially error-prone embedded in the general fs.symlink() test. Move
it to its own test file.

Refs: https://github.com/nodejs/node/pull/34540/files#r463168354

PR-URL: #34569
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
  • Loading branch information
Trott authored and targos committed May 1, 2021
commit 93c917c1ce659436961cfa37281846a8e160b65c
60 changes: 60 additions & 0 deletions test/parallel/test-fs-symlink-buffer-path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
if (!common.canCreateSymLink())
common.skip('insufficient privileges');

const fixtures = require('../common/fixtures');

const assert = require('assert');
const path = require('path');
const fs = require('fs');

const tmpdir = require('../common/tmpdir');
tmpdir.refresh();

// Test creating and reading symbolic link
const linkData = fixtures.path('/cycles/root.js');
const linkPath = path.join(tmpdir.path, 'symlink1.js');

let linkTime;
let fileTime;

// Refs: https://github.com/nodejs/node/issues/34514
fs.symlinkSync(Buffer.from(linkData), linkPath);

fs.lstat(linkPath, common.mustSucceed((stats) => {
linkTime = stats.mtime.getTime();
}));

fs.stat(linkPath, common.mustSucceed((stats) => {
fileTime = stats.mtime.getTime();
}));

fs.readlink(linkPath, common.mustSucceed((destination) => {
assert.strictEqual(destination, linkData);
}));

process.on('exit', () => {
assert.notStrictEqual(linkTime, fileTime);
});
6 changes: 1 addition & 5 deletions test/parallel/test-fs-symlink.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ fs.symlink(linkData, linkPath, common.mustSucceed(() => {
fs.readlink(linkPath, common.mustSucceed((destination) => {
assert.strictEqual(destination, linkData);
}));

tmpdir.refresh();
// Refs: https://github.com/nodejs/node/issues/34514
fs.symlinkSync(Buffer.from(linkData), linkPath);
}));

// Test invalid symlink
Expand Down Expand Up @@ -89,6 +85,6 @@ const errObj = {
assert.throws(() => fs.symlink('', '', '🍏', common.mustNotCall()), errObj);
assert.throws(() => fs.symlinkSync('', '', '🍏'), errObj);

process.on('exit', function() {
process.on('exit', () => {
assert.notStrictEqual(linkTime, fileTime);
});