Commit Graph

860 Commits

Author SHA1 Message Date
Joyee Cheung
4d0aeed4a6 test: deflake test-perf-hooks.js
Previously when checking the initial timing we did a lot of checks
after accessing and copying timing.duration and before we check
that timing.duration is roughly the same as performance.now(),
which can lead to flakes if the overhead of the checking is
big enough. Update the test to check timing.duration against
performance.now() as soon as possible when it's copied instead
of computed.
:#

PR-URL: https://github.com/nodejs/node/pull/49892
Refs: https://github.com/nodejs/reliability/issues/676
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-09-29 18:14:01 +02:00
Luigi Pinca
480ab8c3a4
Revert "test: mark test-http-regr-gh-2928 as flaky"
This reverts commit 48fcb205e4.

Refs: https://github.com/nodejs/node/commit/18e00a577d74
PR-URL: https://github.com/nodejs/node/pull/49708
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2023-09-20 18:31:47 +00:00
Livia Medeiros
cdad3d8fe5
test: use fs.constants for fs.access constants
PR-URL: https://github.com/nodejs/node/pull/49685
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-09-20 07:14:37 +00:00
Luigi Pinca
18e00a577d test: deflake test-http-regr-gh-2928
Hard code the value of the host parameter to `common.localhostIPv4` in
`server.listen()` and `net.connect()`. This

1. ensures that the client `socket._handle` is not reinitialized during
   connection due to the family autodetection algorithm, preventing
   `parser.consume()` from being called with an invalid `socket._handle`
   parameter.
2. works around an issue in the FreeBSD 12 machine where the stress test
   is run where some sockets get stuck after connection.

PR-URL: https://github.com/nodejs/node/pull/49574
Closes: https://github.com/nodejs/node/pull/49565
Fixes: https://github.com/nodejs/node/issues/49564
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-09-18 20:16:24 +02:00
Joyee Cheung
b45e196bec
test: show more info on failure in test-cli-syntax-require.js
Use spawnSyncAndExit() to show more info when the tes fails.

PR-URL: https://github.com/nodejs/node/pull/49561
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
2023-09-12 17:02:51 +00:00
William Marlow
d8b378cb3f
fs: fix readdir and opendir recursive with unknown file types
If the libuv operations invoked by `readdir`/`opendir` return
`uv_dirent_t` values where the `type` is `UV_DIRENT_UNKNOWN` then a
further `lstat` is issued to fully construct the `Dirent` values. In the
recursive versions of these functions, the `path` parameter was
incorrectly assumed to be the path to the entry when it should be the
path to the directory containing the entry.

Fixes #49499.

PR-URL: https://github.com/nodejs/node/pull/49603
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-09-11 19:08:08 +00:00
Joyee Cheung
48fcb205e4
test: mark test-http-regr-gh-2928 as flaky
It has been flaky for more than a year. Mark it as flaky to avoid
blocking the CI.

PR-URL: https://github.com/nodejs/node/pull/49565
Refs: https://github.com/nodejs/reliability/issues/658
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
2023-09-11 16:39:49 +00:00
Joyee Cheung
65d396b0a0 test: use spawnSyncAndExitWithoutError in sea tests
To display more information when the command fails.

PR-URL: https://github.com/nodejs/node/pull/49543
Refs: https://github.com/nodejs/reliability/issues/658
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-09-11 16:39:37 +00:00
Jithil P Ponnan
54021850f9 process: add custom dir support for heapsnapshot-signal
PR-URL: https://github.com/nodejs/node/pull/47854
Refs: https://github.com/nodejs/node/issues/47842
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
2023-09-05 15:13:01 -07:00
Joyee Cheung
7f001c2299
test: make test-worker-prof more robust
Use a JS workload instead of repeating FS operations and use a
timer to make it less flaky on machines with little resources.

