Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport 7373: vm: fix nested timeouts with inverse order + fix flaky test-vm-timeout #7667

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
76e65d9
test: check types for http request and response
bnoordhuis May 26, 2016
774fb78
doc: mention http request "aborted" events
kemitchell Jun 10, 2016
748702a
doc: update "who to cc in issues" chart
Fishrock123 May 11, 2016
1d4a4b2
doc: add lance to collaborators
lance Jun 24, 2016
75d21ff
doc: add CTC meeting minutes 2016-06-15
joshgav Jun 16, 2016
73cdc54
repl: fix tab completion for defined commands
princejwesley Jun 22, 2016
3ce574e
doc: clarify child_process stdout/stderr types
sartrey Jun 22, 2016
40bd4c1
doc: fix "sign.verify" typo in crypto doc.
rus0000 Jun 24, 2016
0ecdd6f
assert: remove unneeded arguments special handling
Trott Jun 24, 2016
9e0aad2
doc: improve usage of `zero`/`0`
Trott Jun 28, 2016
5542971
test: remove common.PORT from http tests
Trott Jun 29, 2016
efca61e
doc: fix detached child stdio example
cjihrig Jul 5, 2016
54930bf
doc: add bartosz sosnowski to colaborators
bzoz Jul 6, 2016
c93579d
doc: fix minor style issues in http.md
Trott Jul 4, 2016
db020b4
test: fix flaky test-net-write-slow
Trott Jul 6, 2016
eb841f9
doc: added information on how to run the linter.
diosney Jul 4, 2016
714aee2
doc: add benchmark who-to-CC info
Trott Jul 8, 2016
8c929aa
doc: dns.resolve fix callback argument description
qheaden Jul 4, 2016
f7e1bed
tools: remove unused variable
Trott Jul 7, 2016
c4cae1f
test: remove unused var in test-tls-server-verify
Trott Jul 7, 2016
700c24a
test: remove unused var from child-process-fork
Trott Jul 7, 2016
b98e20d
test: remove unused var from stream2 test
Trott Jul 7, 2016
6d75996
test: remove unused var in net-server-try-ports
Trott Jul 7, 2016
eaf40a0
benchmark: remove unused variables
Trott Jul 7, 2016
e3aabdb
test: remove unused vars from http/https tests
Trott Jul 7, 2016
09c8ec7
tools: update ESLint, fix unused vars bug
Trott Jul 7, 2016
a187b25
test: update weak module for gc tests
Trott May 27, 2016
c3c26a2
test: test isFullWidthCodePoint with invalid input
Trott Jun 25, 2016
53f114d
doc: fix cluster worker 'message' event
cjihrig Jun 15, 2016
27743a9
src: remove unused #include statement
bnoordhuis May 4, 2016
79e9d5b
src: don't use locale-sensitive strcasecmp()
bnoordhuis May 4, 2016
b5b44d8
tools: update certdata.txt
bnoordhuis Jun 22, 2016
b168928
crypto: update root certificates
bnoordhuis Jun 22, 2016
de57ead
test: remove internet/test-tls-connnect-cnnic
bnoordhuis Jun 23, 2016
46c8f84
src: check uv_async_init() return value
bnoordhuis Jun 22, 2016
b025cae
src: guard against starting fs watcher twice
bnoordhuis Jun 22, 2016
c4f8e2c
src: remove unused data member write_queue_size_
bnoordhuis Jun 22, 2016
5230f92
src: remove unused md_ data members
bnoordhuis Jun 22, 2016
6a8d0bb
src: remove duplicate HMAC_Init calls
bnoordhuis Jun 22, 2016
b3811fd
src: remove deprecated HMAC_Init, use HMAC_Init_ex
bnoordhuis Jun 22, 2016
8be9d0a
src: fix use-after-return in zlib bindings
bnoordhuis Jun 22, 2016
6d2779d
src: fix bad logic in uid/gid checks
bnoordhuis Jun 22, 2016
1e66668
tls: catch `certCbDone` exceptions
indutny May 20, 2016
b68e685
build: add v8 requirement to test-v8* in Makefile
targos Jun 29, 2016
110ce55
build: use BUILDTYPE when building V8 in Makefile
targos Jun 30, 2016
d5ce440
test: fix flaky test-vm-timeout
addaleax Jun 22, 2016
6d855b2
Revert "test: mark test-vm-timeout flaky on windows"
addaleax Jun 22, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ $ ./configure && make -j8 test
Make sure the linter is happy and that all tests pass. Please, do not submit
patches that fail either check.

