0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

6880 Commits

Author SHA1 Message Date
zhangzifa
83b8474e64
test: update test-timers-block-eventloop.js
When CPU is busy, the above sequential case fails occasionally,
expand the timeout value to fix it.

PR-URL: https://github.com/nodejs/node/pull/16314
Fixes: https://github.com/nodejs/node/issues/16310
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-10-29 12:46:19 -04:00
Ali Ijaz Sheikh
5886e204f0 inspector: track async stacks when necessary
With this change, we do async stack tracking only when explicitly
requested by the inspector client. This avoids unnecessary overhead
for clients that might not be interested in async stack traces.

PR-URL: https://github.com/nodejs/node/pull/16308
Fixes: https://github.com/nodejs/node/issues/16180
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-10-29 09:38:37 -07:00
Ben Halverson
88fb359c57 stream: migrate _stream_readable use error codes
PR-URL: https://github.com/nodejs/node/pull/15042
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-29 12:29:29 +01:00
Matthew Cantelon
201ecef767
test: include actual value in assertion message
PR-URL: https://github.com/nodejs/node/pull/15935
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-29 09:34:26 +01:00
Casie Lynch
a70ef362ef test: replace fixturesDir in test-tls-connect
Replace common.fixturesDir with fixtures module in test-tls-connect.

PR-URL: https://github.com/nodejs/node/pull/15849
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-28 19:08:56 -07:00
Iryna Yaremtso
1906df1b29 test: use fixtures module
Replace usage of common.fixturesDir with fixtures module in
test-https-agent-disable-session-reuse.js.

PR-URL: https://github.com/nodejs/node/pull/15901
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-28 19:05:31 -07:00
Vladimir Ilic
51637574da test: add details in assertions in test-vm-context
PR-URL: https://github.com/nodejs/node/pull/16116
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-28 19:00:47 -07:00
Nigel Kibodeaux
4ed152ea8a
test: increase fs.exists coverage
PR-URL: https://github.com/nodejs/node/pull/15963
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-28 23:47:31 +02:00
Raphael Rheault
6ff2909ef6
test: use fixtures module in test-fs-realpath.js
PR-URL: https://github.com/nodejs/node/pull/15904
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-10-28 23:10:01 +02:00
Sarah Meyer
50fe1a8409 tools, benchmark: test util benchmark
Create a minimal test for the util benchmark files.

PR-URL: https://github.com/nodejs/node/pull/16050
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-28 13:56:44 -07:00
Scott J Beck
64aded33ef
test: use fixtures module
PR-URL: https://github.com/nodejs/node/pull/15843
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-28 22:54:26 +02:00
Hadis-Fard
eefee3e9a6 test: imporove assert messages
Improve assert messages in test-cluster-worker-disconnect.js.

PR-URL: https://github.com/nodejs/node/pull/16021
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-10-28 13:43:10 -07:00
Cheyenne Arrowsmith
65b8d2133d
test: show values instead of assertion message
PR-URL: https://github.com/nodejs/node/pull/15979
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-28 22:18:02 +02:00
nhoel
4eaf1fc0f8
test: include values in assertion messages
Specifically for the test-crypto-hash.js test file.

PR-URL: https://github.com/nodejs/node/pull/15996
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-28 20:42:34 +02:00
Rami Moshe
9788e96836
querystring: convert to using internal/errors
PR-URL: https://github.com/nodejs/node/pull/15565
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-28 14:04:53 -04:00
Guy Bedford
cadc47fe07 module: fix extension lookups for top-level main
The reason is that absolute URLs do not go through extension and index
checks. By switching to an absolute path, the resolver still applies
extensions properly to the top-level main.

PR-URL: https://github.com/nodejs/node/pull/16526
Fixes: https://github.com/nodejs/node/issues/16476
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-10-28 13:25:40 +02:00
guybedford
d853758a22 module: fix hook module CJS dependency loading
It can be useful to load dependencies as part of the loader hook
definition file. This fixes a bug where `import x from 'x'` would
always return `x` as `undefined` if the import was made in a loader
hooks definition module.

A parallel change to the CJS loading injection process meant that the
CJS module wasn't being injected into the correct loader instance,
which is corrected here with a test.

PR-URL: https://github.com/nodejs/node/pull/16381
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-10-28 13:22:55 +02:00
Rich Trott
98eab4a461 test: use process.features.debug in common module
Replace process.config.target_defaults.default_configuration check with
process.features.debug.

PR-URL: https://github.com/nodejs/node/pull/16537
Ref: https://github.com/nodejs/node/pull/4431#issuecomment-173663527
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-27 10:04:23 -07:00
Rich Trott
2f47b6869a test: use common.buildType in repl-domain-abort
use `common.buildType` instead of
`process.config.target_defaults.default_configuration` in
repl-domain-abort addon test.

PR-URL: https://github.com/nodejs/node/pull/16538
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-27 09:50:37 -07:00
Gibson Fahnestock
502563b277
test: skip test-process-config if no config.gypi
If you run the tests in a different machine to the one you built on,
this test will fail. Avoid this by skipping if the file doesn't exist.
We shouldn't need to check that the file exists in this test, as the
build won't pass without a config.gypi anyway.

Also adds console.logs, so you can see what the actual difference
between the objects was, as `assert.deepStrictEqual()` only shows you
the first three lines.

PR-URL: https://github.com/nodejs/node/pull/16436
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-27 16:16:30 +01:00
James M Snell
ee76f3153b crypto: migrate setFipsCrypto to internal/errors
With the exception of ThrowCryptoError, use internal/errors
to report fips unavailable or forced

PR-URL: https://github.com/nodejs/node/pull/16428
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-10-27 08:13:01 -07:00
Mark Walker
c66e5551df test: use fixtures module in tls-handshake-error
PR-URL: https://github.com/nodejs/node/pull/15939
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-27 06:57:03 -07:00
Michaël Zasso
363091dea5 test: add failing vm tests to known_issues
Currently, `Reflect.ownKeys(this)`, `Object.getOwnPropertyNames(this)`
and `Object.getOwnPropertySymbols(this)` when run in a sandbox, fails
to retrieve Symbol and non-enumerable values.

