824 Commits
Author SHA1 Message Date
Yagiz Nizipli 3b2cee071b 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-07-07 00:06:14 +03:00
Ethan Arrowood 7273ef53b3 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-07-07 00:06:07 +03:00
James M Snell 75d7024ecd 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-07-07 00:06:06 +03:00
Yagiz Nizipli 3a9c43a6d7 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-07-07 00:06:05 +03:00
James M Snell 24840832bd 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-07-07 00:06:03 +03:00
Joyee Cheung 8820d5415b 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-07-07 00:06:03 +03:00
Joyee Cheung f6ef5c4ad3 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-07-07 00:06:03 +03:00
Joyee Cheung e97ceeca69 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-07-07 00:06:03 +03:00
Moshe Atlow d3e0229948 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-07-07 00:06:02 +03:00
Moshe Atlow a779261732 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-07-07 00:06:02 +03:00
Joyee Cheung 116df2ad3e 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-07-07 00:06:02 +03:00
Joyee Cheung 016b8bd27d 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-07-07 00:06:02 +03:00
Tobias Nießen 713b412ee9 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-07-06 11:09:26 -04:00
Eungyu Lee bce37c60ce 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-04-10 22:18:19 -04:00
Eungyu Lee 51253bae83 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-04-10 22:18:18 -04:00
Abdirahim Musse 0edaf016cc 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-04-10 22:18:18 -04:00
ywave620 03e8d824db 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-04-10 20:55:03 -04:00
Ben Noordhuis 26f41b041c 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-03-04 23:03:29 -05:00
Deokjin Kim 257224da0e 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-31 08:04:18 -05:00
Debadree Chatterjee 09ea75823c watch: add CLI flag to preserve output
Fixes: https://github.com/nodejs/node/issues/45713
PR-URL: https://github.com/nodejs/node/pull/45717
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-01-03 08:39:16 -05:00
Stefan Stojanovic 13d2df3c20 test: fix test-watch-mode
Refs: https://github.com/nodejs/node/issues/44898
PR-URL: https://github.com/nodejs/node/pull/45585
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-01-03 08:39:08 -05:00
Stefan Stojanovic 3a5a2ae2ea test: fix test-watch-mode-inspect
Refs: https://github.com/nodejs/node/issues/44898
PR-URL: https://github.com/nodejs/node/pull/45586
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-01-03 08:39:08 -05:00
Moshe Atlow 24bfe543c5 watch: watch for missing dependencies
PR-URL: https://github.com/nodejs/node/pull/45348
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
2023-01-03 08:38:47 -05:00
Luke Karrys 03a3f30cb1 test: convert test-debugger-pid to async/await
PR-URL: https://github.com/nodejs/node/pull/45179
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-01-03 08:38:33 -05:00
Moshe Atlow a8030b9517 test: watch mode inspect restart repeatedly
PR-URL: https://github.com/nodejs/node/pull/45060
Fixes: https://github.com/nodejs/node/issues/44805
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-01-03 08:38:20 -05:00
Pierrick Bouvier 868b4a3d67 test: mark test-watch-mode* as flaky on all platforms
This was confirmed flaky on those platforms:
- Windows x64
- Windows on Arm
- Linux
- Freebsd

Tests randomly fail because of bad order in messages expected, which
seems related to threads scheduling at execution.

PR-URL: https://github.com/nodejs/node/pull/45049
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-01-03 08:38:17 -05:00
Rich Trott e5928abef7 test: remove unnecessary noop function args to mustCall()
PR-URL: https://github.com/nodejs/node/pull/45027
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-01-03 08:38:14 -05:00
Madhuri 657756fc06 test: refactor promises to async/await
PR-URL: https://github.com/nodejs/node/pull/44980
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2023-01-03 08:38:09 -05:00
Moshe Atlow b9b671f25f test: debug watch mode inspect
PR-URL: https://github.com/nodejs/node/pull/44861
Refs: https://github.com/nodejs/node/issues/44805
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-10-11 09:10:13 -04:00
Richard Lau c54cee1c3f test: check server status in test-tls-psk-client
Add assertions to sequential/test-tls-psk-client to check if the
spawned OpenSSL server has exited in any way except for the expected
termination by the cleanUp() function. The added assertions will
prevent the test from spinning forever trying to connect to the
non-existent server in the case that the spawned process has exited.
Include stderr and stdout in the assertion failure message to aid
debugging.