Running `make test` will run the linter as well unless one or more tests fail.
If you want to run the linter without running tests, use `make lint`.

If you are updating tests and just want to run a single test to check it, you
can use this syntax to run it exactly as the test harness would:

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ cctest: all

v8:
tools/make-v8.sh v8
$(MAKE) -C deps/v8 $(V8_ARCH) $(V8_BUILD_OPTIONS)
$(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)

test: | cctest # Depends on 'all'.
$(PYTHON) tools/test.py --mode=release doctool message pseudo-tty parallel sequential -J
Expand Down Expand Up @@ -227,22 +227,22 @@ test-timers:
test-timers-clean:
$(MAKE) --directory=tools clean

test-v8:
test-v8: v8
# note: performs full test unless QUICKCHECK is specified
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \
--mode=$(BUILDTYPE_LOWER) $(V8_TEST_NO_I18N) $(QUICKCHECK_ARG) \
--no-presubmit \
--shell-dir=$(PWD)/deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) \
$(TAP_V8)

test-v8-intl:
test-v8-intl: v8
# note: performs full test unless QUICKCHECK is specified
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \
--mode=$(BUILDTYPE_LOWER) --no-presubmit $(QUICKCHECK_ARG) \
--shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) intl \
$(TAP_V8_INTL)