PR-URL: https://github.com/nodejs/node/pull/16410
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-27 10:27:14 +02:00
Franziska Hinkelmann
5856c836ea src: fix vm module for strict mode
This patch fixes the problem with variables that
are declared only on the sandbox but not on the
global proxy.

PR-URL: https://github.com/nodejs/node/pull/16487
Fixes: https://github.com/nodejs/node/issues/12300
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-10-27 10:12:02 +02:00
Refael Ackermann
2be9198097
test: change tmp directories prefix
`.tmp` prefix allows easier exclusion

PR-URL: https://github.com/nodejs/node/pull/16372
Refs: https://github.com/nodejs/node/pull/16010
Refs: https://github.com/nodejs/node/issues/16278
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-26 18:38:34 -04:00
Jinwoo Lee
b61a08ca2d http2: fix mapToHeaders() with single string value
This is for issue 16452. When 'set-cookie' header is set with an array
that has only one string value, it's split into its individual
characters.

Fix by resetting `isArray` to false when the value is converted from an
array to a string.

Fixes: https://github.com/nodejs/node/issues/16452
PR-URL: https://github.com/nodejs/node/pull/16458
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-10-26 17:32:27 +02:00
James M Snell
0a03e350fb crypto: migrate crypto.randomBytes to internal/errors
PR-URL: https://github.com/nodejs/node/pull/16454
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-26 08:09:00 -07:00
James M Snell
76b8803630 tools: add eslint rule for documented errors
PR-URL: https://github.com/nodejs/node/pull/16450
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2017-10-26 07:58:29 -07:00
James M Snell
eeada6ca63 crypto: migrate timingSafeEqual to internal/errors
PR-URL: https://github.com/nodejs/node/pull/16448
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-26 07:47:16 -07:00
Ashish Kaila
9702ac5088
test: add test for WrapStream readStop
PR-URL: https://github.com/nodejs/node/pull/16356
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-10-26 06:07:46 -04:00
Michaël Zasso
a37a0ad5f6 test: add test for prop interceptors on sandbox
PR-URL: https://github.com/nodejs/node/pull/16409
Refs: https://github.com/nodejs/node/pull/16293
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-26 10:23:07 +02:00
Daniel Bevenius
d653f03c0e test: allow tests to pass without internet
Currently when running the test without an internet connection there are
two JavaScript test failures and one cctest. The cctest only fails on
Mac as far as I know. (I've only tested using Mac and Linux thus far).

This commit moves the two JavaScript tests to test/internet.

The details for test_inspector_socket_server.cc:

[ RUN      ] InspectorSocketServerTest.FailsToBindToNodejsHost
make[1]: *** [cctest] Segmentation fault: 11
make: *** [test] Error 2

lldb output:

[ RUN      ] InspectorSocketServerTest.FailsToBindToNodejsHost
Process 63058 stopped
* thread #1: tid = 0x7b175, 0x00007fff96d04384
* libsystem_info.dylib`_gai_simple + 87, queue =
* 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1,
* address=0x0)
    frame #0: 0x00007fff96d04384 libsystem_info.dylib`_gai_simple + 87
libsystem_info.dylib`_gai_simple:
->  0x7fff96d04384 <+87>: movw   (%rdx), %ax
    0x7fff96d04387 <+90>: movw   %ax, -0x2a(%rbp)
    0x7fff96d0438b <+94>: movq   %r13, -0x38(%rbp)
    0x7fff96d0438f <+98>: movq   0x18(%rbp), %rcx

(lldb) bt
* thread #1: tid = 0x7b175, 0x00007fff96d04384
* libsystem_info.dylib`_gai_simple + 87, queue =
* 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1,
* address=0x0)
  * frame #0: 0x00007fff96d04384 libsystem_info.dylib`_gai_simple + 87
    frame #1: 0x00007fff96cfe98b libsystem_info.dylib`search_addrinfo +
179
    frame #2: 0x00007fff96cfafef libsystem_info.dylib`si_addrinfo + 2255
    frame #3: 0x00007fff96cfa67b libsystem_info.dylib`getaddrinfo + 179
    frame #4: 0x00000001017d8888
cctest`uv__getaddrinfo_work(w=0x00007fff5fbfe210) + 72 at
getaddrinfo.c:102
    frame #5: 0x00000001017d880e
cctest`uv_getaddrinfo(loop=0x000000010287cb80, req=0x00007fff5fbfe1c8,
cb=0x0000000000000000, hostname="nodejs.org", service="0",
hints=0x00007fff5fbfe268) + 734 at getaddrinfo.c:192
    frame #6: 0x000000010171f781
cctest`node::inspector::InspectorSocketServer::Start(this=0x00007fff5fbfe658)
+ 801 at inspector_socket_server.cc:398
    frame #7: 0x00000001016ed590
cctest`InspectorSocketServerTest_FailsToBindToNodejsHost_Test::TestBody(this=0x0000000105001fd0)
+ 288 at test_inspector_socket_server.cc:593

I'm not sure about the exact cause for this but when using a standalone
c program to simulate this it seems like when the ai_flags
`AI_NUMERICSERV` is set, which is done in inspector_socket_server.cc
line 394, the servname (the port in the FailsToBindToNodejsHost test) is
expected to be a numeric port string to avoid looking it up in
/etc/services. When the port is 0 as is it was before this commit the
segment fault occurs but not if it is non-zero.

PR-URL: https://github.com/nodejs/node/pull/16255
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-26 07:57:43 +02:00
Rich Trott
36732084db util,assert: expose util.isDeepStrictEqual()
Provide `util.isDeepStrictEqual()` that works like
`assert.deepStrictEqual()` but returns a boolean rather than throwing an
error.