PR-URL: https://github.com/nodejs/node/pull/49274
Refs: https://github.com/nodejs/node/issues/26401
Refs: https://github.com/nodejs/reliability/issues/640
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-09-04 21:53:59 +00:00
Joyee Cheung
5c9daf4583 sea: generate code cache with deserialized isolate
V8 now requires code cache to be compiled from an isolate with the
same RO space layout as the one that's going to deserialize the
cache, so for a binary built with snapshot, we need to compile
the code cache using a deserialized isolate.

Drive-by: ignore "useCodeCache" when "useSnapshot" is true because
the compilation would've been done during build time anyway in
that case, and print a warning for it.

PR-URL: https://github.com/nodejs/node/pull/49226
Refs: https://github.com/nodejs/node-v8/issues/252
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-22 16:56:04 +00:00
Livia Medeiros
052434a0c1
test: use tmpdir.resolve()
PR-URL: https://github.com/nodejs/node/pull/49136
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-21 16:41:53 +00:00
Joyee Cheung
ecde9d9640
test: make test-perf-hooks more robust and work with workers
Previously the test makes several assumptions about the absolute
values of the nodeTiming fields, which can make the test flaky
on slow machines. This patch rewrites the test to check the
relative values instead. It also updates the test to make it
work with workers instead of directly skipping in workers.

PR-URL: https://github.com/nodejs/node/pull/49197
Refs: https://github.com/nodejs/reliability/issues/638
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-08-18 11:49:56 +00:00
Ethan Arrowood
27cadf5e93
fs: fix readdir recursive sync & callback
Refs: https://github.com/nodejs/node/issues/48640
PR-URL: https://github.com/nodejs/node/pull/48698
Fixes: https://github.com/nodejs/node/issues/48858
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-12 20:55:36 +00:00
Chemi Atlow
35f2b42d06
test: stabilize the inspector-open-dispose test
Ref: https://ci.nodejs.org/job/node-test-commit-osx-arm/nodes\=osx11/12543/console, https://github.com/nodejs/reliability/issues/631
PR-URL: https://github.com/nodejs/node/pull/49000
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-11 13:05:01 +00:00
Antoine du Hamel
a973446b91
test: use spawn and spawnPromisified instead of exec
PR-URL: https://github.com/nodejs/node/pull/48991
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-08-05 07:29:53 +00:00
rogertyang
556b1ca900 tls: fix bugs of double TLS
Fixs two issues in `TLSWrap`, one of them is reported in
https://github.com/nodejs/node/issues/30896.

1. `TLSWrap` has exactly one `StreamListener`, however,
that `StreamListener` can be replaced. We have not been
rigorous enough here: if an active write has not been
finished before the transition, the finish callback of it
will be wrongly fired the successor `StreamListener`.

2. A `TLSWrap` does not allow more than one active write,
as checked in the assertion about current_write in
`TLSWrap::DoWrite()`.

However, when users make use of an existing `tls.TLSSocket`
to establish double TLS, by
either
  tls.connect({socket: tlssock})
or
  tlsServer.emit('connection', tlssock)
we have both of the user provided `tls.TLSSocket`, tlssock and
a brand new created `TLSWrap` writing to the `TLSWrap` bound to
tlssock, which easily violates the constranint because two writers
have no idea of each other.

The design of the fix is:
when a `TLSWrap` is created on top of a user provided socket,
do not send any data to the socket until all existing writes
of the socket are done and ensure registered callbacks of
those writes can be fired.

PR-URL: https://github.com/nodejs/node/pull/48969
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2023-08-04 10:14:18 -04:00
Antoine du Hamel
384f5d44a8
test: fix some assumptions in tests
Some tests are assuming they will be run from a directory that do not
contain any quote or special character in its path. That assumption is
not necessary, using `JSON.stringify` or `pathToFileURL` ensures the
test can be run whatever the path looks like.

