Commit Graph

903 Commits

Author SHA1 Message Date
Antoine du Hamel
1fcb128771
test: do not assume process.execPath contains no spaces
We had a bunch of tests that would fail if run from an executable that
contains any char that should be escaped when run from a shell.

PR-URL: https://github.com/nodejs/node/pull/55028
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-22 13:03:30 +00:00
Luigi Pinca
a6ed2148a0
test: move test-http-max-sockets to parallel
PR-URL: https://github.com/nodejs/node/pull/54977
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-09-20 09:57:21 +00:00
Luigi Pinca
636b3432d3
test: remove test-http-max-sockets flaky designation
There is no recent trace of failure for this test.

Fixes: https://github.com/nodejs/node/issues/47116
PR-URL: https://github.com/nodejs/node/pull/54976
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-09-20 09:57:06 +00:00
James M Snell
4b2cab29a5 test: reduce the allocation size in test-worker-arraybuffer-zerofill
Test has been flaky with timeouts in CI. This is possibly due to the
repeated large allocations on the main thread. This commit reduces the
allocation size and makes a number of other cleanups. The main goal
is to hopefully make this test more reliable / not-flaky.

Also move the test to sequential. The frequent large allocations
could be causing the test to be flaky if run parallel to other tests.

PR-URL: https://github.com/nodejs/node/pull/54839
Refs: https://github.com/nodejs/node/issues/52274
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-09-11 22:22:33 -07:00
James M Snell
37834997ff test: reduce stack size for test-error-serdes
Hopefully reduces the run time and the likelihood of the test
failing with a flaky timeout error.

remove test-error-serdes from flaky list

move test-error-serdes to sequential