Several userland modules have needed this functionality and implemented
it independently. This functionality already exists in Node.js core, so
this exposes it for use by modules. Modules that have needed this
functionality include `lodash`, `concordance` (used by `ava`), and
`qunit`.

PR-URL: https://github.com/nodejs/node/pull/16084
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-25 22:30:37 -07:00
Anatoli Papirovski
cecbb595d5
net: fix timeout with null handle
This commit handles the case where _onTimeout is called with a
null handle.

Refs: https://github.com/nodejs/node/pull/15791
Fixes: https://github.com/nodejs/node/issues/16484
PR-URL: https://github.com/nodejs/node/pull/16489
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-10-25 14:48:30 -04:00
Daniel Bevenius
8a00f1d129 test: call toLowerCase on the resolved module
The commit updates test-require-resolve.js to call toLowerCase on the
resolved module instead of the path. Currently this test will fail if
the path to where node exists contains uppercase letters. For example:

```
$ out/Release/node
test/parallel/test-require-resolve.js
/root/rpmbuild/BUILD/node-v8.8.0/test/parallel
module.js:515
    throw err;
    ^

Error: Cannot find module
'/root/rpmbuild/build/node-v8.8.0/test/fixtures/nested-index/one'
    at Function.Module._resolveFilename (module.js:513:15)
    at Function.resolve (internal/module.js:18:19)
    at Object.<anonymous>
(/root/rpmbuild/BUILD/node-v8.8.0/test/parallel/test-require-resolve.js:37:11)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
    at startup (bootstrap_node.js:187:16)
```

PR-URL: https://github.com/nodejs/node/pull/16486
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>>
Reviewed-By: Anna Henningsen <anna@addaleax.net>>
Reviewed-By: James M Snell <jasnell@gmail.com>>
2017-10-25 10:45:36 -07:00
Bryan English
8172f4547e buffer: move setupBufferJS to internal
Stashing it away in internal/buffer so that it can't be used in
userland, but can still be used in internals.

PR-URL: https://github.com/nodejs/node/pull/16391
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-25 10:36:17 -07:00
Anatoli Papirovski
73533a1932
http2: do not allow socket manipulation
Because of the specific serialization and processing requirements
of HTTP/2, sockets should not be directly manipulated. This
forbids any interactions with destroy, emit, end, pause, read,
resume and write methods of the socket. It also redirects
setTimeout to session instead of socket.

PR-URL: https://github.com/nodejs/node/pull/16330
Fixes: https://github.com/nodejs/node/issues/16252
Refs: https://github.com/nodejs/node/pull/16211
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-25 12:50:44 -04:00
Franziska Hinkelmann
ed116dc3c6 test: fix test for inherited properties on vm
The known issue is fixed with
https://github.com/nodejs/node/pull/16293.

The text needs to call `Object.hasOwnProperty(this)`
instead of `this.hasOwnProperty()`, otherwise `this` is
from the wrong context is used.

Add a second test case taken verbatim from issue
https://github.com/nodejs/node/issues/5350

PR-URL: https://github.com/nodejs/node/pull/16411
Fixes: https://github.com/nodejs/node/issues/5350
Ref: https://github.com/nodejs/node/pull/16293
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-25 17:23:40 +02:00
cjihrig
9c6f6b0633
module: support custom paths to require.resolve()
This commit allows custom lookup paths to be passed to
require.resolve(). It also adds require.resolve.paths()
which retrieves the default resolution paths.

Fixes: https://github.com/nodejs/node/issues/5963
Fixes: https://github.com/nodejs/node/issues/16389
PR-URL: https://github.com/nodejs/node/pull/16397
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-25 09:14:14 -04:00
Daniel Bevenius
50d727587e test: allow for different nsswitch.conf settings
The motivation for this commit is that these two test fail on systems
that have different Name Service Switch configuration settings. A
concrete example of this is when using Red Hat Enterprise Linux (RHEL)
7.

If Name Service Switch is available on the operating system then it
might be configured differently (/etc/nsswitch.conf).
If the system is configured with no dns the error code will be
AI_AGAIN, but if there are more services after the dns entry, for
example some linux distributions skip a myhostname service by default
which would still produce the ENOTFOUND error.

This commit suggests checking for either ENOTFOUND or EAI_AGAIN to
accommodate systems like the ones described above. The references below
indicate that others have run, or are running, into this aswell.

Refs: https://github.com/nodejs/node/issues/12075
Refs: https://github.com/nodejs/help/issues/687
Refs: https://github.com/nodejs/node/issues/15825
PR-URL: https://github.com/nodejs/node/pull/16378
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-10-25 11:12:06 +02:00
Anna Henningsen
70670b056a test: make test-v8-serdes work without stdin
If `stdin` was closed or referred to a file, this didn't work,
because it was accessed via file descriptor.

Instead, use another generic native object.

cherry-picked from https://github.com/ayojs/ayo/pull/63

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-25 07:15:44 +02:00
cjihrig
c5e3353953
test: add missing assertion
This commit adds an assertion to an existing try...catch
statement. Unfortunately, assert.throws() cannot be used
because the operation succeeds on some platforms, throws
EINVAL on some platforms, and throws ENOPROTOOPT on
others.

PR-URL: https://github.com/nodejs/node/pull/15519
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-24 20:29:25 -04:00
James M Snell
7f9eb4c29c util: graduate TextEncoder/TextDecoder, tests
Add tests ported from Web Platform Tests.

Graduate TextEncoder / TextDecoder from experimental

PR-URL: https://github.com/nodejs/node/pull/15743
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-10-23 21:12:56 -07:00
James M Snell
b8bc652869 crypto: migrate crypto sign to internal/errors
Improve argument type checking and move into js, use internal/errors

PR-URL: https://github.com/nodejs/node/pull/15757
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-23 20:54:39 -07:00
James M Snell
7124b466d9 crypto: refactor argument validation for pbkdf2
Move input argument validation to js, using internal/errors.

