James M Snell
ae5567eaea
test: add regression test for nghttp2 CVE-2018-1000168
...
PR-URL: https://github.com/nodejs-private/node-private/pull/117
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 13:46:52 -05:00
Shigeki Ohtsu
e87bf625dd
test: add tls write error regression test
...
Add a mock TLS socket implementation and a regression test for
the previous commit.
Refs: https://github.com/nodejs-private/security/issues/189
PR-URL: https://github.com/nodejs-private/node-private/pull/127
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 05:16:55 -05:00
cjihrig
92d7b6c9a0
fs: fix promises reads with pos > 4GB
...
PR-URL: https://github.com/nodejs/node/pull/21148
Fixes: https://github.com/nodejs/node/issues/21121
Refs: https://github.com/nodejs/node/pull/21003
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-06-12 05:07:16 -05:00
Anatoli Papirovski
8161287b40
test: move benchmark-dgram to sequential
...
This test uses hardcoded ports, it should not be located in parallel.
PR-URL: https://github.com/nodejs/node/pull/21144
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-06-06 10:33:35 +02:00
Rich Trott
9d41ab466b
test: refactor child-process-fork-net
...
Split test-child-process-fork-net into
test-child-process-fork-net-server and
test-child-process-fork-net-socket. Rename
test-child-process-fork-net2.js to test-child-process-fork-net.js.
Refs: https://github.com/nodejs/node/pull/21012
PR-URL: https://github.com/nodejs/node/pull/21095
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:33:35 +02:00
Matheus Marchini
820236fd0d
test: mark test-trace-events-fs-sync as flaky
...
test-trace-events-fs-sync has been failing ocasinally on FreeBSD. While
we don't have a fix, it should be marked as flaky.
Ref: https://github.com/nodejs/node/issues/21038
PR-URL: https://github.com/nodejs/node/pull/21039
Refs: https://github.com/nodejs/node/issues/21038
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Lance Ball <lball@redhat.com >
2018-06-06 10:33:35 +02:00
Masashi Hirano
2d36150852
test: string-decorater.lastChar
...
Added test for string-decorater.lastChar to improve coverage.
PR-URL: https://github.com/nodejs/node/pull/21084
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:32:48 +02:00
Tobias Nießen
1733ef9dec
test: make handling of noWarnCode stricter
...
This change requires all expected warnings to be specified along with
their respective code and will raise an error if the code does not
match. This also kind of fixes the behavior when the expected warning
code was noWarnCode and there is an actual warning code.
PR-URL: https://github.com/nodejs/node/pull/21075
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-06 10:32:48 +02:00
Ben Noordhuis
c60810a853
test: increase slop limit in memory leak test
...
It transpires that the extra bookkeeping in debug builds sometimes makes
the increase in RSS go _just_ over the 5 MB limit, by fewer than 100 kB.
Double the limit so we hopefully don't run into it any time again soon.
The memory leak it tests for was one where RSS grew by hundreds of
megabytes over the lifetime of the test; 5 vs. 10 MB is insignificant.
Fixes: https://github.com/nodejs/node/issues/21076
PR-URL: https://github.com/nodejs/node/pull/21080
Refs: https://github.com/nodejs/node/issues/21076
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-06 10:31:28 +02:00
Ben Noordhuis
fda8654161
test: log before and after RSS in memory leak test
...
Refs: https://github.com/nodejs/node/issues/21076
PR-URL: https://github.com/nodejs/node/pull/21080
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-06 10:31:28 +02:00
Anna Henningsen
bd0d19dae7
test: minor adjustments to test-http2-respond-file
...
PR-URL: https://github.com/nodejs/node/pull/21098
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-06-06 10:31:28 +02:00
Miklos Suveges
44fe78b09a
stream: inline needMoreData function
...
Inline the needMoreData function since it has only one call place.
Update the related comment.
Add a test for the edge case where HWM=0 and state.length=0.
Add a test for ReadableStream.read(n) method's edge case where
n, HWM and state.length are all zero.
This proves that there is no easy way to simplify the check at
https://github.com/nodejs/node/blob/master/lib/_stream_readable.js#L440
Fixes: https://github.com/nodejs/node/issues/19893
Refs: https://github.com/nodejs/node/pull/19896
PR-URL: https://github.com/nodejs/node/pull/21009
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00
Rich Trott
c8ee379d85
test: run crypto benchmark only once in tests
...
Prevent crypto benchmark files from running more than one benchmark
during tests.
PR-URL: https://github.com/nodejs/node/pull/21032
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-06-06 10:31:28 +02:00
Rich Trott
a3fdd2e4c5
test: add option to test-benchmark-timers
...
Add option to test-benchmark-timers such that all benchmark files return
only a single set of results. (This helps prevent benchmark tests from
taking a long time to run.)
Alphabetize options in the file.
PR-URL: https://github.com/nodejs/node/pull/21032
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-06-06 10:31:28 +02:00
Rich Trott
c74c83a4c1
test: avoid empty fixture in fs test
...
Refactor test-fs-error-messages to use tmpdir for its empty directory
rather than using a not-actually-empty directory called "empty" in
fixtures.
PR-URL: https://github.com/nodejs/node/pull/21044
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-06 10:31:28 +02:00
Lucas Liepert
d84aa51dc7
test: removed message from strictEqual
...
By removing the message from strictEqual, it will now print out the
actual values of a and b, which will be more helpful in debugging. The
old message has been added as a comment above the test.
PR-URL: https://github.com/nodejs/node/pull/20983
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-06 10:31:28 +02:00
Shivang
e4224fd793
test: improve path tests
...
Replaced deepStrictEqual with strictEqual when asserting that the
path is equal to the win32 or posix equivalent, since it is a more
strict check than deepStrictCheck. Also removed third argument
in the check so that if there is an assertion error the properties
that are different will be displayed.
PR-URL: https://github.com/nodejs/node/pull/20967
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-06 10:31:28 +02:00
cjihrig
df97791447
test: update postmortem metadata test
...
This commit updates the following postmortem metadata constants:
- v8dbg_class_SharedFunctionInfo__code__Code
- This is now combined with SharedFunctionInfo's function_data.
- Renamed: v8dbg_class_SharedFunctionInfo__function_data__Object
- V8 commit: https://github.com/v8/v8/commit/51ded9d3c0dc430217253595027c6ed207d8cc2d
- v8dbg_class_SharedFunctionInfo__raw_name__Object and
- v8dbg_class_SharedFunctionInfo__scope_info__ScopeInfo
- These are now combined as name_or_scope_info.
- Renamed: v8dbg_class_SharedFunctionInfo__name_or_scope_info__Object
- V8 commit: https://github.com/v8/v8/commit/74a663be675924944a343f2aed71bbe60ef55764
- v8dbg_class_SharedFunctionInfo__compiler_hints__int
- Renamed: v8dbg_class_SharedFunctionInfo__flags__int
- V8 commit: https://github.com/v8/v8/commit/071b01b6406e8884b040cc54e763d4c3b4b18c39#diff-f3f182b0510ba2ee39ae87e421ff110b
Fixes: https://github.com/nodejs/node-v8/issues/44
Fixes: https://github.com/nodejs/node-v8/issues/48
PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2018-06-01 16:45:22 +02:00
cjihrig
aa08f6464c
test: add read_only_space heap space
...
v8.getHeapSpaceStatistics() now includes read_only_space
in its results. Update test-v8-stats.js to account for this.
Fixes: https://github.com/nodejs/node-v8/issues/44
PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2018-06-01 16:45:16 +02:00
Michaël Zasso
4c48b69e90
util: add type check function for BigIntObject
...
PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2018-06-01 16:44:59 +02:00
Shailesh Shekhawat
ea81d42ddc
test: show actual error in next-tick-when-exiting
...
On process exit if some assertion error occurs value of
`process._exiting` was hidden, this fix will show the actual
error message with value.
PR-URL: https://github.com/nodejs/node/pull/20956
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-01 11:18:19 +02:00
Anatoli Papirovski
d4787cfd61
http2: force through RST_STREAM in destroy
...
If still needed, force through RST_STREAM in Http2Stream#destroy
calls, so that nghttp2 can wrap up properly and doesn't continue
trying to read & write data to the stream.
PR-URL: https://github.com/nodejs/node/pull/21016
Fixes: https://github.com/nodejs/node/issues/21008
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-06-01 11:18:18 +02:00
Anatoli Papirovski
7e1f61070e
test: fix flaky test-domain-timers
...
It's possible for this test to be extremely infrequently flaky if
1ms or more elapses between setting the two timeouts. In that case,
the second timer will not fire and the test will fail.
PR-URL: https://github.com/nodejs/node/pull/21019
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-06-01 11:18:18 +02:00
James M Snell
b5b7459e5c
trace_events: add version metadata
...
Use `TRACE_EVENT_METADATA1` to include just the node.js version for
now. Later this can be expanded to include more version and platform
details.
PR-URL: https://github.com/nodejs/node/pull/20852
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-06-01 11:17:24 +02:00
Blaine Bublitz
d1e81b0f17
stream: ensure Stream.pipeline re-throws errors without callback
...
Fixes an issue where Stream.pipeline wouldn't re-throw errors
on a stream if no callback was specified, thus swallowing
said errors.
Fixes: https://github.com/nodejs/node/issues/20303
PR-URL: https://github.com/nodejs/node/pull/20437
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-05-31 11:34:50 +02:00
Anna Henningsen
182c73bf7f
http2: switch to new runtime-controlled debugging system
...
Remove `--debug-http2` as a compile-time feature and
make all debug statements available using `NODE_DEBUG_NATIVE=http2`
at runtime.
This probably makes the debugging-enabled case a bit slower due to
additional string concatenations, but switching to a runtime-checking
system makes debugging more flexible and can be applied more easily
to other parts of the source code as well.
PR-URL: https://github.com/nodejs/node/pull/20987
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-31 11:34:50 +02:00
Masashi Hirano
ff5f20fc7b
test: add test for fs.promises.lchmod
...
To increase test coverage for fs.promises by adding a test for
lchmod.
PR-URL: https://github.com/nodejs/node/pull/20584
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-05-31 11:34:49 +02:00
Unknown
44ef458d9c
fs: ensure options.flag defaults to 'r' in readFile
...
When passing {} or { encoding: 'utf8' } as options to readFile, the
flag is not defaulted to 'r' unlike normal fs. This fix makes
fs.promises.readFile() act consistent with fs.readFile().
It also fixes another issue with fs.promises.readfile() where it
returned a Buffer instead of an empty string when encoding is provided.
PR-URL: https://github.com/nodejs/node/pull/20268
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-31 11:34:48 +02:00
Matheus Marchini
04af69750c
test: mark test-child-process-fork-net as flaky
...
`flaky-test-child-process-fork-net` has been failing constantly for the
past few days, and all solutions suggestes so far were didn't work.
Marking it as faky while the issue is not fixed.
Ref: https://github.com/nodejs/node/pull/21012
Ref: https://github.com/nodejs/node/pull/20973
Ref: https://github.com/nodejs/node/pull/20973
PR-URL: https://github.com/nodejs/node/pull/21018
Refs: https://github.com/nodejs/node/pull/21012
Refs: https://github.com/nodejs/node/pull/20973
Refs: https://github.com/nodejs/node/pull/20973
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-31 11:34:48 +02:00
Gireesh Punathil
edf42985d7
test: fix worker send error
...
In test-child-process-fork-closed-channel-segfault.js, race condition
is observed between the server getting closed and the worker sending
a message. Accommodate the potential errors.
Earlier, the same race was observed between the client and server
and was addressed through ignoring the relevant errors through error
handler. The same mechanism is re-used for worker too.
The only difference is that the filter is applied at the callback
instead of at the worker's error listener.
Refs: https://github.com/nodejs/node/issues/3635#issuecomment-157714683
Fixes: https://github.com/nodejs/node/issues/20836
PR-URL: https://github.com/nodejs/node/pull/20973
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com >
2018-05-31 11:34:46 +02:00
Kael Zhang
8f52c3fb6b
stream: fix removeAllListeners() for Stream.Readable
...
Fixes: https://github.com/nodejs/node/issues/20923
PR-URL: https://github.com/nodejs/node/pull/20924
Refs: https://github.com/nodejs/node/issues/20923
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-05-29 14:02:29 +02:00
cjihrig
5f9c01b646
Revert "repl: add friendly tips about how to exit repl"
...
This reverts commit 9aa4ec43fc .
This commit in question introduced a regression in repl.eval(),
as the context argument is no longer passed to runInContext().
PR-URL: https://github.com/nodejs/node/pull/20972
Fixes: https://github.com/nodejs/node/issues/20965
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2018-05-29 14:02:29 +02:00
Rich Trott
011235768c
test: improve assert test hygiene
...
Do not pollute the source tree for the test. Instead of writing to the
source tree, spawn a process with the temp dir as cwd and write the file
there.
PR-URL: https://github.com/nodejs/node/pull/20861
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-29 14:02:29 +02:00
Rich Trott
88f9a399d6
test: isolate unusual assert test in its own file
...
test-assert.js contains a test that writes to the source tree, requires
an internal module, and depends on modules not needed by the plethora of
other test cases in the file. Move it to its own file so that there are
not side effects in test-assert.js and so that it can be refactored to
not write to the source tree.
PR-URL: https://github.com/nodejs/node/pull/20861
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-29 14:02:29 +02:00
Ruben Bridgewater
460a5025d0
test: fix test failure on aix
...
This makes sure there is enough stack space on different systems.
PR-URL: https://github.com/nodejs/node/pull/20940
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-05-29 14:02:29 +02:00
Mathias Buus
bfe6dc369d
fs: fix reads with pos > 4GB
...
PR-URL: https://github.com/nodejs/node/pull/21003
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-29 13:55:58 +02:00
Rich Trott
d09bec8a04
test: improve error message in async-wrap test
...
Improve AssertionError message in
test/parallel/test-async-wrap-pop-id-during-load.js to include the
contents of stderr when the spawned process fails.
Refs: https://github.com/nodejs/node/pull/20940/files#r190707951
PR-URL: https://github.com/nodejs/node/pull/20948
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-29 13:55:28 +02:00
Ruben Bridgewater
460add98fb
test: reduce runtime
...
This refactors some tests to reduce the runtime of those.
PR-URL: https://github.com/nodejs/node/pull/20688
Refs: https://github.com/nodejs/node/issues/20128
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
2018-05-29 13:55:23 +02:00
sagirk
82afb4cf7d
test: remove message argument from strictEqual()
...
In test/parallel/test-require-process.js, the last thing in the test is
a call to assert.strictEqual(). It has a string literal as its third
argument. Unfortunately, that means that the diff between the two values
being compared will be suppressed if there is an AssertionError. That's
not helpful for debugging.
This is fixed by removing the third argument from the call. It is,
however, preserved in a comment above the call to assert.strictEqual().
PR-URL: https://github.com/nodejs/node/pull/20912
Fixes: https://github.com/nodejs/node/issues/20911
Refs: https://www.nodetodo.org/getting-started
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-25 22:44:28 +02:00
AbhimanyuVashisht
40e57885d4
test: remove string literal from strictEqual
...
Remove obsolete string literals from `assert.strictEqual()` calls in
test/parallel/test-stream-pip-await-drain-push-while-write.js.
PR-URL: https://github.com/nodejs/node/pull/20920
Refs: https://www.nodetodo.org/getting-started
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-25 22:44:20 +02:00
nam
9bbab91479
test: include port in assertion message
...
PR-URL: https://github.com/nodejs/node/pull/20889
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-05-25 22:43:27 +02:00
Bartosz Sosnowski
b242248188
net: allow IPC servers be accessible by all
...
Adds mappings to uv_pipe_chmod call by adding two new options to
listen call. This allows the IPC server pipe to be made readable or
writable by all users.
Fixes: https://github.com/nodejs/node/issues/19154
PR-URL: https://github.com/nodejs/node/pull/19472
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-05-25 14:01:21 +02:00
Masashi Hirano
554ad478d4
test: improve coverage for readline.Interface
...
Add tests in parallel/test-readline-interface to increase coverage
PR-URL: https://github.com/nodejs/node/pull/20704
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-25 14:00:41 +02:00
Tim Seckinger
ea702e2812
assert: handle undefined filename in getErrMessage
...
When generating an assertion error message,
`filename` might be undefined,
e.g. if `assert` is called in `eval`.
Handle this case gracefully instead of failing with
`Cannot read property 'endsWith' of undefined`.
Fixes: https://github.com/nodejs/node/issues/20847
PR-URL: https://github.com/nodejs/node/pull/20848
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-25 14:00:25 +02:00
Rich Trott
443d60afcc
test: use log only in test-child-process-fork-net
...
We are currently having issues with test-child-process-fork-net on
Windows CI. Debugging is slightly hampered by the mix of `console.log()`
and `console.error()` as our test runner does not interleave stdout and
stderr, so the order of output is not preserved. Change the sole
instance of `console.error()` to `console.log()` to improve
debugability.
While editing, I also took the opportunity to add capitalization and
punctuation to comments (as that is a nit we see from time to time and
there is a potential ESLint rule to enforce the capitalization part).
PR-URL: https://github.com/nodejs/node/pull/20873
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-05-25 13:59:45 +02:00
CoreyGMartin
ed84b7d42f
test: changed assert message from string literal to template literal
...
PR-URL: https://github.com/nodejs/node/pull/20870
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-25 13:59:34 +02:00
Robert Nagy
2a9c83321b
http: fix res emit close before user finish
...
PR-URL: https://github.com/nodejs/node/pull/20941
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-24 13:25:03 -04:00
Joyee Cheung
5886b7826c
test: test about:blank against invalid WHATWG URL
...
> If `failure` is true, parsing `about:blank` against `base`
> must give failure. This tests that the logic for converting
> base URLs into strings properly fails the whole parsing
> algorithm if the base URL cannot be parsed.
Fixes: https://github.com/nodejs/node/issues/20720
PR-URL: https://github.com/nodejs/node/pull/20796
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-23 17:05:38 -04:00
Rich Trott
dc29a3b386
test: add promise API test for appendFile()
...
Apply the second of five test cases in test-fs-append-fil to the
promise-based API in addition to the callback-based API.
PR-URL: https://github.com/nodejs/node/pull/20842
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2018-05-23 17:05:38 -04:00
Masashi Hirano
d9aecc0c07
test: improve coverage for internal/readline
...
Add tests for readline keys to improve coverage.
PR-URL: https://github.com/nodejs/node/pull/20840
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2018-05-23 17:05:38 -04:00