Anna Henningsen
e45b6a3b98
http2: do not start reading after write if new write is on wire
...
Don’t start reading more input data if we’re still busy writing output.
This was overlooked in 8a4a1931b8 .
Fixes: https://github.com/nodejs/node/issues/29353
Fixes: https://github.com/nodejs/node/issues/29393
PR-URL: https://github.com/nodejs/node/pull/29399
Backport-PR-URL: https://github.com/nodejs/node/pull/29618
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-09-25 13:28:32 +01:00
Anna Henningsen
559a8e342b
http2: do not crash on stream listener removal w/ destroyed session
...
Do not crash when the session is no longer available.
Fixes: https://github.com/nodejs/node/issues/29457
PR-URL: https://github.com/nodejs/node/pull/29459
Backport-PR-URL: https://github.com/nodejs/node/pull/29618
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-09-25 13:28:09 +01:00
João Reis
92a2f8bbe3
test,win: cleanup exec-timeout processes
...
When CMD is used to launch a process and CMD is killed too quickly,
the process can stay behind running in suspended state, never
completing. This only happens in Windows Server 2008R2.
Refs: https://github.com/nodejs/build/issues/1829
PR-URL: https://github.com/nodejs/node/pull/28723
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-09-19 21:12:20 +01:00
Matteo Collina
1a5dc6a3e7
http: check for existance in resetHeadersTimeoutOnReqEnd
...
socket.parser can be undefined under unknown circumstances.
This is a fix for a bug I cannot reproduce but it is affecting
people.
Fixes: https://github.com/nodejs/node/issues/26366
PR-URL: https://github.com/nodejs/node/pull/26402
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-09-19 21:03:46 +01:00
Luigi Pinca
3ee076f03d
stream: ensure writable.destroy() emits error once
...
Prevent the `'error'` event from being emitted multiple times if
`writable.destroy()` is called with an error before the `_destroy()`
callback is called.
Emit the first error, discard all others.
PR-URL: https://github.com/nodejs/node/pull/26057
Backport-PR-URL: https://github.com/nodejs/node/pull/28000
Fixes: https://github.com/nodejs/node/issues/26015
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-09-19 17:10:42 +01:00
Sam Roberts
a7e5fe1f06
test: unskip tests that now pass on AIX
...
One skipped test remains, it creates very large Buffer objects,
triggering the AIX OOM to kill node and its parent processes.
See: https://github.com/nodejs/build/issues/1849#issuecomment-514414165
PR-URL: https://github.com/nodejs/node/pull/29054
Backport-PR-URL: https://github.com/nodejs/node/pull/29599
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-09-19 10:54:38 +01:00
Sam Roberts
65e9b0f5a2
test: specialize OOM check for AIX
...
Assumption that if memory can be malloc()ed it can be used is not true
on AIX. Later access of the allocated pages can trigger SIGKILL if there
are insufficient VM pages.
Use psdanger() to better estimate available memory.
Fixes: https://github.com/nodejs/build/issues/1849
More info:
- https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/generalprogramming/sys_mem_alloc.html
- https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/p_bostechref/psdanger.html
Related to:
- https://github.com/nodejs/build/issues/1820#issuecomment-505998851
- https://github.com/nodejs/node/pull/28469
- https://github.com/nodejs/node/pull/28516
PR-URL: https://github.com/nodejs/node/pull/28857
Backport-PR-URL: https://github.com/nodejs/node/pull/29599
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-09-19 10:54:38 +01:00
Ben Noordhuis
7aca9cb09b
test: fix pty test hangs on aix
...
Some pty tests persistently hung on the AIX CI buildbots. Fix that by
adding a helper script that properly sets up the pty before spawning
the script under test.
On investigation I discovered that the test runner hung when it tried
to close the slave pty's file descriptor, probably due to a bug in
AIX's pty implementation. I could reproduce it with a short C program.
The test runner also leaked file descriptors to the child process.
I couldn't convince python's `subprocess.Popen()` to do what I wanted
it to do so I opted to move the logic to a helper script that can do
fork/setsid/etc. without having to worry about stomping on state in
tools/test.py.
In the process I also uncovered some bugs in the pty module of the
python distro that ships with macOS 10.14, leading me to reimplement
a sizable chunk of the functionality of that module.
And last but not least, of course there are differences between ptys
on different platforms and the helper script has to paper over that.
Of course.
Really, this commit took me longer to put together than I care to admit.
Caveat emptor: this commit takes the hacky ^D feeding to the slave out
of tools/test.py and puts it in the *.in input files. You can also feed
other control characters to tests, like ^C or ^Z, simply by inserting
them into the corresponding input file. I think that's nice.
Fixes: https://github.com/nodejs/build/issues/1820
Fixes: https://github.com/nodejs/node/issues/28489
PR-URL: https://github.com/nodejs/node/pull/28600
Backport-PR-URL: https://github.com/nodejs/node/pull/29599
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-09-19 10:54:38 +01:00
Sam Roberts
588b761fca
test: skip stringbytes-external-exceed-max on AIX
...
Add SKIP status for more tests in stringbytes-external-exceed-max that
are failing on AIX.
PR-URL: https://github.com/nodejs/node/pull/28516
Backport-PR-URL: https://github.com/nodejs/node/pull/29599
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-09-19 10:54:38 +01:00
Sam Roberts
930647d0fe
test: skip tests related to CI failures on AIX
...
These tests seem to trigger failures in the entire CI job (not just the
test) on AIX. Skip them to see if that helps alleviate spurious failures
in node-test-commit-aix (and the upstream PR and commit test jobs).
See:
- https://github.com/nodejs/build/issues/1820#issuecomment-505998851
- https://github.com/nodejs/build/issues/1847#issuecomment-504210708
PR-URL: https://github.com/nodejs/node/pull/28469
Backport-PR-URL: https://github.com/nodejs/node/pull/29599
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-09-19 10:54:38 +01:00
Anna Henningsen
cc282239c1
test: apply test-http2-max-session-memory-leak from v12.x
...
Refs: https://github.com/nodejs/node/pull/27914
Backport-PR-URL: https://github.com/nodejs/node/pull/29124
PR-URL: https://github.com/nodejs/node/pull/29122
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-15 17:39:14 +01:00
Anna Henningsen
6d687f7af8
http2: pause input processing if sending output
...
If we are waiting for the ability to send more output, we should not
process more input. This commit a) makes us send output earlier,
during processing of input, if we accumulate a lot and b) allows
interrupting the call into nghttp2 that processes input data
and resuming it at a later time, if we do find ourselves in a position
where we are waiting to be able to send more output.
This is part of mitigating CVE-2019-9511/CVE-2019-9517.
Backport-PR-URL: https://github.com/nodejs/node/pull/29124
PR-URL: https://github.com/nodejs/node/pull/29122
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-15 17:38:31 +01:00
Anna Henningsen
10f05b65c4
http2: handle 0-length headers better
...
Ignore headers with 0-length names and track memory for headers
the way we track it for other HTTP/2 session memory too.
This is intended to mitigate CVE-2019-9516.
Backport-PR-URL: https://github.com/nodejs/node/pull/29124
PR-URL: https://github.com/nodejs/node/pull/29122
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-15 17:37:57 +01:00
Anna Henningsen
ac28a628a5
http2: limit number of invalid incoming frames
...
Limit the number of invalid input frames, as they may be pointing towards a
misbehaving peer. The limit is currently set to 1000 but could be changed or
made configurable.
This is intended to mitigate CVE-2019-9514.
[This commit differs from the v12.x one due to the lack of
https://github.com/libuv/libuv/commit/ee24ce900e5714c950b248da2b .
See the comment in the test for more details.]
Backport-PR-URL: https://github.com/nodejs/node/pull/29124
PR-URL: https://github.com/nodejs/node/pull/29122
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-15 17:37:28 +01:00
Anna Henningsen
7de642b6f9
http2: do not create ArrayBuffers when no DATA received
...
Lazily allocate `ArrayBuffer`s for the contents of DATA frames.
Creating `ArrayBuffer`s is, sadly, not a cheap operation with V8.
This is part of performance improvements to mitigate CVE-2019-9513.
Together with the previous commit, these changes improve throughput
in the adversarial case by about 100 %, and there is little more
that we can do besides artificially limiting the rate of incoming
metadata frames (i.e. after this patch, CPU usage is virtually
exclusively in libnghttp2).
[This backport also applies changes from 83e1b97443 and required
some manual work due to the lack of `AllocatedBuffer` on v10.x.
More work was necessary for v8.x, including copying utilities
for `util.h` from more recent Node.js versions.]
Refs: https://github.com/nodejs/node/pull/26201
Backport-PR-URL: https://github.com/nodejs/node/pull/29124
PR-URL: https://github.com/nodejs/node/pull/29122
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-15 17:36:46 +01:00
Anthony Tuininga
d3de1ed653
n-api: improve performance creating strings
...
Improve performance creating strings using N-API by ensuring that the
strings are not internalized.
Added test cases for latin-1 and utf-16 strings.
PR-URL: https://github.com/nodejs/node/pull/26439
Fixes: https://github.com/nodejs/node/issues/26437
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-15 23:50:11 -04:00
John Barboza
3128cb7da6
test: avoid running fsync on directory on AIX
...
On AIX the underlying fsync system call returns EBADF on a file
descriptor for an open directory. So avoid running fsync on it.
PR-URL: https://github.com/nodejs/node/pull/21298
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com >
2019-03-21 11:59:41 +00:00
Ben Noordhuis
7573b55a15
tls: fix legacy SecurePair clienthello race window
...
There is a time window between the first and the last step of processing
the clienthello event and the SecurePair may have been destroyed during
that interval.
Fixes: https://github.com/nodejs/node/issues/26428
PR-URL: https://github.com/nodejs/node/pull/26452
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
2019-03-20 23:53:42 +00:00
Brian White
ac9b8f7645
http: fix error check in Execute()
...
`http_parser_execute(..., nullptr, 0)` returns either `0` or `1`. The
expectation is that no error must be returned if it is `0`, and if
it is `1` - a `Error` object must be returned back to user.
The introduction of `llhttp` and the refactor that happened during it
accidentally removed the error-returning code. This commit reverts it
back to its original state.
Backport-PR-URL: https://github.com/nodejs/node/pull/25938
Fix : #24585
PR-URL: #24738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-20 17:16:10 +00:00
Julien Gilli
1d862610f8
http: attach reused parser to correct domain
...
Reused parsers can be attached to the domain that corresponds to the
active domain when the underlying socket was created, which is not
necessarily correct.
Instead, we attach parsers to the active domain if there is one when
they're reused from the pool.
Refs: https://github.com/nodejs/node/issues/25456
PR-URL: https://github.com/nodejs/node/pull/25459
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-20 16:06:39 +00:00
Gabriel Schulhof
d6ffabc37f
n-api: mark thread-safe function as stable
...
Fixes: https://github.com/nodejs/node/issues/24249
PR-URL: https://github.com/nodejs/node/pull/25556
Backport-PR-URL: https://github.com/nodejs/node/pull/25648
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-03-19 23:56:33 +00:00
Matteo Collina
b4c5435a46
test: add process.stdin.end() TTY regression test
...
Backport-PR-URL: https://github.com/nodejs/node/pull/25351
PR-URL: https://github.com/nodejs/node/pull/23051
Fixes: https://github.com/nodejs/node/issues/22814
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-19 22:55:59 +00:00
Anna Henningsen
c56f3edb10
test: add stdin writable regression test
...
Make sure that `process.stdin.write()`, and in particular
ending the stream, works.
Backport-PR-URL: https://github.com/nodejs/node/pull/25351
PR-URL: https://github.com/nodejs/node/pull/23053
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-19 22:55:34 +00:00
Anna Henningsen
ea5628e77a
process: allow reading from stdout/stderr sockets
...
Allow reading from stdio streams that are conventionally
associated with process output, since this is only convention.
This involves disabling the oddness around closing stdio
streams. Its purpose is to prevent the file descriptors
0 through 2 from being closed, since doing so can lead
to information leaks when new file descriptors are being
opened; instead, not doing anything seems like a more
reasonable choice.
Fixes: https://github.com/nodejs/node/issues/21203
Backport-PR-URL: https://github.com/nodejs/node/pull/25351
PR-URL: https://github.com/nodejs/node/pull/23053
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-19 22:55:13 +00:00
Anna Henningsen
1a9582b7a6
tools: allow input for TTY tests
...
Since faking TTY input is not otherwise fake-able, we need
support in the test runner for it.
Backport-PR-URL: https://github.com/nodejs/node/pull/25351
PR-URL: https://github.com/nodejs/node/pull/23053
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-19 22:54:39 +00:00
Richard Lau
f6ff8c51bc
test: fix module loading error for AIX 7.1
...
AIX 7.1 appears to return a different error message compared to AIX 6.1.
PR-URL: https://github.com/nodejs/node/pull/25418
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-03-15 18:55:47 +00:00
Rich Trott
d4b6643ac3
test: mark test-cli-node-options flaky on arm
...
Refs: https://github.com/nodejs/node/issues/25028
PR-URL: https://github.com/nodejs/node/pull/25032
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2019-02-28 23:40:11 +11:00
Gireesh Punathil
60db455961
test: mark test_threadsafe_function/test as flaky
...
The test fails consistently on windows-fanned with vs2017.
mark it as flaky while the issue is being progressed, and
to keep CI green / amber.
Ref: https://github.com/nodejs/node/issues/23621
Backport-PR-URL: https://github.com/nodejs/node/pull/25002
PR-URL: https://github.com/nodejs/node/pull/24714
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-02-28 23:40:11 +11:00
Gabriel Schulhof
367505940a
n-api: guard against cond null dereference
...
A condition variable is only created by the thread-safe function if the
queue size is set to something larger than zero. This adds null-checks
around the condition variable and tests for the case where the queue
size is zero.
Fixes: https://github.com/nodejs/help/issues/1387
PR-URL: https://github.com/nodejs/node/pull/21871
Backport-PR-URL: https://github.com/nodejs/node/pull/25002
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-02-28 23:40:10 +11:00
Gabriel Schulhof
759a0180b5
n-api: add API for asynchronous functions
...
Bundle a `uv_async_t`, a `uv_idle_t`, a `uv_mutex_t`, a `uv_cond_t`,
and a `v8::Persistent<v8::Function>` to make it possible to call into JS
from another thread. The API accepts a void data pointer and a callback
which will be invoked on the loop thread and which will receive the
`napi_value` representing the JavaScript function to call so as to
perform the call into JS. The callback is run inside a
`node::CallbackScope`.
A `std::queue<void*>` is used to store calls from the secondary
threads, and an idle loop is started by the `uv_async_t` callback on the
loop thread to drain the queue, calling into JS with each item.
Items can be added to the queue blockingly or non-blockingly.
The thread-safe function can be referenced or unreferenced, with the
same semantics as libuv handles.
Re: https://github.com/nodejs/help/issues/1035
Re: https://github.com/nodejs/node/issues/20964
Fixes: https://github.com/nodejs/node/issues/13512
Backport-PR-URL: https://github.com/nodejs/node/pull/25002
PR-URL: https://github.com/nodejs/node/pull/17887
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-02-28 23:40:10 +11:00
Anna Henningsen
fbafe8d311
test: fix test-repl-envvars
...
In 180f86507d , the test was changed
so that the `env` argument of `createInternalRepl()` also contained
external environment variables, because keeping them can be necessary
for spawning processes on some systems.
However, this test does not spawn new processes, and relies on the
fact that the environment variables it tests are not already set
(and fails otherwise); therefore, reverting to the original state
should fix this.
Fixes: https://github.com/nodejs/node/issues/21451
Fixes: https://github.com/nodejs/build/issues/1377
Refs: https://github.com/nodejs/node/pull/25219
PR-URL: https://github.com/nodejs/node/pull/25226
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-02-28 23:40:10 +11:00
Matteo Collina
76d52c508a
http: prevent slowloris with keepalive connections
...
Fixes: https://github.com/nodejs-private/security/issues/214
PR-URL: https://github.com/nodejs-private/node-private/pull/162
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-02-27 21:32:34 +11:00
cjihrig
446f8b54e5
http: add maxHeaderSize property
...
This commit exposes the value of --max-http-header-size
as a property of the http module.
Backport-PR-URL: https://github.com/nodejs/node/pull/25218
PR-URL: https://github.com/nodejs/node/pull/24860
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-25 10:08:13 -05:00
cjihrig and Matteo Collina
693e362175
cli: add --max-http-header-size flag
...
Allow the maximum size of HTTP headers to be overridden from
the command line.
Backport-PR-URL: https://github.com/nodejs/node/pull/25171
co-authored-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs/node/pull/24811
Fixes: https://github.com/nodejs/node/issues/24692
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-12-21 23:55:14 -05:00
Rich Trott
e1fbc26c6a
test: move test-benchmark-path to sequential
...
Fixes: https://github.com/nodejs/node/issues/18254
PR-URL: https://github.com/nodejs/node/pull/21393
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
2018-12-21 23:55:14 -05:00
Rich Trott
aef71c05a2
test: mark test-http2-settings-flood as flaky on Windows
...
Refs: https://github.com/nodejs/node/issues/25043
PR-URL: https://github.com/nodejs/node/pull/25048
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2018-12-21 23:55:13 -05:00
Gerhard Stoebich
4c24a82a65
http2: fix sequence of error/close events
...
Correct sequence of emitting `error` and `close` events for a
`Http2Stream`.
PR-URL: https://github.com/nodejs/node/pull/24789
Refs: https://github.com/nodejs/node/pull/22850
Refs: https://github.com/nodejs/node/pull/24685
Fixes: https://github.com/nodejs/node/issues/24559
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-12-11 16:28:47 +00:00
Myles Borins
394cb42962
test: verify order of error in h2 server stream
...
Currently the order of error / closing of an h2 stream is consistent
in 10.x, 11.x, and master. There appears to be an unexpected behavior
difference in 8.x. This test will be used to bisect the commit that will
fix this behavior change and ensure there are no future regressions.
PR-URL: https://github.com/nodejs/node/pull/24685
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-11 15:45:52 +00:00
Ruben Bridgewater
62fb5dbec5
assert: revert breaking change
...
It was not intended to change the `assert.doesNotThrow()` message
with https://github.com/nodejs/node/pull/23223 . This reverts the
breaking behavior to the one before.
PR-URL: https://github.com/nodejs/node/pull/24786
Refs: https://github.com/nodejs/node/pull/23223
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
2018-12-11 15:18:30 +00:00
Divyanshu Singh
5e09a3d4ed
test: test process.setuid for bad argument types
...
Test process.setuid with an object as an argument. An equivalent test
exists for process.seteuid.
PR-URL: https://github.com/nodejs/node/pull/19703
Fixes: https://github.com/nodejs/node/issues/19591
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-04 17:48:40 +00:00
fatahn
970164f3a8
test: improve assert message
...
Use the default assert.strictEqual() message so that unequal values are
shown in the event of an AssertionError.
PR-URL: https://github.com/nodejs/node/pull/19629
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-12-04 17:48:24 +00:00
Forrest Wolf
086570e4e1
test: remove third argument from call to assert.strictEqual()
...
Remove the message argument from call to assert.strictEqual so
that the AssertionError will report the value of er.code, and add
a comment with the message.
PR-URL: https://github.com/nodejs/node/pull/19659
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-12-04 17:48:03 +00:00
Rich Trott
a7b3274af4
test: fix flaky test-cluster-send-handle-twice
...
Use `common.mustCall()` to make sure connection callback runs exactly
once.
Use `connect` event instead of `setTimeout` to avoid test failing if
timer runs before client is connected.
Remove `cluster.worker.disconnect()` after `assert.fail()`. It is
unreachable code that is unnecessary.
PR-URL: https://github.com/nodejs/node/pull/19700
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-04 15:44:11 +00:00
Ujjwal Sharma
1bda58289a
test: rename regression tests more expressively
...
- Rename test-fs-truncate-GH-6233 to test-fs-truncate-clear-file-zero
- Rename test-process-exit-GH-12322 to test-process-exit-handler
PR-URL: https://github.com/nodejs/node/pull/19668
Refs: https://github.com/nodejs/node/issues/19105
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-04 15:40:17 +00:00
Arian Santrach
bd9cc92e8d
test: remove 3rd argument from assert.strictEqual
...
If there is an AssertionError, the string literal is printed and not the
value of `r`. For debugging purposes, it is good to know if `r` is false
or null or something else.
PR-URL: https://github.com/nodejs/node/pull/19707
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-12-04 15:39:35 +00:00
Daniel Bevenius
3ca10faf00
test: use createReadStream instead of ReadStream
...
This commit updates test-fs-read-stream to use fs.createReadStream
instead of using fs.ReadStream. All other places in this test use
the former.
PR-URL: https://github.com/nodejs/node/pull/19636
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-04 15:35:45 +00:00
jaspal-yupana
8a546e822d
test: removed default message from assert.strictEqual
...
Use the `assert.strictEqual()` default message instead of a static
message to include the actual and expected value.
PR-URL: https://github.com/nodejs/node/pull/19660
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-04 15:35:09 +00:00
Luigi Pinca
a62df1b379
test: refactor test-net-dns-error
...
- Use `common.mustCall()` and `common.mustNotCall()`.
- Use ternary operator.
PR-URL: https://github.com/nodejs/node/pull/19640
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-04 15:34:45 +00:00
Rich Trott
8a0ecf4360
test: refactor test-http-expect-continue
...
Use common.mustCall() where appropriate. Remove some logic that is not
required when common.mustCall() is used (incrementor/decrementor to make
sure everything is called the same number of times).
PR-URL: https://github.com/nodejs/node/pull/19625
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-04 15:33:18 +00:00
Tobias Nießen
0cbe813e90
test: update link according to NIST bibliography
...
According to NIST SP 800 38D, this is the document the link orginally
pointed to.
Fixes: https://github.com/nodejs/node/issues/17619
PR-URL: https://github.com/nodejs/node/pull/19593
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-12-04 11:53:05 +00:00