Also update docs

* `password` and `salt` may be Buffers or any TypedArrays
* `crypto.DEFAULT_ENCODING` changes the returned derivedKey type

PR-URL: https://github.com/nodejs/node/pull/15746
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-23 15:52:11 -07:00
James M Snell
f16b9c189a http2: multiple style and performance updates
* move CHECK statements into DEBUG checks
* improve performance by removing branches
  * Several if checks were left in while the code was being developed.
    Now that the core API has stablized more, the checks are largely
    unnecessary and can be removed, yielding a significant boost in
    performance.
* refactor flow control for proper backpressure
* use std::queue for inbound headers
* use std::queue for outbound data
* remove now unnecessary FreeHeaders function
* expand comments and miscellaneous edits
* add a couple of misbehaving flow control tests

PR-URL: https://github.com/nodejs/node/pull/16239
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-10-23 11:57:13 -07:00
Anatoli Papirovski
c30f107103
http2: allow port 80 in http2.connect
Due to how WHATWG-URL parser works, port numbers are omitted if
they are the default port for a scheme. This meant that
http2.connect could not accept connections on port 80 with http
scheme. Fix this bug by detecting http: scheme and setting port
to 80.

PR-URL: https://github.com/nodejs/node/pull/16337
Fixes: https://github.com/nodejs/node/issues/14304
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-10-23 12:19:59 -04:00
Luigi Pinca
eb2fbd159f
http: do not blindly destroy UNIX domain sockets
`Connection: keep-alive` is now properly supported when making client
connections to UNIX domain sockets so `request.abort()` should not
blindly destroy the underlying socket.

PR-URL: https://github.com/nodejs/node/pull/15650
Refs: https://github.com/nodejs/node/pull/13214#issuecomment-304049523
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-10-23 12:13:03 -04:00
Josh Gavant
88e55fe5e0
vm: deprecate vm.runInDebugContext
PR-URL: https://github.com/nodejs/node/pull/12815
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-10-23 17:17:16 +02:00
Anna Henningsen
3e25e4d00f
http: support generic Duplex streams
Support generic `Duplex` streams through more duck typing
on the server and client sides.

Since HTTP is, as a protocol, independent of its underlying transport
layer, Node.js should not enforce any restrictions on what streams
its HTTP parser may use.

Ref: https://github.com/nodejs/node/issues/16256
PR-URL: https://github.com/nodejs/node/pull/16267
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-10-23 17:11:57 +02:00
Anna Henningsen
ab16eec436
http2: support generic Duplex streams
Support generic `Duplex` streams through using `StreamWrap`
on the server and client sides, and adding a `createConnection`
method option similar to what the HTTP/1 API provides.

Since HTTP2 is, as a protocol, independent of its underlying transport
layer, Node.js should not enforce any restrictions on what streams
its internals may use.

Ref: https://github.com/nodejs/node/issues/16256
PR-URL: https://github.com/nodejs/node/pull/16269
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-23 16:50:44 +02:00
Anna Henningsen
e340a66cb1
test: add makeDuplexPair() helper
Add a utility for adding simple, streams-API based duplex pairs.

PR-URL: https://github.com/nodejs/node/pull/16269
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-23 16:50:43 +02:00
Anna Henningsen
170bc31669
src: turn JS stream into a full duplex
Remove unused methods for reading data from `JSStream` and add
those required for emitting data or an EOF event to the JS side,
in essentially the same way that `LibuvStreamWrap` does it.

PR-URL: https://github.com/nodejs/node/pull/16269
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-23 16:50:42 +02:00
Weijia Wang
e79a61cf80 buffer: buffer.transcode to use internal/errors
`buffer.transcode` is still using raw TypeError. This change is to
convert it to use internal/errors.

Ref: https://github.com/nodejs/node/issues/11273
PR-URL: https://github.com/nodejs/node/pull/16352
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-23 19:17:44 +05:30
Franziska Hinkelmann
f1d6b04ac9 src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
https://github.com/nodejs/node/issues/10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
https://github.com/nodejs/node/pull/13265

This PR requires a backport of
37a3a15c3e

PR-URL: https://github.com/nodejs/node/pull/16293
Fixes: https://github.com/nodejs/node/issues/2734
Fixes: https://github.com/nodejs/node/issues/10223
Fixes: https://github.com/nodejs/node/issues/11803
Fixes: https://github.com/nodejs/node/issues/11902
Ref: https://github.com/nodejs/node/issues/6283
Ref: https://github.com/nodejs/node/pull/15114
Ref: https://github.com/nodejs/node/pull/13265
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-10-23 14:35:09 +02:00
Michaël Zasso
556ebab30e child_process: restore exec{File}Sync error props
In PR [1], a bunch of properties were removed from the error thrown by
execSync and execFileSync. It turns out that some of those were still
supposed to be there, as the documentation states that the error
contains the entire result from the spawnSync call.

[1] https://github.com/nodejs/node/pull/13601

PR-URL: https://github.com/nodejs/node/pull/16060
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-23 14:09:11 +02:00
Jeremiah Senkpiel
839faae45a timers: cleanup extraneous property on Immediates
This was originally changed in 6f75b6672c
but it appears unnecessary and benhcmark results show little difference
without the extra property.

Refs: https://github.com/nodejs/node/pull/6436
PR-URL: https://github.com/nodejs/node/pull/16355
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-10-23 11:02:53 +02:00
Bryan English
27e12e7524 tty,doc: add type-check to isatty
Previously, various inputs other than non-negative integers would
produce incorrect results.

Added type-checking on input, returning false for anything other than
non-negative integers.

Also clarified in docs.

PR-URL: https://github.com/nodejs/node/pull/15567
Reviewed-By: Luigi Pinca <luigipinca@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: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-10-22 16:51:10 -07:00
Gibson Fahnestock
b5569dbe8d
test: handle blank shells in test-os.js
The shell in /etc/passwd can be blank, in which case the user is given
the default shell. Handle this by only checking the shell contains a
path separator if the string isn't empty.

