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

18631 Commits

Author SHA1 Message Date
Chris Young
cacce304cb doc: add links to alternative versions of doc
Each page of the API documentation should have links to other versions
of the same page. This will make it easier to switch between the current
"live" release at nodejs.org and LTS versions.

PR-URL: https://github.com/nodejs/node/pull/10958
Fixes: https://github.com/nodejs/node/issues/10726
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-08-28 11:17:08 +02:00
Dave Olszewski
79773f8af9
doc: update configure to require g++ 4.9.4
PR-URL: https://github.com/nodejs/node/pull/14204
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-08-27 21:17:31 -03:00
Miguel Angel Asencio Hurtado
9a5c3cf185
test: continue normalizing fixtures use
PR-URL: https://github.com/nodejs/node/pull/14716
Refs: https://github.com/nodejs/node/pull/14332
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-08-27 21:14:34 -03:00
Matteo Collina
53c5bf546e http2: refactor error handling
This changes the error handling model of ServerHttp2Stream,
ServerHttp2Request and ServerHttp2Response.
An 'error' emitted on ServerHttp2Stream will not go to
'uncaughtException' anymore, but to the server 'streamError'.
On the stream 'error', ServerHttp2Request will emit 'abort', while
ServerHttp2Response would do nothing.
It also updates respondWith* to the new error handling.

Fixes: https://github.com/nodejs/node/issues/14963
PR-URL: https://github.com/nodejs/node/pull/14991
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-08-28 00:39:42 +04:00
Weijia Wang
4d893e093a
timers: Migrate to use internal/errors
PR-URL: https://github.com/nodejs/node/pull/14659
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-08-27 11:14:50 -03:00
Ruslan Bekenev
237a42dd93
tools: add custom private key option
Add -i option for release.sh that allows users to specify
non-default private key for ssh and scp commands.
Change argument parsing to getopts.

PR-URL: https://github.com/nodejs/node/pull/14401
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-08-27 11:03:50 -03:00
Refael Ackermann
0babb12494
doc: building - note on Windows SDK 15063
PR-URL: https://github.com/nodejs/node/pull/14394
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-08-27 11:00:49 -03:00
Jimmy Cann
a7dccd040d
tls: type checking for key, cert and ca options
PR-URL: https://github.com/nodejs/node/pull/14807
Fixes: https://github.com/nodejs/node/issues/12802
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-08-27 10:53:32 -03:00
Jon Moss
0097794922
errors: remove duplicated ERR_HTTP_INVALID_STATUS_CODE error
PR-URL: https://github.com/nodejs/node/pull/15003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-08-27 22:17:53 +09:00
Rich Trott
70c775a810 test: run abort tests
Currently, tests in test/abort do not run in CI.

This change configures the test runner to not write core files for abort
tests and to run them.

PR-URL: https://github.com/nodejs/node/pull/14013
Fixes: https://github.com/nodejs/node/issues/14012
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-08-26 16:30:35 -07:00
Rich Trott
df57d8bdcc test: improve test-abort-backtrace
Improve error message by showing output when frames output does not meet
expectations.

Since we can't tell at runtime if we have the correct libc for
backtraces, allow an empty backtrace and run the test on all platforms.

PR-URL: https://github.com/nodejs/node/pull/14013
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-08-26 16:30:31 -07:00
Rich Trott
acdf558551 test: improve test-abort-uncaught-exception
Add `SIGTRAP` to allowed signals (seen on PPC machines in CI).

Improve message when assertion fails in test-abort-uncaught-exception by
providing the signal name that was not expected.

PR-URL: https://github.com/nodejs/node/pull/14013
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-08-26 16:30:25 -07:00
Rich Trott
f912080bf2 Revert "http2: refactor error handling"
This reverts commit 4ca8ff264f.

That commit was landed without a green CI and is failing on Windows.

PR-URL: https://github.com/nodejs/node/pull/15047
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-26 13:13:17 -07:00
Jeremiah Senkpiel
99c478eb36
test: pipe some error output if npm fails
This test now prints out some child error output if the npm child proc
fails, allowing us to debug easier.

