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
cjihrig
e6d1eb3f77
tools: lint for use of internalBinding()
...
Use of process.binding() has largely been replaced by
internalBinding(). This commit updates the custom crypto
check ESLint rule to check for both process.binding() and
internalBinding().
Refs: https://github.com/nodejs/node/pull/24952
PR-URL: https://github.com/nodejs/node/pull/25395
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-05-16 14:56:32 -04:00
Tobias Nießen
9833bffaca
test: improve test coverage of native crypto code
...
PR-URL: https://github.com/nodejs/node/pull/25400
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-16 14:56:31 -04:00
cjihrig
21500a81fc
tools: update crypo check rule
...
This commit updates the custom crypto-check ESLint rule to
detect require() calls that come before any hasCrypto
checks.
PR-URL: https://github.com/nodejs/node/pull/25399
Refs: https://github.com/nodejs/node/pull/25388
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-05-16 14:56:30 -04:00
Kevin Smith
3f51a60092
url: return backslashes from fileURLToPath on win
...
PR-URL: https://github.com/nodejs/node/pull/25349
Fixes: https://github.com/nodejs/node/issues/25265
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2019-05-16 14:56:30 -04:00
Daniel Bevenius
c8153ce411
test: move require('https') to after crypto check
...
Currently, test-https-client-override-global-agent.js fails with the
following error when configured --without-ssl:
Error [ERR_NO_CRYPTO]:
Node.js is not compiled with OpenSSL crypto support
at Object.assertCrypto (internal/util.js:101:11)
...
at Object.<anonymous>
(/node/test/parallel/test-https-client-override-global-agent.js:5:15)
This commit moves the require statement to after the crypto check.
PR-URL: https://github.com/nodejs/node/pull/25388
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:56:29 -04:00
ZYSzys
c103e98ad6
test: more tests for internal/util/types
...
PR-URL: https://github.com/nodejs/node/pull/25225
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-05-16 14:56:24 -04:00
ZYSzys
26165ac1b6
test: remove redundant fchmod test
...
PR-URL: https://github.com/nodejs/node/pull/25282
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-05-16 14:56:23 -04:00
Roy Sommer
73230cc2c8
lib: support overriding http\s.globalAgent
...
Overriding `require('http[s]').globalAgent` is now respected by
consequent requests.
In order to achieve that, the following changes were made:
1. Implmentation in `http`: `module.exports.globalAgent` is now defined
through `Object.defineProperty`. Its getter and setter return \ set
`require('_http_agent').globalAgent`.
2. Implementation in `https`: the https `globalAgent` is not the same
as `_http_agent`, and is defined in `https` module itself. Therefore,
the fix here was to simply use `module.exports.globalAgent` to support
mutation.
3. According tests were added for both `http` and `https`, where in
both we create a server, set the default agent to a newly created
instance and make a request to that server. We then assert that the
given instance was actually used by inspecting its sockets property.
Fixes: https://github.com/nodejs/node/issues/23281
PR-URL: https://github.com/nodejs/node/pull/25170
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:56:22 -04:00
Furqan Shaikh
374a07d4a7
test: http2 origin length ERR_HTTP2_ORIGIN_LENGTH
...
PR-URL: https://github.com/nodejs/node/pull/25296
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-05-16 14:56:20 -04:00
Rich Trott
81cf2b450d
lib,test: remove lib/internal/test/unicode.js
...
Remove lib/internal/test/unicode.js and associated test. When we added
the file and test, only comments in lib had non-ASCII characters. Now,
lib/internal/cli_table.js has non-ASCII characters. Tests that exercise
the `console.table()` therefore fulfill the need to test non-ASCII
characters in built-in modules.
PR-URL: https://github.com/nodejs/node/pull/25298
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:56:18 -04:00
Joyee Cheung
d9aa19f98e
test: make sure tmpdir is created before using it
...
Otherwise it throws ENOENT when the folder happens to be cleaned
PR-URL: https://github.com/nodejs/node/pull/25224
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-16 14:56:17 -04:00
Ruben Bridgewater
b061a08cab
repl: indicate if errors are thrown or not
...
Currently an error is printed identical, no matter if it is just
inspected or if the error is thrown inside of the REPL. This makes
sure we are able to distinguish these cases.
PR-URL: https://github.com/nodejs/node/pull/25253
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-16 14:56:17 -04:00