PR-URL: https://github.com/nodejs/node/pull/16287
Fixes: https://github.com/nodejs/node/issues/15684
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-10-22 22:58:37 +01:00
Rich Trott
53f4ac2774 test: increase enoughTestMem to 1.75 Gb
PR-URL: https://github.com/nodejs/node/pull/16374
Fixes: https://github.com/nodejs/node/issues/16354
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-22 10:07:13 -07:00
Ashish Kaila
fe8297ca92
util: expand test coverage for util.deprecate
Test for invalid argument types passed to code on util.deprecate.

PR-URL: https://github.com/nodejs/node/pull/16305
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-22 11:31:21 -04:00
Nicolas 'Pixel' Noble
cfea677a5e test: use fixtures.readKey in https-timeout-server
Replace `common.fixturesDir` usage in test-https-timeout-server.js with
`fixtures.readKey()`.

PR-URL: https://github.com/nodejs/node/pull/15871
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-22 20:47:59 +05:30
Ben Smith
438e7fdaf2
test: remove --harmony-sharedarraybuffer usage
This flag has been enabled by default since v8
7662e0634c3a057fa5d746912ee5af76e285c274.

PR-URL: https://github.com/nodejs/node/pull/16343
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-10-22 14:09:46 +02:00
Jayson D. Henkel
e07e708102 test: improve message for assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/16013
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-22 11:42:33 +05:30
Rich Trott
8e268c70dd test: fix common.PIPE path bug
`common.PIPE` is returning a path name in `test` rather than in the
`tmp` directory for each test. This is causing multiple test failures in
CI. Make the path name inside the temporary directories again. This way
the pipe is removed by `common.refreshTmpDir()` on POSIX.

The bug in `common.PIPE` was introduced in
c34ae48083.

PR-URL: https://github.com/nodejs/node/pull/16364
Fixes: https://github.com/nodejs/node/issues/16290
Fixes: https://github.com/nodejs/node/issues/16323
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-10-21 12:04:59 -07:00
Guy Bedford
fe4675b301 module: fix main resolution and not found updates
This simplifies the top-level load when ES modules are enabled
as we can entirely delegate the module resolver, which will hand
over to CommonJS where appropriate.

All not found errors are made consistent to throw during resolve
and have the MODULE_NOT_FOUND code.

Includes the test case from https://github.com/nodejs/node/pull/15736.

Fixes: https://github.com/nodejs/node/issues/15732
PR-URL: https://github.com/nodejs/node/pull/16147
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-21 10:45:40 -07:00
Paul Marion Camantigue
c4c6381282 test: use fixtures.readKey instead of fixturesDir
PR-URL: https://github.com/nodejs/node/pull/15976
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-21 21:59:52 +08:00
Anatoli Papirovski
a627c5fc13
net: fix timeouts during long writes
Add updateWriteQueueSize which updates and returns queue size
(net & tls). Make _onTimeout check whether an active write
is ongoing and if so, call _unrefTimer rather than emitting
a timeout event.

Add http & https test that checks whether long-lasting (but
active) writes timeout or can finish writing as expected.

PR-URL: https://github.com/nodejs/node/pull/15791
Fixes: https://github.com/nodejs/node/issues/15082
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2017-10-21 09:49:02 -04:00
Anatoli Papirovski
aaf2a1c226
tls: properly track writeQueueSize during writes
Make writeQueueSize represent the actual size of the write queue
within the TLS socket. Add tls test to confirm that bufferSize
works as expected.

PR-URL: https://github.com/nodejs/node/pull/15791
Fixes: https://github.com/nodejs/node/issues/15005
Refs: https://github.com/nodejs/node/pull/15006
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2017-10-21 09:48:36 -04:00
tpurcell
023b95bf4a test: replace fixturesDir with fixtures module
PR-URL: https://github.com/nodejs/node/pull/16262
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-20 11:37:42 +02:00
Lance Ball
7a29f44071
repl: deprecate REPLServer.prototype.memory
This method is only useful for the internal mechanics of the REPLServer
and does not need to be exposed in user space. It was previously not
documented, so I believe a Runtime deprecation makes sense.

PR-URL: https://github.com/nodejs/node/pull/16242
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-10-19 14:58:26 -04:00
André Føyn Berge
76abf0fae0 test: replace fixturesDir with fixtures module
PR-URL: https://github.com/nodejs/node/pull/15947
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-20 02:50:32 +08:00
Anatoli Papirovski
3c0ebf5aca
tools: enable additional eslint rules
Enable additional rules that node either already adheres to
or it makes sense to do so going forward: for-direction,
accessor-pairs, no-lonely-if and symbol-description.

Fix all instances of no-lonely-if in lib & test and disable
accessor-pairs in test-util-inspect.

PR-URL: https://github.com/nodejs/node/pull/16243
Refs: https://eslint.org/docs/rules/for-direction
Refs: https://eslint.org/docs/rules/accessor-pairs
Refs: https://eslint.org/docs/rules/no-lonely-if
Refs: https://eslint.org/docs/rules/symbol-description
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-19 13:54:14 -04:00
mog422
f2f391e575
http: send 400 bad request on parse error
A web server such as nginx assumes that upstream is dead
if upstream closes the socket without any response.

PR-URL: https://github.com/nodejs/node/pull/15324
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-19 18:15:58 +02:00
Rich Trott
c9d5be4af0 test: fix flaky test-make-doc
`test-make-doc` fails in CI on Raspberry Pi devices where `test-ci-js`
runs the test but does not build the docs. We do not want to build the
docs in these cases. Move the test to the `doctool` suite and add that
suite to `IGNORED_SUITES` in `test.py`. Specify `doctool` as a test
suite to run with `make test` or `make test-ci` but not with the
`make test-ci-js` job run on cross-compiled fanned CI tests like we do
with Raspberry Pi devices in CI.

