Michael Dawson
1d968030d4
test: add coverage for napi_cancel_async_work
...
adding test coverage for napi_cancel_async_work based
on coverage report
PR-URL: https://github.com/nodejs/node/pull/12575
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-04-26 21:53:03 -04:00
Michael Dawson
4241577112
test: test doc'd napi_get_value_int32 behaviour
...
We chose to document this in the docs as there are
different possible behaviours. Adding this test to validate
that all vm implementations do it the same way.
PR-URL: https://github.com/nodejs/node/pull/12633
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-04-26 16:00:16 -04:00
Rich Trott
bda34bde56
test: remove obsolete lint comment
...
The eslint-disable comment in test-repl.js appears to have been restored
by accident while restoring other comments. Remove it.
PR-URL: https://github.com/nodejs/node/pull/12659
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-04-26 20:25:07 +02:00
Brian White
d7ba2a6035
url: always show password for URL instances
...
This matches browser behavior.
PR-URL: https://github.com/nodejs/node/pull/12420
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-04-26 09:12:30 -07:00
Michaël Zasso
c8c5a528da
test: make tests pass when built without inspector
...
PR-URL: https://github.com/nodejs/node/pull/12622
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-26 10:02:15 +02:00
Michaël Zasso
d1d9ecfe6e
test: support unreleased V8 versions
...
Change the RegExp in test-process-versions so that the test can pass
with V8 versions that have no patch number.
PR-URL: https://github.com/nodejs/node/pull/12619
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-26 09:53:08 +02:00
alohaglenn
60db588b8e
test: improve test-process-kill-pid
...
PR-URL: https://github.com/nodejs/node/pull/12588
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-04-25 21:22:25 -07:00
coreybeaumont
e8004dbdd5
test: improved type checking with regex
...
Replaced TypeError with a regular expression of the actual error.
PR-URL: https://github.com/nodejs/node/pull/12591
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-25 21:18:11 -07:00
RobotMermaid
b65d5e447b
test: cleanup test-fs-watch.js
...
Reversed "actual" and "expected" arguments for assert.strictEqual().
Replaced constructor with regular expression for assert.throws().
PR-URL: https://github.com/nodejs/node/pull/12595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-04-25 21:15:03 -07:00
Zahidul Islam
c405497086
test: add mustCall in test-timers-clearImmediate
...
PR-URL: https://github.com/nodejs/node/pull/12598
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-25 21:10:49 -07:00
Timothy Gu
d457a986a0
url: port WHATWG URL API to internal/errors
...
Also slightly revises grammar.
PR-URL: https://github.com/nodejs/node/pull/12574
Refs: https://github.com/nodejs/node/issues/11273
Refs: https://github.com/nodejs/node/issues/11299
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2017-04-25 16:33:08 -07:00
Jason Ginchereau
b7a341d7e5
n-api: Enable scope and ref APIs during exception
...
N-API is somewhat strict about blocking calls to many APIs while there
is a pending exception. The NAPI_PREAMBLE macro at the beginning of
many API implementations checks for a pending exception. However, a
subset of the APIs (which don't call back into JavaScript) still need
to work while in a pending-exception state. This changes the reference
APIs (equivalent to v8::Persistent) and handle scope APIs so that they
can be used for cleanup up while an exception is pending.
We may decide to similarly enable a few other APIs later, (which would
be a non-breaking change) but we know at least these are needed now
to unblock some specific scenarios.
Fixes: https://github.com/nodejs/abi-stable-node/issues/122
Fixes: https://github.com/nodejs/abi-stable-node/issues/228
PR-URL: https://github.com/nodejs/node/pull/12524
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
2017-04-25 22:02:56 +02:00
Vse Mozhet Byt
71abfa9548
tools: use no-useless-concat ESLint rule
...
* Add `no-useless-concat: error` to .eslintrc.yaml.
* Apply no-useless-concat rule to tests.
PR-URL: https://github.com/nodejs/node/pull/12613
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-04-25 22:28:46 +03:00
Gabriel Schulhof
ba7bac5c37
n-api: tighten null-checking and clean up last error
...
We left out null-checks for many of the parameters passed to our APIs.
In particular, arguments of type `napi_value` were often accepted
without a null-check, even though they should never be null.
Additionally, many APIs simply returned `napi_ok` on success. This
leaves in place an error that may have occurred in a previous N-API
call. Others (those which perform `NAPI_PREAMBLE(env)` at the top)
OTOH explicitly clear the last error before proceeding. With this
modification all APIs explicitly clear the last error on success.
Fixes: https://github.com/nodejs/abi-stable-node/issues/227
PR-URL: https://github.com/nodejs/node/pull/12539
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-04-25 19:29:34 +02:00
Sam Roberts
f2282bb812
src: allow CLI args in env with NODE_OPTIONS
...
Not all CLI options are supported, those that are problematic from a
security or implementation point of view are disallowed, as are ones
that are inappropriate (for example, -e, -p, --i), or that only make
sense when changed with code changes (such as options that change the
javascript syntax or add new APIs).
PR-URL: https://github.com/nodejs/node/pull/12028
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2017-04-25 09:59:54 -07:00
cjihrig
e522bcd774
src: expose V8's IsNativeError() in util bindings
...
Refs: https://github.com/nodejs/node/pull/12400
PR-URL: https://github.com/nodejs/node/pull/12546
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-25 12:25:55 -04:00
cjihrig
7a4d383c75
tools: enable no-useless-return eslint rule
...
PR-URL: https://github.com/nodejs/node/pull/12577
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-04-25 12:01:55 -04:00
Timothy Gu
b2870a4f8c
url: update WHATWG URL API to latest spec
...
- Update to spec
- Add opaque hosts
- File state did not correctly deal with lack of base URL
- Cleanup API for file and non-special URLs
- Allow % and IPv6 addresses in non-special URL hosts
- Use specific names for percent-encode sets
- Add empty host concept for file and non-special URLs
- Clarify IPv6 serializer
- Fix existing mistakes
- Add missing ':' to forbidden host code point list.
- Correct IPv4 parser empty label behavior
- Maintain type equivalence in URLContext with spec
- scheme, username, and password should always be strings
- host, port, query, and fragment may be strings or null
- Align scheme state more closely with the spec
- Make sure the `special` variable is always synced with
URL_FLAG_SPECIAL.
PR-URL: https://github.com/nodejs/node/pull/12523
Fixes: https://github.com/nodejs/node/issues/10608
Fixes: https://github.com/nodejs/node/issues/10634
Refs: https://github.com/whatwg/url/pull/185
Refs: https://github.com/whatwg/url/pull/225
Refs: https://github.com/whatwg/url/pull/224
Refs: https://github.com/whatwg/url/pull/218
Refs: https://github.com/whatwg/url/pull/243
Refs: https://github.com/whatwg/url/pull/260
Refs: https://github.com/whatwg/url/pull/268
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-04-24 16:36:03 -07:00
Rich Trott
75bfdad037
test: check that pending warning is emitted once
...
Code for the new --pending-deprecation flag contains logic to make sure
the deprecation warning is emitted only once. However, this was not
being tested. Add test coverage for this situation.
PR-URL: https://github.com/nodejs/node/pull/12527
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-24 14:14:24 -07:00
Vse Mozhet Byt
b4fea2a3d6
doc: add eslint-plugin-markdown
...
* install eslint-plugin-markdown
* add doc/.eslintrc.yaml
* add `<!-- eslint-disable rule -->` or `<!-- eslint-disable -->`
for the rest of problematic code
* .js files in doc folder added to .eslintignore
* update Makefile and vcbuild.bat
PR-URL: https://github.com/nodejs/node/pull/12563
Refs: https://github.com/nodejs/node/pull/12557#issuecomment-296015032
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-04-25 00:06:17 +03:00
Neehar Venugopal
50966510c7
test: use block scoped variable names
...
PR-URL: https://github.com/nodejs/node/pull/12544
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-24 13:45:44 -07:00
Sebastian Plesciuc
d06a6a81a5
test: dynamic port in cluster eaddrinuse
...
Removed common.PORT from test-cluster-eaddrinuse to eliminate the
possibility that a dynamic port used in another test will collide
with common.PORT.
PR-URL: https://github.com/nodejs/node/pull/12547
Ref: https://github.com/nodejs/node/issues/12376
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-04-24 13:41:06 -07:00
Sebastian Plesciuc
ee8183ed85
test: dynamic port in cluster ipc throw
...
Removed common.PORT from test-cluster-ipc-throw to eliminate the
possibility that a dynamic port used in another test will collide
with common.PORT.
PR-URL: https://github.com/nodejs/node/pull/12571
Ref: https://github.com/nodejs/node/issues/12376
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-04-24 13:33:18 -07:00
thelady
bcb1d9c39a
test: replace assertion error check with regex
...
PR-URL: https://github.com/nodejs/node/pull/12603
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-04-24 13:06:46 -07:00
Muhsin Abdul-Musawwir
ef6a7cf2bc
test: refactored context type err message to regex
...
PR-URL: https://github.com/nodejs/node/pull/12596
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-24 11:20:26 -07:00
James M Snell
85a4e25775
http: add type checking for hostname
...
Add type checking for options.hostname / options.host
Maintains the use of `undefined` and `null` for default `localhost`,
but other falsy values (like `false`, `0` and `NaN`) are rejected.
PR-URL: https://github.com/nodejs/node/pull/12494
Ref: https://github.com/nodejs/node/issues/12488
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2017-04-24 10:49:12 -07:00
vperezma
b968d584af
test: improve test-process-chdir
...
remove typeError constructor and replace with regex string
to match typeError message
PR-URL: https://github.com/nodejs/node/pull/12589
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-04-24 10:31:28 -07:00
Sebastian Plesciuc
0105e6f826
test: dynamic port in parallel cluster tests
...
Removed common.PORT from test-cluster-message,
test-cluster-server-restart-none, test-cluster-server-restart-rr
and test-cluster-shared-handle-bind-error to eliminate the
possibility that a dynamic port used in another test will collide
with common.PORT.
PR-URL: https://github.com/nodejs/node/pull/12584
Ref: https://github.com/nodejs/node/issues/12376
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-04-24 10:25:46 -07:00
Rich Trott
549e81bfa1
debugger: remove obsolete _debug_agent.js
...
With _debugger.js removed, _debug_agent.js appears to be unnecessary.
PR-URL: https://github.com/nodejs/node/pull/12582
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-04-24 10:19:24 -07:00
Rich Trott
3663ac27c1
test: remove flaky designation for test on AIX
...
https://github.com/nodejs/node/issues/5085 has been completed so
presumably test-fs-watch is not flaky on AIX anymore. Remove flaky
designation from sequential.status.
PR-URL: https://github.com/nodejs/node/pull/12564
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-04-24 09:56:05 -07:00
Sebastian Plesciuc
cf68280ce1
test: dynamic port in cluster worker dgram
...
Remove common.PORT from test-cluster-dgram-1 and
test-cluster-dgram-2, in order to eliminate the
possibility of port collision.
PR-URL: https://github.com/nodejs/node/pull/12487
Ref: https://github.com/nodejs/node/issues/12376
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-04-22 22:38:50 -07:00
kumarrishav
200961b7e1
test: move test-debugger-repeat-last to sequential
...
PR-URL: https://github.com/nodejs/node/pull/12470
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-04-22 08:00:50 +02:00
cjihrig
5e095f699e
test: verify listener leak is only emitted once
...
When a possible listener leak is detected, a warning is
emitted. This commit updates an existing test to verify that the
warning is only emitted once.
PR-URL: https://github.com/nodejs/node/pull/12502
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2017-04-21 13:53:52 -04:00
cjihrig
c083a200b0
test: use duplex streams in duplex stream test
...
test-stream-duplex.js uses transform streams instead of the
duplex stream base class. This leads to some code not being
covered in the Duplex constructor.
PR-URL: https://github.com/nodejs/node/pull/12514
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-04-21 22:17:17 +08:00
cjihrig
4bcbefccce
test: add coverage for vm's breakOnSigint option
...
The breakOnSigint option follows different code paths, depending
on the number of listeners for SIGINT. This commit updates the
existing test to vary the number of SIGINT handlers.
PR-URL: https://github.com/nodejs/node/pull/12512
Reviewed-By: David Cai <davidcai1993@yahoo.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-21 22:02:32 +08:00
Yang Guo
b73b903dc4
test: use JSON.stringify to trigger stack overflow
...
V8's interpreter performs stack checks both at the call site and at the
function entry. A recursive function could therefore trigger stack
overflow at two different source locations. Instead of recursion, call
JSON.stringify on a deeply nested array.
PR-URL: https://github.com/nodejs/node/pull/12481
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-21 11:46:19 +02:00
Ben Noordhuis
90476ac6ee
lib: remove _debugger.js
...
The file no longer works after the removal of the --debug/--debug-brk
switches in commit 47f8f74 ("src: remove support for --debug".)
This commit also removes several tests that still referenced the
old debugger but were either unit-testing its internals or passing
for the wrong reason (like expecting an operation to fail, which
it did because the debugger is gone.)
PR-URL: https://github.com/nodejs/node/pull/12495
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-21 10:35:49 +02:00
Ben Noordhuis
e0b076a949
lib,src,test: update --debug/debug-brk comments
...
Overlooked in commit 47f8f74 ("src: remove support for --debug") from
earlier this month.
PR-URL: https://github.com/nodejs/node/pull/12495
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-21 10:35:06 +02:00
David Cai
ee0620b235
test: fix parallel/test-setproctitle.js on alpine
...
Since Busybox ps does not support -p switch, using ps -o and grep
instead to get the process title and then check it.
PR-URL: https://github.com/nodejs/node/pull/12413
Fixes: https://github.com/nodejs/node/issues/12399
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-04-21 14:38:23 +08:00
Rich Trott
b485813499
test: set benchmark-child-process flaky on windows
...
sequential/test-benchmark-child-process is still failing sometimes flaky
on Windows in CI. Mark it as flaky in sequential.status until it gets
sorted.
PR-URL: https://github.com/nodejs/node/pull/12561
Ref: https://github.com/nodejs/node/issues/12560
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-04-20 22:37:41 -07:00
James M Snell
e75bc87d22
errors: port internal/process errors to internal/errors
...
* Assign codes to the handful of errors reported by
internal/process/*.js
* Include documentation for the new error codes
* Improve error messages
* Improve test coverage for process.nextTick
PR-URL: https://github.com/nodejs/node/pull/11294
Ref: https://github.com/nodejs/node/issues/11273
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2017-04-20 11:34:07 -07:00
Jason Ginchereau
468275ac79
n-api: remove napi_get_value_string_length()
...
This API doesn't serve much purpose, and is only likely to cause
confusion and bugs. The intention was that this would return the
number of characters in a string independent of encoding, but
that's not generally useful. In almost all cases, one of the
encoding-specific napi_get_value_string_* APIs is more correct.
(Pass a null buffer if only the encoded length is desired.)
Anyway the current implementation of napi_get_value_string_length()
is technically wrong: it returns the number of 2-byte code units of
the UTF-16 encoding, but there are actually some characters that
are encoded as two UTF-16 code units.
Note the JavaScript String.prototype.length property returns the
number of UTF-16 code units, which may be different from the number
of characters. So, getting the true character count is not common
with JavaScript, and is probably best left to specialized
internationalization libraries.
PR-URL: https://github.com/nodejs/node/pull/12496
Fixes: https://github.com/nodejs/abi-stable-node/issues/226
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-20 13:27:17 -04:00
Bartosz Sosnowski
bb041ea5a0
repl: support hidden history file on Windows
...
On Windows when REPL history file has the hidden attribute node will
fail when trying to open it in 'w' mode. This changes the mode to
'r+'. The file is guaranteed to exists because of earlier open call
with 'a+'.
Fixes: https://github.com/nodejs/node/issues/5261
PR-URL: https://github.com/nodejs/node/pull/12207
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-20 13:18:42 +02:00
Daniel Bevenius
f3f9dd73aa
test: skip tests using ca flags
...
Currently when building --without-ssl there is a failure due to a change
made by me in commit 3cf88a45e8 ("test:
add --use-bundled-ca to tls-cnnic-whitelist") which added a
'--use-bundled-ca' flag to that test. But when building --without-ssl
that flag will be invalid and an error (bad option) will be reported.
This commit filters tests that specify the --use-bundled-ca or
--use-openssl-ca flags so that they are skipped when configured
--without-ssl.
PR-URL: https://github.com/nodejs/node/pull/12485
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-20 09:39:59 +02:00
Rich Trott
32f77ff8ce
test: minimize time for child_process benchmark
...
test-benchmark-child-process sometimes times out on Windows in CI.
Minimize the number of configurations that run so it will (hopefully)
not time out anymore. Set dur=0.
PR-URL: https://github.com/nodejs/node/pull/12518
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-04-19 15:55:32 -07:00
Faiz Halde
3ae670275c
test: console.log removed from test-net-localport
...
There seems to be an unecessary console log
happening in a test.
PR-URL: https://github.com/nodejs/node/pull/12483
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2017-04-20 05:57:17 +09:00
Sebastian Plesciuc
a2843f2cf9
test: dynamic port in cluster worker disconnect
...
Remove common.PORT from test-cluster-worker-disconnect-on-error
possibility that a dynamic port used in another test will collide
with common.PORT.
PR-URL: https://github.com/nodejs/node/pull/12457
Ref: https://github.com/nodejs/node/issues/12376
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-04-19 10:33:28 -07:00
Ahmed Taj elsir
825d3909ab
test: remove uses of common.PORT in test-tls-client tests
...
Change common.PORT to '0' to avoid the possibility of getting EADDRINUSE error
if another test in 'parallel' uses port '0' at the same time.
PR-URL: https://github.com/nodejs/node/pull/12461
Ref: https://github.com/nodejs/node/issues/12376
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-04-19 10:29:11 -07:00
Anna Henningsen
6a1275dfec
src: add missing "http_parser.h" include
...
In 9d522225e7 the indirect "http_parser.h"
include was removed, which made `NODE_STRINGIFY()` fail silently for the
http parser version in `process.versions`.
PR-URL: https://github.com/nodejs/node/pull/12464
Fixes: https://github.com/nodejs/node/issues/12463
Ref: https://github.com/nodejs/node/pull/12366
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-04-19 10:27:27 -07:00
Sebastian Plesciuc
86a3ba0c4e
test: dynamic port in cluster worker wait close
...
Remove common.PORT from test-cluster-worker-wait-server-close
possibility that a dynamic port used in another test will collide
with common.PORT.
PR-URL: https://github.com/nodejs/node/pull/12466
Ref: https://github.com/nodejs/node/issues/12376
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-04-19 10:20:03 -07:00