PR-URL: https://github.com/nodejs/node/pull/12490
Refs: https://github.com/nodejs/node/pull/12480
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-26 08:44:15 -03:00
Brian White
2154a3ce0f
net: move debug statement
This will allow `localAddress` to be properly set before writing
debug output.

PR-URL: https://github.com/nodejs/node/pull/12616
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-08-26 08:22:00 -03:00
James M Snell
6db825ae82 perf_hooks: mark as experimental
PR-URL: https://github.com/nodejs/node/pull/14997
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-08-25 16:04:21 -07:00
Ian Perkins
15ac1eac3b
benchmark: fix issues in dns benchmark
The benchmark script for dns contained functions with args declared
but never used. This fix removes those arguments from the function
signatures.

No test existed for the dns benchmark so one was added to the
parallel suite.
To improve performance the tests are limited to 1 invocation to a
single endpoint.

PR-URL: https://github.com/nodejs/node/pull/14936
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-25 18:57:57 -03:00
Ruben Bridgewater
9aa709382a
lib: remove circular reference
PR-URL: https://github.com/nodejs/node/pull/14885
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-25 18:33:25 -03:00
Matteo Collina
4ca8ff264f http2: refactor error handling
This changes the error handling model of ServerHttp2Stream,
ServerHttp2Request and ServerHttp2Response.
An 'error' emitted on ServerHttp2Stream will not go to
'uncaughtException' anymore, but to the server 'streamError'.
On the stream 'error', ServerHttp2Request will emit 'abort', while
ServerHttp2Response would do nothing

See: https://github.com/nodejs/node/issues/14963

PR-URL: https://github.com/nodejs/node/pull/14991
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-08-25 14:28:54 -07:00
Jan Schär
8987ae843e doc,stream: remove wrong remark on readable.read
The returned chunk is *never* longer than `size`.

PR-URL: https://github.com/nodejs/node/pull/15014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-08-25 13:26:36 -07:00
Rich Trott
af11867b41 console: improve console.group()
Preserve indentation for multiline strings, objects that span multiple
lines, etc.

also make groupIndent non-enumerable

Hide the internal `groupIndent` key a bit by making it non-enumerable
and non-configurable.

PR-URL: https://github.com/nodejs/node/pull/14999
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-08-25 11:29:33 -07:00
Sam Roberts
a1d34b3f49 doc: threadpool size, and APIs using the pool
Not knowing which APIs use libuv's threadpool can lead to surprising
performance problems. Document the APIs, and also document
UV_THREADPOOL_SIZE, which can be used to fix problems.

PR-URL: https://github.com/nodejs/node/pull/14995
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-25 10:16:00 -07:00
Sam Roberts
6cdffb18c5 doc: sort bottom-of-file dns markdown links
PR-URL: https://github.com/nodejs/node/pull/14992
Reviewed-By: Anna Henningsen <anna@addaleax.net>
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-08-25 10:09:47 -07:00
Sam Roberts
68321b5cb0 doc: crypto.randomBytes does not block when async
It may not return random bytes right away, but when called
asynchronously it will not block.

PR-URL: https://github.com/nodejs/node/pull/14993
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-25 10:06:02 -07:00
Gabriel Schulhof
7efb8f7619 n-api: implement promise
Promise is implemented as a pair of objects. `napi_create_promise()`
returns both a JavaScript promise and a newly allocated "deferred" in
its out-params. The deferred is linked to the promise such that the
deferred can be passed to `napi_resolve_deferred()` or
`napi_reject_deferred()` to reject/resolve the promise.

`napi_is_promise()` can be used to check if a `napi_value` is a native
promise - that is, a promise created by the underlying engine, rather
than a pure JS implementation of a promise.

PR-URL: https://github.com/nodejs/node/pull/14365
Fixes: https://github.com/nodejs/abi-stable-node/issues/242
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-08-25 12:02:55 +03:00
Ben Noordhuis
64f59be62f deps: cherry-pick e020aae394 from V8 upstream
Original commit message:

    Work around glibc thread-local storage bug

    glibc before 2.17 has a bug that makes it impossible to execute
    binaries that have single-byte thread-local variables:

        % node --version
        node: error while loading shared libraries: cannot allocate
        memory in static TLS block

    Work around that by making the one instance in the V8 code base
    an int.

    See: https://sourceware.org/bugzilla/show_bug.cgi?id=14898
    See: https://github.com/nodesource/distributions/issues/513
    See: https://github.com/nodejs/build/pull/809
    Change-Id: Iefd8009100cd93e26cf8dc5dc03f2d622b423385
    Reviewed-on: https://chromium-review.googlesource.com/612351
    Commit-Queue: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-by: Eric Holk <eholk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47400}