PR-URL: https://github.com/nodejs/node/pull/16301
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-19 09:07:51 -07:00
Anna Henningsen
33b4320cf9
lib: refactor wrap_js_stream for ES6/readability
PR-URL: https://github.com/nodejs/node/pull/16158
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-10-19 18:06:27 +02:00
elisa lee
ca12ae6015
test: replace fixturesDir with fixtures module
PR-URL: https://github.com/nodejs/node/pull/16095
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 18:01:02 +02:00
jBarz
31cde1c511 test: skip test due to file size limit
The test requires a file size limit that is greater than the string
size limit. Some aix machines might not meet this criteria so in
which case we should skip the test.

PR-URL: https://github.com/nodejs/node/pull/16273
Fixes: https://github.com/nodejs/node/issues/16319
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: MichaëZasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-19 09:55:55 -04:00
Trivikram Kamat
1fd662c0e3
http2: simplify te header validation, add test
This simplifies validation of te header and adds a test case
in which array with two values is passed to param value in
isIllegalConnectionSpecificHeader

PR-URL: https://github.com/nodejs/node/pull/16246
Refs: https://github.com/nodejs/node/issues/14985
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-10-19 07:53:09 -04:00
Andreas Madsen
7c079d1261
async_hooks: skip runtime checks when disabled
PR-URL: https://github.com/nodejs/node/pull/15454
Ref: https://github.com/nodejs/node/pull/14387
Ref: https://github.com/nodejs/node/pull/14722
Ref: https://github.com/nodejs/node/issues/14717
Ref: https://github.com/nodejs/node/issues/15448
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-10-19 12:45:21 +02:00
Daniel Abrão
708084aea1
test: remove error msg in test-vm-symbols.js
PR-URL: https://github.com/nodejs/node/pull/15873
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 02:47:45 -02:00
Anna Henningsen
5cde451ffd
fs: account for buffer alloc failure in readFile
PR-URL: https://github.com/nodejs/node/pull/16219
Refs: https://github.com/nodejs/node/pull/15362
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 02:39:07 -02:00
Braden Whitten
e021de3469
test: remove error messages in test-buffer-alloc
PR-URL: https://github.com/nodejs/node/pull/15867
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 02:26:03 -02:00
Omar Gonzalez
cf02981139
test: update assert error messages
PR-URL: https://github.com/nodejs/node/pull/16035
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-19 02:26:02 -02:00
Braden Whitten
ba999e1b9e
test: more AsyncWrap constructor validation tests
Fixes a line of uncovered code in the AsyncWrap class's constructor.
Specifically this covers validtion of the 'promiseResolve' argument.

PR-URL: https://github.com/nodejs/node/pull/16025
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-10-19 02:26:02 -02:00
Jack Wang
dc086834b1
test: remove error message
PR-URL: https://github.com/nodejs/node/pull/15983
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-19 02:26:01 -02:00
Stefania Sharp
b07aa9264e
test: expand error message
PR-URL: https://github.com/nodejs/node/pull/15991
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-19 02:25:38 -02:00
Kanika Shah
932499ec10
test: use fixtures module
PR-URL: https://github.com/nodejs/node/pull/15959
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-19 01:52:49 -02:00
Oscar Funes
53f08841f8
test: remove literal messages
PR-URL: https://github.com/nodejs/node/pull/15938
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:49 -02:00
Oscar Funes
bd74fb4cee
test: fix stderr reference
PR-URL: https://github.com/nodejs/node/pull/15938
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:49 -02:00
Oscar Funes
f720b82e39
test: fix typo
PR-URL: https://github.com/nodejs/node/pull/15938
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:49 -02:00
Jean-Philippe Blais
3b90bd006f
test: improve coverage of ModuleMap.js
PR-URL: https://github.com/nodejs/node/pull/15924
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:49 -02:00
Jean-Philippe Blais
f05a2d88d6
test: replace concatenation with literals
PR-URL: https://github.com/nodejs/node/pull/15924
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:49 -02:00
Gene Wu
c35a3e004e
test: use fixtures module in test-https-truncate
PR-URL: https://github.com/nodejs/node/pull/15875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:48 -02:00
Alvaro Cruz
b0965334cf
test: use fixtures module
PR-URL: https://github.com/nodejs/node/pull/15874
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:48 -02:00
Lance Barlaan
5887d80351
test: use fixtures module
PR-URL: https://github.com/nodejs/node/pull/15872
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:48 -02:00
Thomas Karsten
8597a18cdb
test: replace fixturesDir with fixtures module
PR-URL: https://github.com/nodejs/node/pull/15840
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:48 -02:00
hwaisiu
ef96b05c74
test: use default message for assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/15970
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-19 01:52:47 -02:00
Michaël Zasso
a7487c92e2 test: fix message test after V8 upgrade
With V8 6.2 there is one line less in the promise trace.

PR-URL: https://github.com/nodejs/node/pull/15362
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-10-18 17:02:43 -07:00
Rich Trott
28dcdb9108 test: fix flaky test-benchmark-buffer
Allow zero operations for short buffer benchmark tests.

PR-URL: https://github.com/nodejs/node/pull/16296
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-18 12:00:04 -07:00
zhangzifa
e647c5d7de timers: fix eventloop block
When there are at least 2 timers set by setInterval whose callback
execution are longer than interval, the eventloop will be blocked.

This commit fix the above bug.

PR-URL: https://github.com/nodejs/node/pull/15072
Fixes: https://github.com/nodejs/node/issues/15068
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-18 11:59:11 -07:00
Michaël Zasso
70832bc353 build: add V8 embedder version string
After this commit, `process.versions.v8` will look like:
"6.0.287.53-node.0".
The goal is that everytime we apply a non-official patch to `deps/v8`,
we increment our own number instead of V8's patch level.
This number must be set back to 0 after major V8 updates.