PR-URL: https://github.com/nodejs/node/pull/48958
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-07-31 13:09:07 +00:00
Darshan Sen
6cd678965f
sea: add support for V8 bytecode-only caching
Refs: https://github.com/nodejs/single-executable/issues/73
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/48191
Fixes: https://github.com/nodejs/single-executable/issues/73
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-07-26 10:10:35 +00:00
Joyee Cheung
ac34e7561a
src: support snapshot in single executable applications
This patch adds snapshot support to single executable applications.
To build a snapshot from the main script when preparing the
blob that will be injected into the single executable application,
add `"useSnapshot": true` to the configuration passed to
`--experimental-sea-config`. For example:

```
{
    "main": "snapshot.js",
    "output": "sea-prep.blob",
    "useSnapshot": true
}
```

The main script used to build the snapshot must invoke
`v8.startupSnapshot.setDeserializeMainFunction()` to configure the
entry point. The generated startup snapshot would be part of the
preparation blob and get injected into the final executable.

When the single executable application is launched, instead of running
the `main` script from scratch, Node.js would instead deserialize the
snapshot to get to the state initialized during build-time directly.

PR-URL: https://github.com/nodejs/node/pull/46824
Refs: https://github.com/nodejs/single-executable/discussions/57
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-07-20 22:57:00 +00:00
Antoine du Hamel
3ce51ae9c0
module: harmonize error code between ESM and CJS
PR-URL: https://github.com/nodejs/node/pull/48606
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-07-04 09:52:56 +00:00
Moshe Atlow
9dc2d1b964
test: fix flaky test-watch-mode
PR-URL: https://github.com/nodejs/node/pull/48147
Fixes: https://github.com/nodejs/node/issues/44898
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-06-08 11:35:14 +00:00
Luigi Pinca
f351c8a6c1
test: refactor test-gc-http-client-timeout
Due to server response delay, all possible requests are created anyway.
Instead of doing `36 * os.availableParallelism()` requests, use a fixed
number.

Refs: https://github.com/nodejs/node/pull/48078#issuecomment-1568183115
PR-URL: https://github.com/nodejs/node/pull/48292
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2023-06-06 15:42:42 +00:00
James M Snell
6d2811fbf2 quic: add additional implementation
* add QUIC_SESSION and QUIC_STREAM to AsyncWrap
* update definitions in quic/bindingdata.h
* fixup minor discrepancies in cid.h/cid.cc
* add convenience operator in struct Path
* fixup defs.h macro definitions
* fixups in quic/preferredaddress.h/cc
* fixups in src/quic/tokens.h/cc
* fixups in quic/transportparams.h/cc
* fixups in quic/tlscontext.h/cc
* add quic/streams.h/cc placeholder
* add quic session/application implementation

PR-URL: https://github.com/nodejs/node/pull/47927
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-05-27 09:43:34 -07:00
Joyee Cheung
e2caafa5bd
src: use Blob{Des|S}erializer for SEA blobs
PR-URL: https://github.com/nodejs/node/pull/47962
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-05-23 17:37:29 +00:00
Yagiz Nizipli
62fd6bc4aa
test: move test-cluster-primary-error flaky test
PR-URL: https://github.com/nodejs/node/pull/48039
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2023-05-17 13:26:05 +00:00
Darshan Sen
2de10f5149
sea: add option to disable the experimental SEA warning
Refs: https://github.com/nodejs/single-executable/discussions/60
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/47588
Fixes: https://github.com/nodejs/node/issues/47741
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-05-04 15:27:54 +00:00
James M Snell
76044c4e2b
quic: add additional QUIC implementation
Adds most of the Endpoint implementation with a few tweaks to
other bits.

PR-URL: https://github.com/nodejs/node/pull/47603
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-04-26 13:27:04 +00:00
Ethan Arrowood
7b39e8099a
fs: add recursive option to readdir and opendir
Adds a naive, linear recursive algorithm for the following methods:
readdir, readdirSync, opendir, opendirSync, and the promise based
equivalents.

