Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-05-30worker: fix heap snapshot crash on exitChengzhong Wu
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed. PR-URL: https://github.com/nodejs/node/pull/43123 Fixes: https://github.com/nodejs/node/issues/43122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-05-30net: remoteAddress always undefined called before connectedOneNail
PR-URL: https://github.com/nodejs/node/pull/43011 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-05-30fs: make params in writing methods optionalLiviaMedeiros
This change allows passing objects as "named parameters": - `fs.write(fd, buffer[, options], callback)` - `fs.writeSync(fd, buffer[, options])` - `filehandle.write(buffer[, options])` Fixes: https://github.com/nodejs/node/issues/41666 PR-URL: https://github.com/nodejs/node/pull/42601 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-30bootstrap: include code cache in the embedded snapshotJoyee Cheung
Since V8 code cache encodes indices to the read-only space it is safer to make sure that the code cache is generated in the same heap used to generate the embdded snapshot. This patch merges the code cache builder into the snapshot builder and makes the code cache part of node::SnapshotData that is deserialized into the native module loader during bootstrap. PR-URL: https://github.com/nodejs/node/pull/43023 Fixes: https://github.com/nodejs/node/issues/31074 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2022-05-16test: fix dangerous .map in `test/parallel/test-http-set-trailers.js`LiviaMedeiros
PR-URL: https://github.com/nodejs/node/pull/43087 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-05-16test: reduce flakiness of `test-fs-read-position-validation.mjs`Livia Medeiros
PR-URL: https://github.com/nodejs/node/pull/42999 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-16perf_hooks: add PerformanceResourceTimingRafaelGSS
perf_hooks: create clearResourceTimings perf_hooks: add resourcetiming test parallel perf_hooks: add markResourceTiming perf_hooks: fix observable when using resource perf_hooks: fix observable when using resource perf_hooks: add class comments perf_hooks: add PerformanceResourceTiming perf_hooks: create clearResourceTimings perf_hooks: add resourcetiming test parallel perf_hooks: add markResourceTiming perf_hooks: fix observable when using resource perf_hooks: fix observable when using resource perf_hooks: add class comments perf_hooks: add Resource Timing documentation benchmark: measure resource timing module perf_hooks: add check avoiding new PerformanceResourceTiming perf_hooks: adjust doc PR-URL: https://github.com/nodejs/node/pull/42725 Fixes: https://github.com/nodejs/undici/issues/952 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2022-05-16node-api: fix napi_get_all_property_namesVladimir Morozov
PR-URL: https://github.com/nodejs/node/pull/42463 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-10doc: rename N-API to Node-API in test/README.mdDaeyeon Jeong
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com PR-URL: https://github.com/nodejs/node/pull/42946 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2022-05-10lib: move WebAssembly Web API into separate fileTobias Nießen
Refs: https://github.com/nodejs/node/pull/42960#discussion_r864871357 PR-URL: https://github.com/nodejs/node/pull/42993 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-05-10debugger: fix inconsistent inspector output of exec new Map()Kohei Ueno
PR-URL: https://github.com/nodejs/node/pull/42423 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-05-10src: always signal V8 for intercepted propertiesMichaël Zasso
Closes: https://github.com/nodejs/node/issues/42962 PR-URL: https://github.com/nodejs/node/pull/42963 Fixes: https://github.com/nodejs/node/issues/42962 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10worker: fix stream racing with terminateKeyhan Vakil
`OnStreamAfterReqFinished` uses `v8::Object::Has` to check if it needs to call `oncomplete`. `v8::Object::Has` needs to execute Javascript. However when worker threads are involved, `OnStreamAfterReqFinished` may be called after the worker thread termination has begun via `worker.terminate()`. This makes `v8::Object::Has` return `Nothing`, which triggers an assert. This diff fixes the issue by simply defaulting us to `false` in the case where `Nothing` is returned. This is sound because we can't execute `oncomplete` anyway as the isolate is terminating. Fixes: https://github.com/nodejs/node/issues/38418 PR-URL: https://github.com/nodejs/node/pull/42874 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10assert: fix CallTracker wraps the function causes the length to be lostOneNail
PR-URL: https://github.com/nodejs/node/pull/42909 Fixes: https://github.com/nodejs/node/issues/40484 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10lib,test: enable wasm/webapi/empty-body WPTTobias Nießen
Refs: https://github.com/nodejs/node/pull/42701 Refs: https://github.com/nodejs/undici/pull/1346 Refs: https://github.com/nodejs/node/pull/42939 PR-URL: https://github.com/nodejs/node/pull/42960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2022-05-10test: rename handlewrap.hasref testsDaeyeon Jeong
`HandleWrap.isRefed()` was renamed to `hasRef()`. However, the filename of related TCs has not been reflected. Refs: https://github.com/nodejs/node/commit/f31a5ec34a PR-URL: https://github.com/nodejs/node/pull/42754 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-10test: improve observable ICU behaviour coverageLivia Medeiros
PR-URL: https://github.com/nodejs/node/pull/42683 Refs: https://github.com/nodejs/node/issues/42440 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10test: validate webstream encoder/decoder inspectorYoshiki Kurihara
PR-URL: https://github.com/nodejs/node/pull/42747 Refs: https://coverage.nodejs.org/coverage-24adba675179ebba/lib/internal/webstreams/encoding.js.html#L98 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10test: use`mustSucceed` instead of `mustCall` with `assert.ifError`MURAKAMI Masahiko
PR-URL: https://github.com/nodejs/node/pull/42806 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-05-10test: improve `lib/internal/webstreams/readablestream.js` coverageMURAKAMI Masahiko
PR-URL: https://github.com/nodejs/node/pull/42823 Refs: https://coverage.nodejs.org/coverage-3a6b975981092213/lib/internal/webstreams/readablestream.js.html#L421 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
2022-05-10bootstrap: use a context snapshotted with primordials in workersJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/42867 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10crypto: adjust minimum length in generateKey('hmac', ...)Livia Medeiros
Also affects generateKeySync('hmac', ...) PR-URL: https://github.com/nodejs/node/pull/42944 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-05-10test: use consistent timeoutsShogun
PR-URL: https://github.com/nodejs/node/pull/42893 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
2022-05-10http: added connection closing methodsShogun
Fixes: https://github.com/nodejs/node/issues/41578 PR-URL: https://github.com/nodejs/node/pull/42812 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-05-10src: fix memory leak for v8.serializeliuxingbaoyu
When Buffer::New passes in existing data, it cannot be garbage collected in js synchronous execution. Fixes: https://github.com/nodejs/node/issues/40828 Refs: https://github.com/nodejs/node/issues/38300 PR-URL: https://github.com/nodejs/node/pull/42695 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-05-10fs: add `read(buffer[, options])` versionsLivia Medeiros
This adds the following: - `fs.read(fd, buffer[, options], callback)`. - `filehandle.read(buffer[, options])`. PR-URL: https://github.com/nodejs/node/pull/42768 Refs: https://github.com/nodejs/node/pull/42601 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10test: add test for position validation in fs.read() and fs.readSync()Livia Medeiros
PR-URL: https://github.com/nodejs/node/pull/42837 Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10http2: compat support for array headersOneNail
PR-URL: https://github.com/nodejs/node/pull/42901 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2022-05-10assert: make `assert.fail` less affected by prototype tamperingAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/42918 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-05-10crypto: clean up parameter validation in HKDFTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/42924 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
2022-05-10test: reduce impact of flaky HTTP server testsTobias Nießen
Refs: https://github.com/nodejs/node/issues/42741 PR-URL: https://github.com/nodejs/node/pull/42926 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-02worker: add hasRef() to MessagePortDarshan Sen
Since we were removing the hasRef() method before exposing the MessagePort object, the only way of knowing if the handle was keeping the event loop active was to parse the string returned by util.inspect(port), which is inconvenient and inconsistent with most of the other async resources. So this change stops removing hasRef() from the MessagePort prototype. The reason why this is also being documented is that while reporting active resources, async_hooks returns the same MessagePort object as the one that is accessible by users. Refs: https://github.com/nodejs/node/issues/42091#issuecomment-1104793189 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/42849 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-05-02perf_hooks: return different functions in timerifyHimself65
Fixes: https://github.com/nodejs/node/issues/42742 PR-URL: https://github.com/nodejs/node/pull/42854 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Co-authored-by: HE Shi-Jun <hax@heshijun.net>
2022-05-02test: add tests for extracting function nameKohei Ueno
PR-URL: https://github.com/nodejs/node/pull/42399 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-02test: simplify test-gc-{http-client,net}-*Luigi Pinca
Instead of sending/creating a fixed number of requests/connections, detect when GC has started and stop sending requests/creating connections at that point. Refs: https://github.com/nodejs/node/commit/47ecf2060343 Refs: https://github.com/nodejs/node/commit/7ce8403ef1a6 PR-URL: https://github.com/nodejs/node/pull/42782 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-02v8: export cpu_profiler_metadata_size in getHeapCodeStatisticstheanarkh
PR-URL: https://github.com/nodejs/node/pull/42818 Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-05-02esm: fix imports from non-file moduleAntoine du Hamel
Fixes: https://github.com/nodejs/node/issues/42860 PR-URL: https://github.com/nodejs/node/pull/42881 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Guy Bedford <guybedford@gmail.com>
2022-05-02test: fix `parallel/test-dgram-udp6-link-local-address`Antoine du Hamel
Refs: https://github.com/nodejs/node/pull/41431 PR-URL: https://github.com/nodejs/node/pull/42795 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-02doc,test: add tests and docs for duplex.fromWeb and duplex.toWebErick Wendel
PR-URL: https://github.com/nodejs/node/pull/42738 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-28test: improve lib/internal/test_runner/test.js coverageMURAKAMI Masahiko
PR-URL: https://github.com/nodejs/node/pull/42745 Refs: https://coverage.nodejs.org/coverage-24adba675179ebba/lib/internal/test_runner/test.js.html#L371 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28test: check ecdsa psychic signatureFilip Skokan
PR-URL: https://github.com/nodejs/node/pull/42863 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-04-28test: fix port in net-perf_hooksLivia Medeiros
PR-URL: https://github.com/nodejs/node/pull/42761 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28lib,src: use Response URL as WebAssembly locationTobias Nießen
As per Section 3 of the WebAssembly Web API spec. PR-URL: https://github.com/nodejs/node/pull/42842 Refs: https://github.com/nodejs/node/pull/42701 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-28test: skip test that cannot pass under --node-builtin-modules-pathGeoffrey Booth
PR-URL: https://github.com/nodejs/node/pull/42834 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2022-04-28test: fix flaky HTTP server testsTobias Nießen
Refs: https://github.com/nodejs/node/pull/41263 PR-URL: https://github.com/nodejs/node/pull/42846 Fixes: https://github.com/nodejs/node/issues/42741 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2022-04-28errors,vm: update error and use causeGus Caplan
PR-URL: https://github.com/nodejs/node/pull/42820 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-04-28build: enable V8's shared read-only heapMichaël Zasso
It is what V8's build config does by default. PR-URL: https://github.com/nodejs/node/pull/42809 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2022-04-28crypto: validate `this` in all webcrypto methods and gettersFilip Skokan
PR-URL: https://github.com/nodejs/node/pull/42815 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-04-28v8: export more fields in getHeapStatisticstheanarkh
export total_global_handles_size, used_global_handles_size, external_memory in getHeapStatistics PR-URL: https://github.com/nodejs/node/pull/42784 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28lib,src: implement WebAssembly Web APITobias Nießen
Refs: https://github.com/nodejs/node/pull/41749 Fixes: https://github.com/nodejs/node/issues/21130 PR-URL: https://github.com/nodejs/node/pull/42701 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>