Fixes: https://github.com/nodejs/node/issues/15698
PR-URL: https://github.com/nodejs/node/pull/15785
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-18 09:18:32 -07:00
Nikki St Onge
9960e53c54 test: improve assert message in internet test
PR-URL: https://github.com/nodejs/node/pull/15998
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-18 08:45:44 -07:00
Luigi Pinca
880415e0e6 test: refactor test-process-kill-null
Use `common.mustCall()` instead of `called` variable.

PR-URL: https://github.com/nodejs/node/pull/16236
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-18 07:56:04 -07:00
Robert Nagy
5d99a9bf65 http: emit close as the last event in the client
Emit close event after all other events in the client, e.g.
error will be emitted before close.

PR-URL: https://github.com/nodejs/node/pull/15588
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-18 15:56:19 +02:00
Joyee Cheung
df5dc2da39 test: test make doc and verify toc
PR-URL: https://github.com/nodejs/node/pull/16208
Fixes: https://github.com/nodejs/build/issues/887
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-10-18 20:24:22 +08:00
Joyee Cheung
a5262f1a3b test: add common.projectDir
Implement common.projectDir which points to the project directory.

PR-URL: https://github.com/nodejs/node/pull/16208
Fixes: https://github.com/nodejs/build/issues/887
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-10-18 20:23:51 +08:00
Anna Henningsen
b3f9b38174
n-api: check against invalid handle scope usage
Fixes: https://github.com/nodejs/node/issues/16175
PR-URL: https://github.com/nodejs/node/pull/16201
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-18 11:29:45 +02:00
Rich Trott
9be3d99b2b test: fix inspector tests
The inspector tests should not be in the parallel directory as they
likely all (or certainly almost all) use static ports, so port
collisions will happen.

This moves them all to sequential. We can move them back on a
case-by-case basis. They were run sequentially when they were in the
inspector directory which they were only moved from very recently.

PR-URL: https://github.com/nodejs/node/pull/16281
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
2017-10-17 23:10:20 -07:00
Jon Moss
978629ca12
test: move inspector tests to parallel/sequential
* remove inspector directory artifacts

PR-URL: https://github.com/nodejs/node/pull/16197
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-17 19:35:50 -04:00
Trivikram Kamat
ff747e3fe8 test: http2 priority stream depends on itself
This commit add test case where priority() throws ERR_INVALID_OPT_VALUE
when stream depends on itself

Refs: https://github.com/nodejs/node/issues/14985
PR-URL: https://github.com/nodejs/node/pull/16224
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-17 15:44:30 +02:00
Vse Mozhet Byt
c9da05d37b test: add missing spaces in concatenations
PR-URL: https://github.com/nodejs/node/pull/16244
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-17 12:41:03 +03:00
Trivikram Kamat
c3eeb28c6d test: http2 client settings errors
Refs: https://github.com/nodejs/node/issues/14985
PR-URL: https://github.com/nodejs/node/pull/16096
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-10-17 10:16:25 +02:00
Trivikram Kamat
d64e94ba5b test: http2 emitGoAway post shutdown pre destroy
This commit tests use case when emitGoAway is called when client is
shutting down but is not destroyed.

Refs: https://github.com/nodejs/node/issues/14985
PR-URL: https://github.com/nodejs/node/pull/16215
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-10-17 10:04:04 +02:00
David8472
7ab0a9a3c8 test: http2-respond-file-errors to fixtures module
Replace common.fixturesDir with fixtures in
test-http2-respond-file-errors.js.

PR-URL: https://github.com/nodejs/node/pull/16004
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-17 09:56:23 +02:00
Michael Rueppel
d60f9b775e test: http2-respond-file-range to use fixtures
Changed test-http2-respond-file-range to use fixtures.path directly
instead of passing through the common module.

PR-URL: https://github.com/nodejs/node/pull/15852
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-17 09:37:35 +02:00
cjihrig
3b7a9a2589
child_process: add windowsHide option
This commit exposes the UV_PROCESS_WINDOWS_HIDE flag in Node
as a windowsHide option to the child_process methods. The
option is only applicable to Windows, and is ignored elsewhere.

Fixes: https://github.com/nodejs/node/issues/15217
PR-URL: https://github.com/nodejs/node/pull/15380
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-16 16:19:54 -04:00
Trivikram Kamat
e2015b5347 test: http2 add timeout no callback test case
Refs: https://github.com/nodejs/node/issues/14985
PR-URL: https://github.com/nodejs/node/pull/16082
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-10-16 18:39:47 +02:00
James M Snell
4cf56ad6f2 inspector: migrate to internal/errors
PR-URL: https://github.com/nodejs/node/pull/15619
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-16 09:31:18 -07:00
hschwalm
b93285454a test: replace fixturesDir with fixtures module
PR-URL: https://github.com/nodejs/node/pull/15989
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-16 23:50:09 +08:00
Jenna Zeigen
da7d92e3f0 test: update output to include exit code & signal
PR-URL: https://github.com/nodejs/node/pull/15945
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com
2017-10-16 08:17:28 -07:00
tejbirsingh
9b3d6a0d8f
test: change common.fixturesDir to fixtures.path
Use common.fixtures module instead of common.fixturesDir based on task
at Nodejs code and learn at Node.js Interactive 2017 in Vancouver.

PR-URL: https://github.com/nodejs/node/pull/15860
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-16 09:59:03 -04:00
Anna Henningsen
1a2f579ba0
test: split up and refactor test-domain
Split up test-domain into multiple, more focused test files
and use more modern JS inside of them.

PR-URL: https://github.com/nodejs/node/pull/13614
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-16 11:24:35 +02:00
Jenna Zeigen
70896c7e3b test: fixtures in repl persistent history test
PR-URL: https://github.com/nodejs/node/pull/15999
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
2017-10-15 21:49:01 -07:00
Trivikram Kamat
0ce6be07da test: http2 ERR_INVALID_ARG_TYPE tests
PR-URL: https://github.com/nodejs/node/pull/15766
Ref: https://github.com/nodejs/node/issues/14985
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-15 21:36:37 -07:00
Kasim Doctor
006fdb2fe5 test: replace fixturesDir with common.fixtures
PR-URL: https://github.com/nodejs/node/pull/15810
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-16 10:03:14 +05:30
Michael Dawson
6bc82daef0 n-api: use module name macro
Update tests to use module name macro