PR-URL: https://github.com/nodejs/node/pull/14913
Ref: https://github.com/nodejs/build/pull/809
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-24 15:42:57 -07:00
Jon Moss
d86eb5cadf test: simplify test-tls-client-default-ciphers
PR-URL: https://github.com/nodejs/node/pull/14928
Ref: https://github.com/nodejs/node/issues/12376
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-08-24 15:36:32 -07:00
Mohd Maqbool Alam
9fc58afa6d test: remove unused function args
PR-URL: https://github.com/nodejs/node/pull/14971
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: David Cai <davidcai1993@yahoo.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-24 15:29:22 -07:00
Rod Vagg
be4c984747 doc: environmental->environment & NodeJS->Node.js
PR-URL: https://github.com/nodejs/node/pull/14974
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-24 15:17:29 -07:00
Weijia Wang
9e0f771224 buffer: improve error messages
Some errors in buffer module losed some arguments or received
wrong arguments when they were created. This PR added these
losing arguments and fixed the wrong arguments.

PR-URL: https://github.com/nodejs/node/pull/14975
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-24 14:49:47 -07:00
James M Snell
52fe762606 meta: improve definition of a collaborator
Expand definition of Collaborator to include individuals
with commit access to any Node.js GitHub repository.

Clarify the kinds of things that should be considered when
considering inviting new collaborators

PR-URL: https://github.com/nodejs/node/pull/14981
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-24 13:25:37 -07:00
Anna Henningsen
784c6d40f8
src: use proper errors as coming from StringBytes
The previous errors were incorrect here, as the code
only failed in situations where strings exceeded size limits or
an OOM situation was encountered, not for invalid encodings
(which aren’t even detected explicitly).

Unfortunately, these situations are hard to test for.

PR-URL: https://github.com/nodejs/node/pull/14579
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-24 21:05:07 +02:00
Anna Henningsen
7e544240d3
test: extend async addon test
Test more current behaviour, based on discussions in
https://github.com/nodejs/node/pull/14697.

PR-URL: https://github.com/nodejs/node/pull/14922
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-24 21:01:36 +02:00
Anna Henningsen
7ce2555896
stream: fix Writable instanceof for subclasses
The current custom instanceof for `Writable` subclasses previously
returned false positives for instances of *other* subclasses of
`Writable` because it was inherited by these subclasses.

Fixes: https://github.com/nodejs/node/issues/14943
PR-URL: https://github.com/nodejs/node/pull/14945
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-24 20:58:21 +02:00
Michał Wadas
abced13e29 doc: fix typo in Buffer.from(string, [encoding])
PR-URL: https://github.com/nodejs/node/pull/15013
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-08-25 00:19:35 +08:00
Kyle Lamse
43029da762 doc: add note for Windows build path
PR-URL: https://github.com/nodejs/node/pull/14354
Fixes: https://github.com/nodejs/node/issues/14337
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-24 08:11:08 -07:00
Bartosz Sosnowski
88b85925fe test: fix async-hooks tests
The 'test-graph.tcp' and 'test-tcpwrap' tests are using '::' as server
address. This is mapped to localhost on Linux, but fails on Windows.

PR-URL: https://github.com/nodejs/node/pull/14865
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-24 10:56:24 -04:00
Bartosz Sosnowski
ca9b3f27eb test, win: fix IPv6 detection on Windows
Add proper IPv6 detection on loopback device on Windows.

PR-URL: https://github.com/nodejs/node/pull/14865
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-24 15:56:04 +02:00
Rich Trott
3cf27f1485 test: add test-benchmark-process
Add minimal test to confirm that process benchmarks run.

PR-URL: https://github.com/nodejs/node/pull/14951
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-23 23:33:56 -07:00
Rich Trott
ce69d016c5 test: add test-benchmark-path
Add minimal test to confirm that path benchmarks run.