PR-URL: https://github.com/nodejs/node/pull/44824
Refs: https://github.com/nodejs/node/issues/44821
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-10-05 11:54:19 +01:00
pete3249 ee3c6a4dc5 test: use async/await in test-debugger-exceptions
PR-URL: https://github.com/nodejs/node/pull/44690
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:54:17 +01:00
Chandana 9f14625fe5 test: use async/await in test-debugger-help
PR-URL: https://github.com/nodejs/node/pull/44686
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:54:17 +01:00
mmeenapriya 8033ad846b test: update test-debugger-scripts to use await/async
PR-URL: https://github.com/nodejs/node/pull/44692
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:54:17 +01:00
Monu-Chaudhary d2f36169f3 test: use async/await in test-debugger-random-port-with-inspect-port
PR-URL: https://github.com/nodejs/node/pull/44695
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:54:17 +01:00
Brinda Ashar ddf029725b test: use async/await in test-debugger-heap-profiler
PR-URL: https://github.com/nodejs/node/pull/44693
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:54:16 +01:00
samyuktaprabhu 117f068250 test: use async/await in test-debugger-auto-resume
PR-URL: https://github.com/nodejs/node/pull/44675
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:54:16 +01:00
Rathi N Das 143c428cae test: migrated from Promise chains to Async/Await
PR-URL: https://github.com/nodejs/node/pull/44674
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2022-10-05 11:54:16 +01:00
Juliet Zhang e609a3309c test: change promises to async/await in test-debugger-backtrace.js
PR-URL: https://github.com/nodejs/node/pull/44677
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-10-05 11:54:15 +01:00
Hope Olaidé eeabd23ca6 test: use async/await in test-debugger-sb-before-load
PR-URL: https://github.com/nodejs/node/pull/44697
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-10-05 11:54:15 +01:00
Divya Mohan f8b2d7a059 test: refactor to async/await
PR-URL: https://github.com/nodejs/node/pull/44694
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:52:58 +01:00
Priya Shastri 9864bde9ab test: modify test-debugger-custom-port.js to use async-await
PR-URL: https://github.com/nodejs/node/pull/44680
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:52:57 +01:00
Archana Kamath 0fb669e31f test: update test-debugger-breakpoint-exists.js to use async/await
PR-URL: https://github.com/nodejs/node/pull/44682
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:52:57 +01:00
poorvitusam cca253503e test: use async/await in test-debugger-preserve-breaks
PR-URL: https://github.com/nodejs/node/pull/44696
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:52:56 +01:00
surbhirjain 0b2e8b1681 test: use async/await in test-debugger-profile
PR-URL: https://github.com/nodejs/node/pull/44684
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:52:56 +01:00
Ankita Khiratkar 4db72a65cf test: change the promises to async/await in test-debugger-exec-scope.js
PR-URL: https://github.com/nodejs/node/pull/44685
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-10-05 11:52:56 +01:00
Moshe Atlow 3c1e9d41c8 test_runner: support using --inspect with --test
PR-URL: https://github.com/nodejs/node/pull/44520
Backport-PR-URL: https://github.com/nodejs/node/pull/44813
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-10-04 11:28:56 +01:00
Moshe Atlow 36227ed862 test: fix watch mode test flake
PR-URL: https://github.com/nodejs/node/pull/44739
Backport-PR-URL: https://github.com/nodejs/node/pull/44815
Fixes: https://github.com/nodejs/node/issues/44735
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-10-02 11:11:23 +01:00
Moshe Atlow 3abd71a0ea test: deflake watch mode tests
PR-URL: https://github.com/nodejs/node/pull/44621
Backport-PR-URL: https://github.com/nodejs/node/pull/44815
Fixes: https://github.com/nodejs/node/issues/44655
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-10-02 11:10:57 +01:00
Moshe Atlow 0c9f38f2be test: split watch mode inspector tests to sequential
PR-URL: https://github.com/nodejs/node/pull/44551
Backport-PR-URL: https://github.com/nodejs/node/pull/44815
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
2022-10-02 11:10:36 +01:00
Madhulika Sharma b512436841 test: change promises to async/await
PR-URL: https://github.com/nodejs/node/pull/44683
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-09-26 19:07:48 -03:00