test-v8-benchmarks:
test-v8-benchmarks: v8
deps/v8/tools/run-tests.py --arch=$(V8_ARCH) --mode=$(BUILDTYPE_LOWER) \
--download-data $(QUICKCHECK_ARG) --no-presubmit \
--shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) benchmarks \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ information about the governance of the Node.js project, see
* [benjamingr](https://github.com/benjamingr) - **Benjamin Gruenbaum** <benjamingr@gmail.com>
* [bmeck](https://github.com/bmeck) - **Bradley Farias** <bradley.meck@gmail.com>
* [brendanashworth](https://github.com/brendanashworth) - **Brendan Ashworth** <brendan.ashworth@me.com>
* [bzoz](https://github.com/bzoz) - **Bartosz Sosnowski** <bartosz@janeasystems.com>
* [calvinmetcalf](https://github.com/calvinmetcalf) - **Calvin Metcalf** <calvin.metcalf@gmail.com>
* [claudiorodriguez](https://github.com/claudiorodriguez) - **Claudio Rodriguez** <cjrodr@yahoo.com>
* [domenic](https://github.com/domenic) - **Domenic Denicola** <d@domenic.me>
Expand All @@ -186,6 +187,7 @@ information about the governance of the Node.js project, see
* [joaocgreis](https://github.com/joaocgreis) - **João Reis** <reis@janeasystems.com>
* [julianduque](https://github.com/julianduque) - **Julian Duque** <julianduquej@gmail.com>
* [JungMinu](https://github.com/JungMinu) - **Minwoo Jung** <jmwsoft@gmail.com>
* [lance](https://github.com/lance) - **Lance Ball** <lball@redhat.com>
* [lxe](https://github.com/lxe) - **Aleksey Smolenchuk** <lxe@lxe.co>
* [matthewloring](https://github.com/matthewloring) - **Matthew Loring** <mattloring@google.com>
* [mcollina](https://github.com/mcollina) - **Matteo Collina** <matteo.collina@gmail.com>
Expand Down
4 changes: 0 additions & 4 deletions benchmark/http/_chunky_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ function main(conf) {
}
}

var success = 0;
var failure = 0;
var min = 10;
var size = 0;
var mod = 317;
Expand All @@ -69,14 +67,12 @@ function main(conf) {
if ((d.length === pattern.length && d === pattern) ||
(d.length > pattern.length &&
d.slice(0, pattern.length) === pattern)) {
success += 1;
did = true;
} else {
pattern = 'HTTP/1.1 ';
if ((d.length === pattern.length && d === pattern) ||
(d.length > pattern.length &&
d.slice(0, pattern.length) === pattern)) {
failure += 1;
did = true;
}
}
Expand Down
2 changes: 0 additions & 2 deletions benchmark/static_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var port = 12346;
var n = 700;
var bytes = 1024 * 5;

var requests = 0;
var responses = 0;

var body = 'C'.repeat(bytes);
Expand Down Expand Up @@ -37,6 +36,5 @@ server.listen(port, function() {
});
});
req.id = i;
requests++;
}
});
10 changes: 5 additions & 5 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ The `stdout` and `stderr` arguments passed to the callback will contain the
stdout and stderr output of the child process. By default, Node.js will decode
the output as UTF-8 and pass strings to the callback. The `encoding` option
can be used to specify the character encoding used to decode the stdout and
stderr output. If `encoding` is `'buffer'`, `Buffer` objects will be passed to
the callback instead.
stderr output. If `encoding` is `'buffer'`, or an unrecognized character
encoding, `Buffer` objects will be passed to the callback instead.

The `options` argument may be passed as the second argument to customize how
the process is spawned. The default options are:
Expand Down Expand Up @@ -230,8 +230,8 @@ The `stdout` and `stderr` arguments passed to the callback will contain the
stdout and stderr output of the child process. By default, Node.js will decode
the output as UTF-8 and pass strings to the callback. The `encoding` option
can be used to specify the character encoding used to decode the stdout and
stderr output. If `encoding` is `'buffer'`, `Buffer` objects will be passed to
the callback instead.
stderr output. If `encoding` is `'buffer'`, or an unrecognized character
encoding, `Buffer` objects will be passed to the callback instead.

### child_process.fork(modulePath[, args][, options])

Expand Down Expand Up @@ -414,7 +414,7 @@ const spawn = require('child_process').spawn;

const child = spawn(process.argv[0], ['child_program.js'], {
detached: true,
stdio: ['ignore']
stdio: 'ignore'
});

child.unref();
Expand Down
9 changes: 5 additions & 4 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ It is not emitted in the worker.
### Event: 'message'

* `message` {Object}
* `handle` {undefined|Object}

Similar to the `cluster.on('message')` event, but specific to this worker.

This event is the same as the one provided by [`child_process.fork()`][].
Similar to the `cluster.on('message')` event, but specific to this worker. In a
worker you can also use `process.on('message')`.

In a worker you can also use `process.on('message')`.
See [`process` event: `'message'`][].

As an example, here is a cluster that keeps count of the number of requests
in the master process using the message system:
Expand Down Expand Up @@ -689,3 +689,4 @@ socket.on('data', (id) => {
[Child Process module]: child_process.html#child_process_child_process_fork_modulepath_args_options
[child_process event: 'exit']: child_process.html#child_process_event_exit
[child_process event: 'message']: child_process.html#child_process_event_message
[`process` event: `'message'`]: process.html#process_event_message
2 changes: 1 addition & 1 deletion doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ verify.end();

const public_key = getPublicKeySomehow();
const signature = getSignatureToVerify();
console.log(sign.verify(public_key, signature));
console.log(verify.verify(public_key, signature));
// Prints true or false
```

Expand Down
5 changes: 4 additions & 1 deletion doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ Valid values for `rrtype` are:
* `'NAPTR'` - name authority pointer record

The `callback` function has arguments `(err, addresses)`. When successful,
`addresses` will be an array. The type of each item in `addresses` is
`addresses` will be an array, except when resolving an SOA record which returns
an object structured in the same manner as one returned by the
[`dns.resolveSoa()`][] method. The type of each item in `addresses` is
determined by the record type, and described in the documentation for the
corresponding lookup methods.

Expand Down Expand Up @@ -379,6 +381,7 @@ uses. For instance, _they do not use the configuration from `/etc/hosts`_.
[`dns.lookup()`]: #dns_dns_lookup_hostname_options_callback
[`dns.resolve()`]: #dns_dns_resolve_hostname_rrtype_callback
[`dns.resolve4()`]: #dns_dns_resolve4_hostname_callback
[`dns.resolveSoa()`]: #dns_dns_resolvesoa_hostname_callback
[`Error`]: errors.html#errors_class_error
[Implementation considerations section]: #dns_implementation_considerations
[supported `getaddrinfo` flags]: #dns_supported_getaddrinfo_flags
Expand Down
34 changes: 24 additions & 10 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ The request implements the [Writable Stream][] interface. This is an
Emitted when the request has been aborted by the client. This event is only
emitted on the first call to `abort()`.

### Event: 'aborted'

`function () { }`

Emitted when the request has been aborted by the server and the network
socket has closed.

### Event: 'connect'

`function (response, socket, head) { }`
Expand Down Expand Up @@ -516,24 +523,24 @@ already been bound to a port or domain socket.

Listening on a file descriptor is not supported on Windows.

This function is asynchronous. The last parameter `callback` will be added as
a listener for the `'listening'` event. See also [`net.Server.listen()`][].
This function is asynchronous. `callback` will be added as a listener for the
`'listening'` event. See also [`net.Server.listen()`][].

Returns `server`.

### server.listen(path[, callback])

Start a UNIX socket server listening for connections on the given `path`.

This function is asynchronous. The last parameter `callback` will be added as
a listener for the `'listening'` event. See also [`net.Server.listen(path)`][].
This function is asynchronous. `callback` will be added as a listener for the
`'listening'` event. See also [`net.Server.listen(path)`][].

### server.listen(port[, hostname][, backlog][, callback])

Begin accepting connections on the specified `port` and `hostname`. If the
`hostname` is omitted, the server will accept connections on any IPv6 address
(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. Use a
port value of zero to have the operating system assign an available port.
port value of `0` to have the operating system assign an available port.

To listen to a unix socket, supply a filename instead of port and hostname.

Expand All @@ -542,8 +549,8 @@ The actual length will be determined by your OS through sysctl settings such as
`tcp_max_syn_backlog` and `somaxconn` on linux. The default value of this
parameter is 511 (not 512).

This function is asynchronous. The last parameter `callback` will be added as
a listener for the `'listening'` event. See also [`net.Server.listen(port)`][].
This function is asynchronous. `callback` will be added as a listener for the
`'listening'` event. See also [`net.Server.listen(port)`][].

### server.maxHeadersCount

Expand Down Expand Up @@ -776,8 +783,8 @@ be called multiple times to provide successive parts of the body.

`chunk` can be a string or a buffer. If `chunk` is a string,
the second parameter specifies how to encode it into a byte stream.
By default the `encoding` is `'utf8'`. The last parameter `callback`
will be called when this chunk of data is flushed.
By default the `encoding` is `'utf8'`. `callback` will be called when this chunk
of data is flushed.

**Note**: This is the raw HTTP body and has nothing to do with
higher-level multi-part body encodings that may be used.
Expand Down Expand Up @@ -853,6 +860,13 @@ headers and data.
It implements the [Readable Stream][] interface, as well as the
following additional events, methods, and properties.

### Event: 'aborted'

`function () { }`

Emitted when the request has been aborted by the client and the network
socket has closed.

### Event: 'close'

`function () { }`
Expand Down Expand Up @@ -996,7 +1010,7 @@ $ node
}
```

If you would like to extract the params from the query string,
If you would like to extract the parameters from the query string,
you can use the `require('querystring').parse` function, or pass
`true` as the second argument to `require('url').parse`. Example:

Expand Down
2 changes: 1 addition & 1 deletion doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ code without properly recovering from the exception can cause additional
unforeseen and unpredictable issues.

Exceptions thrown from within the event handler will not be caught. Instead the
process will exit with a non zero exit code and the stack trace will be printed.
process will exit with a non-zero exit code and the stack trace will be printed.
This is to avoid infinite recursion.

Attempting to resume normally after an uncaught exception can be similar to
Expand Down
Loading