PR-URL: https://github.com/nodejs/node/pull/14951
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-23 23:33:52 -07:00
Rich Trott
dd60c60d83 test: add test-benchmark-os
Add minimal test to confirm that os benchmarks run.

PR-URL: https://github.com/nodejs/node/pull/14951
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-23 23:33:47 -07:00
Rich Trott
afa62a2679 test: add test-benchmark-events
Add minimal test to confirm that events benchmarks run.

PR-URL: https://github.com/nodejs/node/pull/14951
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-23 23:33:43 -07:00
Rich Trott
3fcfca62f9 test: add test-benchmark-domain
Add minimal test to confirm that domain benchmarks run.

PR-URL: https://github.com/nodejs/node/pull/14951
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-23 23:33:22 -07:00
Rich Trott
fffc84a417 benchmark: fix dgram/bind-params.js benchmark
`benchmark/dgram/bind-params` exits with an error frequently in its
current form because no error handler is applied. Add no-op error
handlers to avoid the problem.

```console
$ node benchmark/run.js --filter bind-params dgram

dgram/bind-params.js
dgram/bind-params.js address="true" port="true" n=10000:
193,347.42178656923
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: bind ENFILE 0.0.0.0
    at Object._errnoException (util.js:1041:11)
    at _exceptionWithHostPort (util.js:1064:20)
    at _handle.lookup (dgram.js:242:18)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:611:11)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:598:3
$
```

PR-URL: https://github.com/nodejs/node/pull/14948
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-23 22:34:59 -07:00
Daniel Bevenius
a36b540502 build: for --enable-static, run only cctest
Currently when building with --enable-static and running the test target
the following error will be reported:
Building addon
/node/test/addons/01_function_arguments/
env: ./node: No such file or directory
make[1]: *** [test/addons/.buildstamp] Error 1

Note that this is with a clean build where no prior node executable was
built.

This commit suggests only running the cctest target when --enable-static
is specified.

PR-URL: https://github.com/nodejs/node/pull/14892
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
2017-08-24 05:52:23 +02:00
Anna Henningsen
86c4655a0f src: fix build on certain platforms
The `double` fields in `performance_state` could previously have
been aligned at 4-byte instead of 8-byte boundaries, which would
have made creating an Float64Array them as a array buffer view
for an ArrayBuffer extending over the entire struct an invalid
operation.

Ref: 67269fd7f3

Comments out related flaky failure

PR-URL: https://github.com/nodejs/node/pull/14996
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-23 19:01:19 -07:00
Rich Trott
c40229a9b8 console: implement minimal console.group()
Node.js exposes `console.group()` and `console.groupEnd()` via the
inspector. These functions have no apparent effect when called from
Node.js without the inspector. We cannot easily hide them when Node.js
is started without the inspector because we support opening the
inspector during runtime via `inspector.port()`.

Implement a minimal `console.group()`/`console.groupEnd()`. More
sophisticated implementations are possible, but they can be done in
userland and/or features can be added to this at a later time.

`console.groupCollapsed()` is implemented as an alias for
`console.group()`.

PR-URL: https://github.com/nodejs/node/pull/14910
Fixes: https://github.com/nodejs/node/issues/1716
Ref: https://github.com/nodejs/node/issues/12675
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-08-23 18:46:14 -07:00
Ben Noordhuis
c6da5c8cdf build: better support for python3 systems
Improve support for systems where `python` is actually `python3`.

Not all systems have a `python2` binary, so simply updating the shebang
won't work.

What we can do is apply some cleverness: start life as a shell script,
locate the python binary, then re-execute the script but this time as
python code.

Special care is taken to ensure that spaces in arguments are passed on
verbatim.

PR-URL: https://github.com/nodejs/node/pull/14737
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@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-08-23 16:31:08 -07:00
Anna Henningsen
772145674c
http2: ignore invalid headers explicitly
Required in order for `parallel/test-http2-response-splitting` to pass
after upgrading `nghttp2`.

PR-URL: https://github.com/nodejs/node/pull/14955
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-24 01:27:10 +02:00
Anna Henningsen
97d34ddf56
deps: fixup nghttp2 version number
PR-URL: https://github.com/nodejs/node/pull/14955
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-24 01:27:06 +02:00