node/test
Daniel Bevenius 3f2e9dc40c
http2: add unknownProtocol timeout
This commit add a configuration options named unknownProtocolTimeout
which can be specified to set a value for the timeout in milliseconds
that a server should wait when an unknowProtocol is sent to it. When
this happens a timer will be started and the if the socket has not been
destroyed during that time the timer callback will destoy it.

CVE-ID: CVE-2021-22883
Refs: https://hackerone.com/reports/1043360
PR-URL: https://github.com/nodejs-private/node-private/pull/246
Backport PR-URL: https://github.com/nodejs-private/node-private/pull/248
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-02-22 19:12:26 +00:00
..
abort test: removed extraneous argument 's' 2018-12-26 11:18:49 -05:00
addons test: skip stringbytes-external-exceed-max on AIX 2019-07-25 13:55:04 +01:00
addons-napi n-api: create N-API version 7 2020-10-07 07:25:00 -04:00
async-hooks test: mark tests as flaky 2020-02-24 20:13:14 +00:00
benchmark test: fix test-benchmark-zlib 2019-05-16 14:56:19 -04:00
cctest src: remove unused struct in test_inspector_socket.cc 2019-04-16 22:14:11 +01:00
code-cache test: run code cache test by default and test generator 2018-11-29 11:39:20 -05:00
common n-api: add APIs for per-instance state management 2020-02-25 19:20:38 +00:00
doctool test: fix tool path in test-doctool-versions.js 2020-04-06 22:38:41 +01:00
es-module test: clearing require cache crashes esm loader 2019-06-06 13:59:31 +01:00
fixtures test,v8: skip less and stabilize test-linux-perf.js 2020-10-09 12:54:15 -04:00
internet tools: make doctool work if no internet available 2020-04-06 22:38:23 +01:00
known_issues test: unskip copyfile permission test 2019-05-20 00:54:51 -04:00
message process: add --unhandled-rejections flag 2019-10-15 19:43:53 +01:00
parallel http2: add unknownProtocol timeout 2021-02-22 19:12:26 +00:00
pseudo-tty test: fix pty test hangs on aix 2019-07-25 13:55:05 +01:00
pummel test: fix pummel/test-exec 2019-05-16 14:56:49 -04:00
sequential test: remove timers-blocking-callback 2020-07-15 10:18:30 -04:00
testpy test: remove Files: comment processing from Python test runner 2019-05-16 14:56:06 -04:00
tick-processor test: use destructuring on require 2019-01-28 23:11:39 -08:00
v8-updates test,v8: skip less and stabilize test-linux-perf.js 2020-10-09 12:54:15 -04:00
.eslintrc.yaml tools: prevent string literals in some assertions 2018-09-20 08:09:24 +02:00
README.md test: move benchmark tests out of main test suite 2018-12-26 11:18:57 -05:00
root.status test: move benchmark tests out of main test suite 2018-12-26 11:18:57 -05:00

Node.js Core Tests

This directory contains code and data used to test the Node.js implementation.

For a detailed guide on how to write tests in this directory, see the guide on writing tests.

On how to run tests in this directory, see the contributing guide.

For the tests to successfully run on Windows, Node.js has to be checked out from GitHub with the autocrlf git config flag set to true.

Test Directories

Directory Runs on CI Purpose
abort Yes Tests for when the --abort-on-uncaught-exception flag is used.
addons Yes Tests for addon functionality along with some tests that require an addon to function properly.
addons-napi Yes Tests for n-api functionality.
async-hooks Yes Tests for async_hooks functionality.
benchmark No Test minimal functionality of benchmarks.
cctest Yes C++ tests that are run as part of the build process.
code-cache No Tests for a Node.js binary compiled with V8 code cache.
common Common modules shared among many tests. Documentation
doctool Yes Tests for the documentation generator.
es-module Yes Test ESM module loading.
fixtures Test fixtures used in various tests throughout the test suite.
internet No Tests that make real outbound connections (mainly networking related modules). Tests for networking related modules may also be present in other directories, but those tests do not make outbound connections.
known_issues Yes Tests reproducing known issues within the system. All tests inside of this directory are expected to fail consistently. If a test doesn't fail on certain platforms, those should be skipped via known_issues.status.
message Yes Tests for messages that are output for various conditions (console.log, error messages etc.)
parallel Yes Various tests that are able to be run in parallel.
pseudo-tty Yes Tests that require stdin/stdout/stderr to be a TTY.
pummel No Various tests for various modules / system functionality operating under load.
sequential Yes Various tests that are run sequentially.
testpy Test configuration utility used by various test suites.
tick-processor No Tests for the V8 tick processor integration. The tests are for the logic in lib/internal/v8_prof_processor.js and lib/internal/v8_prof_polyfill.js. The tests confirm that the profile processor packages the correct set of scripts from V8 and introduces the correct platform specific logic.
v8-updates No Tests for V8 performance integration.