Fixes: https://github.com/nodejs/node/issues/34992
PR-URL: https://github.com/nodejs/node/pull/41439
Refs: https://github.com/nodejs/tooling/issues/130
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-04-20 17:50:27 +00:00
James M Snell
1c3d741cb0 quic: add more QUIC implementation
* add TLSContext
* quic: add stat collection utilities
* add Packet
* add NgTcp2CallbackScope/NgHttp3CallbackScope

PR-URL: https://github.com/nodejs/node/pull/47494
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-04-17 17:49:16 -07:00
Yagiz Nizipli
c94be4125b
test: mark test-cluster-primary-error flaky on asan
PR-URL: https://github.com/nodejs/node/pull/47422
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-04-14 03:51:46 +00:00
James M Snell
2d1934aa96 quic: add more QUIC impl
* add BindingData
* add LogStream
* add TransportParams

PR-URL: https://github.com/nodejs/node/pull/47348
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2023-04-09 19:37:33 -07:00
Joyee Cheung
7ece9f3c28 test: move more inspector sequential tests to parallel
This moves sequential inspector tests that can be run in
parallel (using random ports) to parallel.

Before:

```
❯ tools/test.py "test/sequential/test-inspector-*"
[00:07|% 100|+  28|-   0]: Done

All tests passed.
❯ tools/test.py "test/parallel/test-inspector-*"
[00:01|% 100|+  26|-   0]: Done

All tests passed.
```

After:

```
❯ tools/test.py "test/sequential/test-inspector-*"
[00:00|% 100|+   1|-   0]: Done

All tests passed.
❯ tools/test.py "test/parallel/test-inspector-*"
[00:01|% 100|+  53|-   0]: Done

All tests passed.
```

PR-URL: https://github.com/nodejs/node/pull/47412
Refs: https://github.com/nodejs/node/issues/47146
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-04-07 17:47:47 +00:00
Joyee Cheung
13fd068474 test: use random port in test-inspector-enabled
Which makes it possible to run it in parallel.

PR-URL: https://github.com/nodejs/node/pull/47412
Refs: https://github.com/nodejs/node/issues/47146
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-04-07 17:47:46 +00:00
Joyee Cheung
e3621c1a09 test: use random port in test-inspector-debug-brk-flag
Which makes it possible to run it in parallel.

PR-URL: https://github.com/nodejs/node/pull/47412
Refs: https://github.com/nodejs/node/issues/47146
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-04-07 17:47:45 +00:00
Paolo Insogna
8b51c1a869 net: enable autoSelectFamily by default
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/46790
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-04-05 08:31:56 -07:00
Moshe Atlow
25858e3e7c
watch: fix watch path with equals
PR-URL: https://github.com/nodejs/node/pull/47369
Fixes: https://github.com/nodejs/node/issues/47296
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-04-05 08:08:24 +00:00
Moshe Atlow
f6f3e22016 test: fix flaky test-watch-mode-inspect
PR-URL: https://github.com/nodejs/node/pull/47403
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-04-04 16:53:32 -07:00
Joyee Cheung
812e236df9
test: move debugger tests with --port=0 to parallel
Before

```
❯ tools/test.py "sequential/test-debugger*"
[00:25|% 100|+  32|-   0]: Done

All tests passed.
❯ tools/test.py -J "parallel/test-debugger*"
[00:05|% 100|+   6|-   0]: Done

All tests passed.
```

After

```
❯ tools/test.py "sequential/test-debugger*"
[00:06|% 100|+   5|-   0]: Done

All tests passed.
❯ tools/test.py -J "parallel/test-debugger*"
[00:05|% 100|+  33|-   0]: Done

All tests passed.
```

PR-URL: https://github.com/nodejs/node/pull/47274
Refs: https://github.com/nodejs/node/issues/47146
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-05 00:49:46 +02:00
Joyee Cheung
967779b3a1
test: use --port=0 in debugger tests that do not have to work on 9229
To avoid failures when there is another running process occupying
the port 9229 which may happen if there is a stale process, use the
--port argument of node-inspect to use a random port in tests that
don't have to work on port 9229.

The following tests are not touched:

- test-debugger-custom-port: tests a specific port
- test-debugger-debug-brk: tests a specific port
- test-debugger-invalid-args: tests other inspect combinations
- test-debugger-pid: node-inspect does not support -p and --port
  together
- test-debugger-launch: tests that default port is 9229

PR-URL: https://github.com/nodejs/node/pull/47274
Refs: https://github.com/nodejs/node/issues/47146
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-05 00:49:44 +02:00
Tobias Nießen
9e9f68af95
test: mark test-http-max-sockets as flaky on win32
Refs: https://github.com/nodejs/node/issues/47116
PR-URL: https://github.com/nodejs/node/pull/47134
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
2023-03-17 16:33:03 +00:00
Eungyu Lee
f8bf4987e9
debugger: improve validations and documents for watch and unwatch
- debugger: add string validation for watch(expr)
- debugger: add help document for watch(index)
- test: add test for watch(index) command
- doc: add information on unwatch(index) option

PR-URL: https://github.com/nodejs/node/pull/46947
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2023-03-13 04:29:53 +00:00
Eungyu Lee
7f2ab4e629
debugger: add a command to set which lines to check for context
PR-URL: https://github.com/nodejs/node/pull/46812
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2023-03-12 04:47:18 +00:00
Abdirahim Musse
5012ab4e86
test: fallback to IPv4 if IPv6 is unavailable
openssl seems to default to use IPv6.
This change adds a checks if IPv6 is unavailable and uses IPv4 instead.
On the Node.js CI IBM i build system IPv6 is currently disabled.
This change should resolve the following test case failures:
- https://ci.nodejs.org/job/node-test-commit-ibmi/nodes=ibmi73-ppc64/1085/testReport/(root)/test/sequential_test_tls_psk_client_/
- https://ci.nodejs.org/job/node-test-commit-ibmi/nodes=ibmi73-ppc64/1085/testReport/(root)/test/sequential_test_tls_securepair_client_/

PR-URL: https://github.com/nodejs/node/pull/47017
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-03-11 06:26:25 +00:00
ywave620
7a37829ccb
src: fix cb scope bugs involved in termination
Be more aggresive to clean up the async id stack,
and ensure the cleanup when terminating.

Calling SetIdle() when terminating is not harmless.
When node terminates due to an unhandled exception,
v8 preseves the vm state, which is JS and notifies
node through PerIsolateMessageListener(). If node
calls SetIdle() later, v8 complains because it
requires the vm state to either be EXTERNEL or IDLE
when embedder calling SetIdle().

PR-URL: https://github.com/nodejs/node/pull/45596
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-02-28 03:17:46 +00:00
Debadree Chatterjee
5b5898ac86
lib,src: update exit codes as per todos
Refs: https://github.com/nodejs/node/pull/44746
PR-URL: https://github.com/nodejs/node/pull/45841
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-02-26 17:03:06 +00:00
James M Snell
950cec4c26 src: update Blob implementation to use DataQueue / File-backed Blobs
Co-authored-by: flakey5 <73616808+flakey5@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/45258
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-02-19 16:26:58 -08:00
Deokjin Kim
88d71dc301
lib: refactor to use min/max of validateNumber
Fix NumberIsNaN is called two times and change error code
to ERR_OUT_OF_RANGE when RangeError is occurred in test.

PR-URL: https://github.com/nodejs/node/pull/45772
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-02-03 21:12:05 +00:00
Ben Noordhuis
3700d9edf7
src: fix c++ exception on bad command line arg
Replace stoull() with strtoull(). The former throws an exception when
the input is malformed, the latter doesn't.

Fixes: https://github.com/nodejs/node/issues/46223
PR-URL: https://github.com/nodejs/node/pull/46290
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-01-22 10:39:16 +00:00
Deokjin Kim
d8014f6aa9 test: use os.availableParallelism()
Refs: https://github.com/nodejs/node/pull/45895
PR-URL: https://github.com/nodejs/node/pull/46003
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-01-11 20:07:56 +00:00