PR-URL: https://github.com/nodejs/node/pull/54840
Refs: https://github.com/nodejs/node/issues/52630
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-09-11 15:31:23 -07:00
Aviv Keller
5de919b652 test: use node:test in test-cli-syntax.bad
PR-URL: https://github.com/nodejs/node/pull/54513
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-10 08:50:19 -07:00
Yagiz Nizipli
c45b7ec192 test: set test-http-server-request-timeouts-mixed as flaky
PR-URL: https://github.com/nodejs/node/pull/54802
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-09-06 17:02:38 -07:00
Yagiz Nizipli
67ccb3af17 test: set test-single-executable-application-empty as flaky
PR-URL: https://github.com/nodejs/node/pull/54802
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-09-06 17:02:36 -07:00
Yagiz Nizipli
9c6d6de828 test: set test-http2-large-file as flaky
PR-URL: https://github.com/nodejs/node/pull/54802
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-09-06 17:02:24 -07:00
Santiago Gimeno
b345118e1e
test: refactor fs-watch tests due to macOS issue
In `macOS`, fsevents generated immediately before start watching may
leak into the event callback. See: https://github.com/nodejs/node/issues/54450
for an explanation. This might be fixed at some point in `libuv` though
it may take some time (see: https://github.com/libuv/libuv/issues/3866).
This commit comes in anticipation of the soon-to-be-released
`libuv@1.49.0` which was making these tests very flaky.

PR-URL: https://github.com/nodejs/node/pull/54498
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-09-06 17:38:28 +00:00
Michaël Zasso
8966787624
test: run V8 Fast API tests in release mode too
Only keep the call count assertions under `common.isDebug`.

PR-URL: https://github.com/nodejs/node/pull/54570
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-08-30 10:25:01 +00:00
tannal
0b6b2a4dc7
test: merge ongc and gcutil into gc.js
PR-URL: https://github.com/nodejs/node/pull/54355
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-08-29 08:49:52 +01:00
Luigi Pinca
1399d4ea8a
test: use valid hostnames
Use valid hostnames in
`test/sequential/test-net-server-listen-ipv6-link-local.js`.

Refs: https://github.com/nodejs/node/pull/54554
PR-URL: https://github.com/nodejs/node/pull/54556
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-08-25 22:16:25 +00:00
Giovanni Bucci
628469c7e1
net: exclude ipv6 loopback addresses from server.listen
Fixes: https://github.com/nodejs/node/issues/51732
PR-URL: https://github.com/nodejs/node/pull/54264
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-08-23 09:11:43 +00:00
Michaël Zasso
1d35a066e7
src,test: ensure that V8 fast APIs are called
Adds a debug-only macro that can be used to track when a V8 fast API is
called. A map of counters is maintained in in thread-local storage and
an internal API can be called to get the total count associated with
a call id.
Specific tests are added and `crypto.timingSafeEqual` as well as
internal documentation are updated to show how to use the macro
and test fast API calls without running long loops.

PR-URL: https://github.com/nodejs/node/pull/54317
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-08-13 12:37:02 +00:00
Marek Piechut
a8166880f1
watch: reload changes in contents of --env-file
Make sure we watch and reload on env file changes.

Ignore env file in parent process, so child process can reload
current vars when we recreate it.

Fixes: https://github.com/nodejs/node/issues/54001
PR-URL: https://github.com/nodejs/node/pull/54109
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-08-05 10:41:33 +00:00
Daniel Bayley
cff7da7749
src,test: further cleanup references to osx
PR-URL: https://github.com/nodejs/node/pull/53820
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-07-15 20:32:26 +00:00
Tobias Nießen
559212e64c
tls: fix negative sessionTimeout handling
For historical reasons, the second argument of SSL_CTX_set_timeout is a
signed integer, and Node.js has so far passed arbitrary (signed) int32_t
values. However, new versions of OpenSSL have changed the handling of
negative values inside SSL_CTX_set_timeout, and we should shield users
of Node.js from both the old and the new behavior. Hence, reject any
negative values by throwing an error from within createSecureContext.

Refs: https://github.com/openssl/openssl/pull/19082
PR-URL: https://github.com/nodejs/node/pull/53002
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2024-05-18 00:26:11 +00:00
Madhuri
b41ab9d116
test: move test-http-server-request-timeouts-mixed to sequential
PR-URL: https://github.com/nodejs/node/pull/45722
Fixes: https://github.com/nodejs/node/issues/43465
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-05-11 20:07:28 +02:00
Zack
70995bde61
watch: enable passthrough ipc in watch mode
PR-URL: https://github.com/nodejs/node/pull/50890
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-05-09 18:56:30 +00:00
Moshe Atlow
905ab3e9ec
watch: fix arguments parsing
PR-URL: https://github.com/nodejs/node/pull/52760
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
2024-05-02 18:45:40 +00:00
Raz Luvaton
ee4fa77624
test: fix watch test with require not testing pid
PR-URL: https://github.com/nodejs/node/pull/52353
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-04-11 10:56:02 +00:00
Stefan Stojanovic
45f0dd0192
module,win: fix long path resolve
Fixes: https://github.com/nodejs/node/issues/50753
PR-URL: https://github.com/nodejs/node/pull/51097
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-04-08 14:37:46 +00:00
Raz Luvaton
893e2cf22b
watch: fix some node argument not passed to watched process
PR-URL: https://github.com/nodejs/node/pull/52358
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-04-07 20:50:45 +00:00
Antoine du Hamel
bae14b7914
test: do not set concurrency on parallelized runs
Our CI already run test files in parallel, having `node:test` spawns
child processes concurrently could lead to oversubscribing the CI
machine. This commit sets the `concurrency` depending
on the presence of `TEST_PARALLEL` in the env, so running the test
file individually still spawns child processes concurrently, and
running the whole test suite does not oversubscribe the machine.

PR-URL: https://github.com/nodejs/node/pull/52177
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-03-23 21:11:28 +00:00
Antoine du Hamel
c714cda9a7
test: add spawnSyncAndAssert util
PR-URL: https://github.com/nodejs/node/pull/52132
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-03-20 19:44:14 +01:00
Joyee Cheung
17e0e3e2d6
test: skip SEA tests when SEA generation fails
In the SEA tests, if any of these steps fail:

1. Copy the executable
2. Inject the SEA blob
3. Signing the SEA

We skip the test because the error likely comes from the system or
postject and is not something the Node.js core can fix. We only leave
an exception for a basic test that test injecting empty files as
SEA to ensure the workflow is working (but we still skip if copying
fails or signing fails on Windows).

PR-URL: https://github.com/nodejs/node/pull/51887
Refs: https://github.com/nodejs/node/issues/49630
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-03-01 23:46:02 +01:00
Joyee Cheung
c307ad7686
sea: support sea.getRawAsset()
This patch adds support for `sea.getRawAsset()` which is
similar to `sea.getAsset()` but returns the raw asset
in an array buffer without copying. Users should avoid
writing to the returned array buffer. If the injected
section is not marked as writable or not aligned,
writing to the raw asset is likely to result in a crash.

PR-URL: https://github.com/nodejs/node/pull/50960
Refs: https://github.com/nodejs/single-executable/issues/68
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-02-02 15:25:34 +01:00
Joyee Cheung
ce8f085d26
sea: support embedding assets
With this patch:

Users can now include assets by adding a key-path dictionary
to the configuration as the `assets` field. At build time, Node.js
would read the assets from the specified paths and bundle them into
the preparation blob. In the generated executable, users can retrieve
the assets using the `sea.getAsset()` and `sea.getAssetAsBlob()` API.

```json
{
  "main": "/path/to/bundled/script.js",
  "output": "/path/to/write/the/generated/blob.blob",
  "assets": {
    "a.jpg": "/path/to/a.jpg",
    "b.txt": "/path/to/b.txt"
  }
}
```

The single-executable application can access the assets as follows:

```cjs
const { getAsset } = require('node:sea');
// Returns a copy of the data in an ArrayBuffer
const image = getAsset('a.jpg');
// Returns a string decoded from the asset as UTF8.
const text = getAsset('b.txt', 'utf8');
// Returns a Blob containing the asset.
const blob = getAssetAsBlob('a.jpg');
```

Drive-by: update the  documentation to include a section dedicated
to the injected main script and refer to it as "injected main
script" instead of "injected module" because it's a script, not
a module.

PR-URL: https://github.com/nodejs/node/pull/50960
Refs: https://github.com/nodejs/single-executable/issues/68
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-02-02 15:25:34 +01:00
Michaël Zasso
6b6bcee747
test: mark test-http2-large-file as flaky
Refs: https://github.com/nodejs/node/issues/47409
PR-URL: https://github.com/nodejs/node/pull/51549
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-01-25 11:59:53 +00:00
Gabriel Bota
a3abc42587
async_hooks,inspector: implement inspector api without async_wrap
Implementing the inspector session object as an async resource causes
unwanted context change when a breakpoint callback function is being
called. Modelling the inspector api without the AsyncWrap base class
ensures that the callback has access to the AsyncLocalStorage instance
that is active in the affected user function.

See `test-inspector-async-context-brk.js` for an illustration of the
use case.

PR-URL: https://github.com/nodejs/node/pull/51501
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-01-24 13:29:28 +00:00
Richard Lau
273c892638
test: fix flaky conditions for ppc64 SEA tests
In test status files, `$system` will be the OS and not the arch (which
would be `$arch`).

Add missing single-executable-application test to the list of tests
marked flaky on Linux ppc64le.

PR-URL: https://github.com/nodejs/node/pull/51422
Refs: https://github.com/nodejs/node/pull/50828
Refs: https://github.com/nodejs/node/issues/50740
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-01-11 12:31:14 +00:00
Michael Dawson
4f3261f101
test: skip test-watch-mode-inspect on arm
Refs: https://github.com/nodejs/node/issues/49933

- SKIP instead of mark FLAKY as tests seems to fail
  builds through left over processe

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/51210
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-22 04:35:41 +00:00
Pulkit Gupta
154afbed5b
watch: fix infinite loop when passing --watch=true flag
PR-URL: https://github.com/nodejs/node/pull/51160
Fixes: https://github.com/nodejs/node/issues/51159
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-12-16 20:39:49 +00:00
Joyee Cheung
a3ee1870fd test: log more information in SEA tests
- Use spawnSyncAndExitWithoutError to log more information on error.
- Use NODE_DEBUG_NATIVE to log internals
- Skip the test when available disk space < 120MB

PR-URL: https://github.com/nodejs/node/pull/50759
Refs: https://github.com/nodejs/node/issues/50740
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-11-28 23:16:53 +00:00
Joyee Cheung
78633c4738
test: use ppc and ppc64 to skip SEA tests on PowerPC
It seems using ppc alone is not enough. Add ppc64 to be safe.

PR-URL: https://github.com/nodejs/node/pull/50828
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Keyhan Vakil <kvakil@sylph.kvakil.me>
2023-11-21 00:25:14 +00:00
Joyee Cheung
136742dff7 test: mark SEA tests as flaky on PowerPC
PR-URL: https://github.com/nodejs/node/pull/50750
Refs: https://github.com/nodejs/node/issues/50740
Refs: https://github.com/nodejs/reliability/issues/718
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-11-17 13:41:56 -05:00
Moshe Atlow
41a3878f3d
test: improve watch mode test
PR-URL: https://github.com/nodejs/node/pull/50319
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-10-23 19:03:25 +00:00
Antoine du Hamel
8f742bb13f
test: ensure never settling promises are detected
PR-URL: https://github.com/nodejs/node/pull/50318
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-10-23 17:55:50 +00:00
Yagiz Nizipli
d370ed0cd8
test: set test-watch-mode-inspect as flaky
PR-URL: https://github.com/nodejs/node/pull/50259
Refs: https://github.com/nodejs/node/issues/49933
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-22 20:10:41 +00:00
Geoffrey Booth
02926d3c6a
esm: detect ESM syntax in ambiguous JavaScript
PR-URL: https://github.com/nodejs/node/pull/50096
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2023-10-20 15:44:56 +00:00
Luigi Pinca
0345ea5928
test: reduce the number of requests and parsers
The maximum number of parsers in the free list is set to 1000. However
the test does not need to use this maximum. Reduce it to 50.

Refs: https://github.com/nodejs/node/pull/50228#issuecomment-1768293624
PR-URL: https://github.com/nodejs/node/pull/50240
Fixes: https://github.com/nodejs/node/issues/49564
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-10-20 12:56:44 +00:00
Yagiz Nizipli
dab9505829
test: set sea snapshot tests as flaky
PR-URL: https://github.com/nodejs/node/pull/50223
Refs: https://github.com/nodejs/node/issues/49630
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-10-18 14:05:39 +00:00
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