Anna Henningsen
d85e4006ab
test: apply test-http2-max-session-memory-leak from v12.x
...
Refs: https://github.com/nodejs/node/pull/27914
Backport-PR-URL: https://github.com/nodejs/node/pull/29123
PR-URL: https://github.com/nodejs/node/pull/29122
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-15 15:21:23 +01:00
Anna Henningsen
c152449012
http2: pause input processing if sending output
...
If we are waiting for the ability to send more output, we should not
process more input. This commit a) makes us send output earlier,
during processing of input, if we accumulate a lot and b) allows
interrupting the call into nghttp2 that processes input data
and resuming it at a later time, if we do find ourselves in a position
where we are waiting to be able to send more output.
This is part of mitigating CVE-2019-9511/CVE-2019-9517.
Backport-PR-URL: https://github.com/nodejs/node/pull/29123
PR-URL: https://github.com/nodejs/node/pull/29122
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-15 15:21:07 +01:00
Anna Henningsen
f4242e24f9
http2: handle 0-length headers better
...
Ignore headers with 0-length names and track memory for headers
the way we track it for other HTTP/2 session memory too.
This is intended to mitigate CVE-2019-9516.
Backport-PR-URL: https://github.com/nodejs/node/pull/29123
PR-URL: https://github.com/nodejs/node/pull/29122
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-15 15:20:32 +01:00
Anna Henningsen
477461a51f
http2: limit number of invalid incoming frames
...
Limit the number of invalid input frames, as they may be pointing towards a
misbehaving peer. The limit is currently set to 1000 but could be changed or
made configurable.
This is intended to mitigate CVE-2019-9514.
[This commit differs from the v12.x one due to the lack of
https://github.com/libuv/libuv/commit/ee24ce900e5714c950b248da2b .
See the comment in the test for more details.]
Backport-PR-URL: https://github.com/nodejs/node/pull/29123
PR-URL: https://github.com/nodejs/node/pull/29122
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-15 15:20:06 +01:00
ZYSzys
f332265cda
test: remove util.inherits() usage
...
Backport-PR-URL: https://github.com/nodejs/node/pull/28795
PR-URL: https://github.com/nodejs/node/pull/25245
Refs: https://github.com/nodejs/node/pull/24755
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-07-26 00:01:17 +01:00
Anna Henningsen
f3841c6750
stream: convert existing buffer when calling .setEncoding
...
Convert already-stored chunks when `.setEncoding()` is called
so that subsequent `data` events will receive decoded strings,
as they expect.
Fixes: https://github.com/nodejs/node/issues/27932
PR-URL: https://github.com/nodejs/node/pull/27936
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-07-16 17:38:01 +01:00
Matteo Collina
f34bb968c4
process: make stdout and stderr emit 'close' on destroy
...
Fix: https://github.com/nodejs/node/issues/26550
PR-URL: https://github.com/nodejs/node/pull/26691
Fixes: https://github.com/false
Fixes: https://github.com/nodejs/node/issues/26550
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-07-16 17:38:01 +01:00
Anna Henningsen
274b97c4ea
stream: do not unconditionally call _read() on resume()
...
`readable.resume()` calls `.read(0)`, which in turn previously set
`needReadable = true`, and so a subsequent `.read()` call would
call `_read()` even though enough data was already available.
This can lead to elevated memory usage, because calling `_read()`
when enough data is in the readable buffer means that backpressure
is not being honoured.
Fixes: https://github.com/nodejs/node/issues/26957
PR-URL: https://github.com/nodejs/node/pull/26965
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-07-16 17:38:01 +01:00
Matteo Collina
044e753aaf
stream: make _read() be called indefinitely if the user wants so
...
Fixes: https://github.com/nodejs/node/issues/26097
PR-URL: https://github.com/nodejs/node/pull/26135
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-07-16 17:38:01 +01:00
Anna Henningsen
14090b59fc
worker: fix nullptr deref after MessagePort deser failure
...
This would previously always have crashed when deserializing
a `MessagePort` fails, because there was always at least one
`nullptr` entry in the vector.
PR-URL: https://github.com/nodejs/node/pull/25076
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-07-16 17:38:00 +01:00
Gerhard Stoebich
65ef26fdcb
async_hooks: avoid double-destroy HTTPParser
...
Avoid that destroy hook is invoked twice - once via `Parser::Free()`
and once again via `Parser::Reinitialize()` by clearing the async_id
in `EmitDestroy()`.
Partial backport of https://github.com/nodejs/node/pull/27477 , a full
backport would require also https://github.com/nodejs/node/pull/25094
which has a dont-land-on-v10.x label on it.
Fixes: https://github.com/nodejs/node/issues/26961
Backport-PR-URL: https://github.com/nodejs/node/pull/27986
PR-URL: https://github.com/nodejs/node/pull/27477
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-07-16 17:37:59 +01:00
Sam Roberts
5ffe04753e
tls: renegotiate should take care of its own state
...
In the initial version of this test there were two zero-length writes to
force tls state to cycle. The second is not necessary, at least not now,
but the first was. The renegotiate() API should ensure that packet
exchange takes place, not its users, so move the zero-length write into
tls.
See: https://github.com/nodejs/node/pull/14239
See: https://github.com/nodejs/node/commit/b1909d3a70f9
Backport-PR-URL: https://github.com/nodejs/node/pull/27938
PR-URL: https://github.com/nodejs/node/pull/25997
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-06-07 11:31:48 +01:00
cjihrig
1fc2c5bed1
test: move known issue test to parallel
...
As of libuv 1.28.0, this bug is fixed, and the test can be
moved to parallel. This commit also updates an error code
check to work on Windows.
Backport-PR-URL: https://github.com/nodejs/node/pull/27776
PR-URL: https://github.com/nodejs/node/pull/27241
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-05-20 00:54:49 -04:00
Anna Henningsen
25d73aa187
domain: avoid circular memory references
...
Avoid circular references that the JS engine cannot see through
because it involves an `async id` ⇒ `domain` link.
Using weak references is not a great solution, because it increases
the domain module’s dependency on internals and the added calls into
C++ may affect performance, but it seems like the least bad one.
Backport-PR-URL: https://github.com/nodejs/node/pull/27749
PR-URL: https://github.com/nodejs/node/pull/25993
Fixes: https://github.com/nodejs/node/issues/23862
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-05-20 00:03:10 -04:00
Anna Henningsen
b9ea23c0ed
src: add WeakReference utility
...
Add a simple `WeakReference` utility that we can use until the
language provides something on its own.
Backport-PR-URL: https://github.com/nodejs/node/pull/27749
PR-URL: https://github.com/nodejs/node/pull/25993
Fixes: https://github.com/nodejs/node/issues/23862
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-05-20 00:02:57 -04:00
Anna Henningsen
ec02117232
test: add fs.watchFile() + worker.terminate() test
...
Refs: https://github.com/nodejs/node/pull/21093#discussion_r193563156
PR-URL: https://github.com/nodejs/node/pull/21179
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:57:14 -04:00
cjihrig
f76776b354
test: update test for libuv update
...
Starting in libuv 1.27.0, test-dgram-address.js should expect
EBADF instead of EINVAL.
Backport-PR-URL: https://github.com/nodejs/node/pull/27728
PR-URL: https://github.com/nodejs/node/pull/26707
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:57:12 -04:00
Myles Borins
7b76acb6c8
test: fix expectation in test-bootstrap-modules
...
Refs: https://github.com/nodejs/node/pull/27124
Refs: https://github.com/nodejs/node/pull/25112
PR-URL: https://github.com/nodejs/node/pull/27727
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-16 14:57:11 -04:00
Daiki Ihara
d22b9130a2
test: add test about unencrypted PKCS#8 private key for RSA
...
PR-URL: https://github.com/nodejs/node/pull/26898
Refs: https://github.com/nodejs/node/issues/24928
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-05-16 14:57:11 -04:00
Richard Lau
38d85623bd
test: use assert.rejects() and assert.throws()
...
Replace try-catch blocks in tests with `assert.rejects()` and
`assert.throws()`.
PR-URL: https://github.com/nodejs/node/pull/27207
Fixes: https://github.com/nodejs/node/issues/27198
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
2019-05-16 14:57:10 -04:00
Richard Lau
af301b2821
fs: fix infinite loop with async recursive mkdir on Windows
...
If `file` is a file then on Windows `mkdir` on `file/a` returns an
`ENOENT` error while on POSIX the equivalent returns `ENOTDIR`. On the
POSIX systems `ENOTDIR` would break out of the loop but on Windows the
`ENOENT` would strip off the `a` and attempt to make `file` as a
directory. This would return `EEXIST` but the code wasn't detecting
that the existing path was a file and attempted to make `file/a` again.
PR-URL: https://github.com/nodejs/node/pull/27207
Fixes: https://github.com/nodejs/node/issues/27198
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
2019-05-16 14:57:09 -04:00
XadillaX
aceac0581c
deps: patch to fix *.onion MX query on c-ares
...
c-ares rejects *.onion MX query but forgot to set `*bufp` to NULL. This
will occur SegmentFault when free `*bufp`.
I make this quick fix and then will make a PR for c-ares either.
Backport-PR-URL: https://github.com/nodejs/node/pull/27542
PR-URL: https://github.com/nodejs/node/pull/25840
Fixes: https://github.com/nodejs/node/issues/25839
Refs: https://github.com/c-ares/c-ares/blob/955df98/ares_create_query.c#L97-L103
Refs: https://github.com/c-ares/c-ares/blob/955df98/ares_query.c#L124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:57:09 -04:00
Artur Hayrapetyan
4733a56caf
test: move tick.js from test/async-hooks to test/common
...
Backport-PR-URL: https://github.com/nodejs/node/pull/23780
PR-URL: https://github.com/nodejs/node/pull/23551
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-16 14:57:08 -04:00
Refael Ackermann
fe21dd39c3
test: mark some known flakes
...
PR-URL: https://github.com/nodejs/node/pull/27225
Refs: https://github.com/nodejs/node/issues/26910
Refs: https://github.com/nodejs/node/issues/27219
Refs: https://github.com/nodejs/node/issues/26938
Refs: https://github.com/nodejs/node/issues/23089
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-05-16 14:57:08 -04:00
Adam Majer
3ca5f23ea7
test: fix zlib-brotli output assumptions
...
On different architectures, it's possible for the compression algorithm
to produce slightly different outputs. So, don't assume we will
always get the same compressed output on all architectures. Instead,
verify that the decompressing pre-compressed string functions
correctly.
Fixes: https://github.com/nodejs/node/issues/25568
Backport-PR-URL: https://github.com/nodejs/node/pull/27681
PR-URL: https://github.com/nodejs/node/pull/25697
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:57:04 -04:00
Anna Henningsen and Hackzzila
c670358d7e
benchmark,test: add brotli
...
Co-authored-by: Hackzzila <admin@hackzzila.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/27681
PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-05-16 14:57:03 -04:00
Anna Henningsen and Hackzzila
53e9c8508c
zlib: add brotli support
...
Refs: https://github.com/nodejs/node/pull/20458
Co-authored-by: Hackzzila <admin@hackzzila.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/27681
PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-05-16 14:57:03 -04:00
Steven R. Loomis
f91a818508
deps: backport ICU-20575 to fix err/crasher
...
- Floating patch for ICU 64.x
- includes test case
ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20575
Backport of: https://github.com/unicode-org/icu/pull/634
Fixes: https://github.com/nodejs/node/issues/27418
PR-URL: https://github.com/nodejs/node/pull/27435
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-05-16 14:56:59 -04:00
Steven R. Loomis
c7931e4438
deps: backport ICU-20558 to fix Intl crasher
...
- Floating patch for ICU 63.x and 64.x
- fixing crash in Intl when ICU data not found.
- Regression test from refack included.
Background:
- ICU-13778 (landed in ICU 63.1) fixed a bug but
added a regression.
- a recent v8 land in Node v12 (which one?) exposes
this bug to cause a crash when ICU data is not found.
ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20558
Backport of: https://github.com/unicode-org/icu/pull/632
Fixes: https://github.com/nodejs/node/issues/27379
Co-authored-by: Refael Ackermann <refack@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/27415
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2019-05-16 14:56:59 -04:00
Ujjwal Sharma
a49bd36a1a
module: revert module._compile to original state if module is patched
...
Backport-PR-URL: https://github.com/nodejs/node/pull/27124
PR-URL: https://github.com/nodejs/node/pull/21573
Fixes: https://github.com/nodejs/node/issues/17396
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-16 14:56:57 -04:00
Jeremiah Senkpiel
1afd614104
test: rewrite fs {f}utimes test file
...
Previously this test silently swallowed some errors.
Refactored to use `common.mustCall()` & `assert()`s.
Also, this adds a couple of extra error-checking cases.
PR-URL: https://github.com/nodejs/node/pull/25656
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-16 14:56:55 -04:00
Rich Trott
52d321d836
test: remove common.isOSXMojave
...
common.isOSXMojave was added because it was believed that there was a
bug in macOS Mojave that allowed unprivileged users to bind to
privileged ports. As it turns out, that was a feature not a bug. It is
likely to be in all future versions of macOS. Remove isOSXMojave and
skip appropriate tests based on isOSX.
Refs: https://news.ycombinator.com/item?id=18302380
PR-URL: https://github.com/nodejs/node/pull/25658
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
2019-05-16 14:56:51 -04:00
Jeremiah Senkpiel
16a92f66a1
child_process: truncate output when maxBuffer is exceeded
...
Preserves truncated output for `child_process.exec()` when `maxBuffer`
is exceeded.
This is particularly useful for commands which have indistinguishable
error codes for what output they produce.
PR-URL: https://github.com/nodejs/node/pull/24951
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-16 14:56:49 -04:00
Jeremiah Senkpiel
710f650032
test: add stdio checks to cp-exec-maxBuffer
...
Expands this test case to check what happens to stdout/stderr when
maxBuffer is exceeded.
Also changes how cases are checked so that assertion stacks are
tracable to their test case, aka 'make it actually debuggable'.
PR-URL: https://github.com/nodejs/node/pull/24951
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-16 14:56:48 -04:00
Anna Henningsen
46a816fa00
events: show inspected error in uncaught 'error' message
...
If there is no handler for `.emit('error', value)` and `value`
is not an `Error` object, we currently just call `.toString()`
on it.
Almost always, using `util.inspect()` provides better information
for diagnostic purposes, so prefer to use that instead.
Refs: https://github.com/nodejs/help/issues/1729
PR-URL: https://github.com/nodejs/node/pull/25621
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
2019-05-16 14:56:47 -04:00
Gireesh Punathil
fbf8e60679
test: revoke flaky designation for tests
...
A number of tests that were `flaked` recently are proved
to have failing reason identified in
https://github.com/nodejs/node/issues/25007 and resolution
identified in https://github.com/nodejs/node/pull/25061
Revoke flaky designation of all these tests as the said
PR is landed.
PR-URL: https://github.com/nodejs/node/pull/25611
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
2019-05-16 14:56:47 -04:00
Tim De Pauw
ced7f67fbb
http: make ClientRequest#setTimeout() noop at end
...
Originally discovered and resolved by @szmarczak.
PR-URL: https://github.com/nodejs/node/pull/25536
Fixes: https://github.com/nodejs/node/issues/25499
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-16 14:56:45 -04:00
yathamravali
faf1a18640
test: changed function to arrow function
...
PR-URL: https://github.com/nodejs/node/pull/25441
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-05-16 14:56:44 -04:00
Daniel Bevenius
7bae3d841b
test: use stronger curves for keygen
...
This commit updates the named curves P-192 (prime192v1), and secp192k1
to 256 bit versions.
The motivation for this is that in Red Hat Enterprise Linux (RHEL) all
ECC curves < 224 bits are removed from OpenSSL provided by the system.
I'm not sure if other distributions do this but these 256 bit curves are
availalbe in OpenSSL 1.1.0j (current version on master) and OpenSSL
1.1.1 so as far as I can tell it should be safe change to make.
PR-URL: https://github.com/nodejs/node/pull/25564
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-16 14:56:44 -04:00
Luigi Pinca
2319bc55ca
tls: make tls.connect() accept a timeout option
...
If specified, and only when a socket is created internally, the option
will make `socket.setTimeout()` to be called on the created socket with
the given timeout.
This is consistent with the `timeout` option of `net.connect()` and
prevents the `timeout` option of the `https.Agent` from being ignored
when a socket is created.
PR-URL: https://github.com/nodejs/node/pull/25517
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-16 14:56:42 -04:00
Gireesh Punathil
b4b4c117fd
test: relax chunk count expectations
...
In parallel/test-fs-read-stream-concurrent-reads.js the number
of data chunks used is being tested when few concurrent reads
are performed. The number of chunks can fluctuate based on the
number of concurrent reads as well as the data that was read in
one shot. Accommodate these variations in the test.
Fixes: https://github.com/nodejs/node/issues/22339
PR-URL: https://github.com/nodejs/node/pull/25415
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-16 14:56:42 -04:00
Michael Dawson
6b6c628b02
test: improve code coverage for i18n
...
Coverage report for src/node_i18n.cc shows that the
Has() method is not covered. This test adds coverage
for that method.
PR-URL: https://github.com/nodejs/node/pull/25428
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-16 14:56:41 -04:00
Daniel Bevenius
d5316e0a1b
test: use fipsMode instead of common.hasFipsCrypto
...
Currently, test-cli-node-print-help uses common.hasFipsCrypto to
determine if the test should check for the existence of FIPS related
options (--enable-fips, and --force-fips). The FIPS options are
available when node has been compiled against an OpenSSL library with
FIPS support in which case the test would verify that these options
are available. But by using crypto.fips (which uses crypto.getFips())
this would only be checked when fips has been enabled, but these
options are available regardless if FIPS is enabled or disabled.
This commit updates the test to use fipsMode from config to determine
if the FIPS options existence should be checked.
PR-URL: https://github.com/nodejs/node/pull/25510
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:56:40 -04:00
Brian White
3fcc44d46d
test: fix test-repl timeout and tmpdir refresh
...
PR-URL: https://github.com/nodejs/node/pull/25425
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-05-16 14:56:38 -04:00
Eugene Ostroukhov
cbc428c803
inspector, test: verify reported console message
...
Many Inspector protocol clients rely on the top frame reported for the
console messages. This test makes sure correct location is reported.
PR-URL: https://github.com/nodejs/node/pull/25455
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:56:36 -04:00
ZYSzys
1b6dfac1f0
test: add test for fs.lchmod
...
PR-URL: https://github.com/nodejs/node/pull/25439
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:56:35 -04:00
Ankur Oberoi
65392be665
util: fixes type in argument type validation error
...
PR-URL: https://github.com/nodejs/node/pull/25103
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-16 14:56:35 -04:00
Sam Roberts
0a80e61e0f
test: rework ephemeralkeyinfo to run in parallel
...
Remove:
- use of tls global so tests can run in parallel
- test counting in favour of common.mustCall()
- limit of only one cipher suite per ephemeral key type tested
The last change will allow adding TLS 1.3 cipher suites and testing
'ECDH' key info with them.
PR-URL: https://github.com/nodejs/node/pull/25409
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-05-16 14:56:34 -04:00
Sam Roberts
266a07d09d
test: check for tls renegotiation errors
...
Check that the return value and callback error for tls.renegotiate()
does not indicate a failure. Also, remove unnecessary line wrapping and
indentation.
PR-URL: https://github.com/nodejs/node/pull/25437
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-16 14:56:34 -04:00
Anto Aravinth
ba6829d1b8
http2: add test case for goaway
...
PR-URL: https://github.com/nodejs/node/pull/24054
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-16 14:56:34 -04:00