PR-URL: https://github.com/nodejs/node/pull/16185
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-15 16:00:29 -07:00
James M Snell
3ddc88b5c2 crypto: migrate Certificate to internal/errors
Move argument type checking to js, use internal/errors

PR-URL: https://github.com/nodejs/node/pull/15756
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-10-15 15:34:06 -07:00
Trivikram Kamat
abbdcaa6e8 test: http2 session operations after destroy
Refs #14985

PR-URL: https://github.com/nodejs/node/pull/15758
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2017-10-15 15:24:45 -07:00
Trivikram Kamat
68df587b1e test: http2 client operations after destroy
PR-URL: https://github.com/nodejs/node/pull/16094
Ref: https://github.com/nodejs/node/issues/14985
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-10-15 15:23:13 -07:00
Lam Chan
bb9ed92f0a test: replaced fs.readSync with fixtures.readSync
NINA 2017 Code and Learn session for first time contributors.  This
touched test/parallel/test-https-socket-options.js to replace
common.fixturesDir

PR-URL: https://github.com/nodejs/node/pull/15882
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-15 15:12:45 -07:00
Trivikram Kamat
3cc725d9c6 test: http2 connectionListener reject client
This code change modifies connectionListener tests to cover test case
where this.emit('unknownProtocol', socket) returns false

PR-URL: https://github.com/nodejs/node/pull/16080
Ref: https://github.com/nodejs/node/issues/14985
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-15 15:02:04 -07:00
Evan Lucas
d43e7f3992
test: improve coverage for process.umask
This ensures that process.umask() throws with the correct error when
invalid inputs are supplied.

PR-URL: https://github.com/nodejs/node/pull/16188
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-15 16:09:44 -04:00
twk-b
018375cd4e test: remove message from notStrictEqual
PR-URL: https://github.com/nodejs/node/pull/16048
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-10-15 20:46:42 +02:00
matzavinos
7f55349079 net: convert to using internal/errors
Covert lib/net.js over to using lib/internal/errors.js

- Replace thrown errors in lib/net.js
  with errors from lib/internal/errors.
  The ERR_INVALID_OPT_VALUE error have been used
  in the Server.prototype.listen() method
- Update tests according to the above modifications

PR-URL: https://github.com/nodejs/node/pull/14782
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-15 11:48:38 +08:00
Ben Hallion
2b76b5d8dd test: use fixtures module
Replace common.fixturesDir with fixtures module usage in
test/parallel/test-tls-fast-writing.js.

PR-URL: https://github.com/nodejs/node/pull/15808
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-14 20:28:16 -07:00
Jean-Baptiste Brossard
e8a2438cb6 test: refactor test-cluster-setup-master
- use mustCall instead of counters
- include totalWorkers and settings in the error messages

PR-URL: https://github.com/nodejs/node/pull/16065
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-10-15 10:18:45 +08:00
Ruxandra Fediuc
e30876121a test: add tests for ERR_HTTP2_FRAME_ERROR
PR-URL: https://github.com/nodejs/node/pull/16107
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-10-15 09:55:52 +08:00
Randal Hanford
971aad1b13 test: use relative path in pipePrefix
Modified pipePrefix to use relative path on windows,
previously tests failed when the full path was 120+ characters

PR-URL: https://github.com/nodejs/node/pull/15988
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-15 00:47:06 +08:00
Vladimir Ilic
4826ac537f test: replace fixtureDir with fixtures methods
PR-URL: https://github.com/nodejs/node/pull/16114
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-15 00:25:01 +08:00
Kim Gentes
24d72944da test: remove error messages in crypto-binary test
PR-URL: https://github.com/nodejs/node/pull/15981
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-15 00:07:14 +08:00
JamesNimlos
4e835b334b test: use fixtures module over fixturesDir
clean up code by using fixtures helper module
instead of fixturesDir directly.

PR-URL: https://github.com/nodejs/node/pull/15847
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-15 00:04:54 +08:00
Shaun Sweet
b9ad14d69d test: use common.fixtures module
PR-URL: https://github.com/nodejs/node/pull/15992
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-15 00:01:15 +08:00
Bear Trickey
9e551ef739 test: replace fixturesDir with fixtures.path
PR-URL: https://github.com/nodejs/node/pull/15994
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-14 22:33:05 +08:00
Tyler Seabrook
bb56fbbfe5 test: update fixturesDir import
Import fixturesDir path from common/fixturesDir
module rather than from common.

PR-URL: https://github.com/nodejs/node/pull/15887
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-14 22:25:50 +08:00
Komivi Agbakpem
9aa41cb294 test: replace fixturesDir with fixtures methods
PR-URL: https://github.com/nodejs/node/pull/15967
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-14 21:53:21 +08:00
Tobias Nießen
91a465c460 test: fix regression in test-require-resolver.js
PR-URL: https://github.com/nodejs/node/pull/16192
Refs: https://github.com/nodejs/node/pull/15984
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2017-10-14 13:40:02 +02:00
WeiPlanet
1a9f48a875 test: replace fixturesDir with the fixtures module
PR-URL: https://github.com/nodejs/node/pull/16027
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-10-14 17:28:18 +08:00
Guy Bedford
d90dca6620
module: allow loading files with % in the name
PR-URL: https://github.com/nodejs/node/pull/16128
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bradley Meck <bradley.meck@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-10-14 11:21:10 +02:00
Daniel Kostro
2b0145d47c test: change crypto decipheriv assertion messages
Includes problematic key and iv values into the assertion message

PR-URL: https://github.com/nodejs/node/pull/16007
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-10-14 17:19:22 +08:00