diff --git a/configure.py b/configure.py index 0190e31b41a214..e98801f2279f6b 100755 --- a/configure.py +++ b/configure.py @@ -538,12 +538,12 @@ dest='without_npm', help='do not install the bundled npm (package manager)') +# Dummy option for backwards compatibility parser.add_option('--without-report', action='store_true', - dest='without_report', - help='build without report') + dest='unused_without_report', + help=optparse.SUPPRESS_HELP) -# Dummy option for backwards compatibility parser.add_option('--with-snapshot', action='store_true', dest='unused_with_snapshot', @@ -1004,7 +1004,6 @@ def configure_node(o): o['variables']['OS'] = 'android' o['variables']['node_prefix'] = options.prefix o['variables']['node_install_npm'] = b(not options.without_npm) - o['variables']['node_report'] = b(not options.without_report) o['variables']['debug_node'] = b(options.debug_node) o['default_configuration'] = 'Debug' if options.debug else 'Release' diff --git a/doc/api/cli.md b/doc/api/cli.md index 66cb665fa82e9f..d5632532f80a6f 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -199,13 +199,6 @@ added: v10.0.0 Enable experimental top-level `await` keyword support in REPL. -### `--experimental-report` - - -Enable experimental diagnostic report feature. - ### `--experimental-specifier-resolution=mode` +> Stability: 1 - Experimental + Enables the report to be triggered on fatal errors (internal errors within the Node.js runtime such as out of memory) that lead to termination of the -application, if `--experimental-report` is enabled. Useful to inspect various -diagnostic data elements such as heap, stack, event loop state, resource -consumption etc. to reason about the fatal error. +application. Useful to inspect various diagnostic data elements such as heap, +stack, event loop state, resource consumption etc. to reason about the fatal +error. ### `--report-on-signal` Enables report to be generated upon receiving the specified (or predefined) -signal to the running Node.js process, if `--experimental-report` is enabled. -The signal to trigger the report is specified through `--report-signal`. +signal to the running Node.js process. The signal to trigger the report is +specified through `--report-signal`. ### `--report-signal=signal` -Enables report to be generated on un-caught exceptions, if -`--experimental-report` is enabled. Useful when inspecting JavaScript stack in -conjunction with native stack and other runtime environment data. +Enables report to be generated on uncaught exceptions. Useful when inspecting +the JavaScript stack in conjunction with native stack and other runtime +environment data. ### `--throw-deprecation` -> Stability: 1 - Experimental - * {Object} `process.report` is an object whose methods are used to generate diagnostic @@ -1796,10 +1798,12 @@ reports for the current process. Additional documentation is available in the ### `process.report.directory` -> Stability: 1 - Experimental - * {string} Directory where the report is written. The default value is the empty string, @@ -1813,10 +1817,12 @@ console.log(`Report directory is ${process.report.directory}`); ### `process.report.filename` -> Stability: 1 - Experimental - * {string} Filename where the report is written. If set to the empty string, the output @@ -1830,10 +1836,12 @@ console.log(`Report filename is ${process.report.filename}`); ### `process.report.getReport([err])` -> Stability: 1 - Experimental - * `err` {Error} A custom error used for reporting the JavaScript stack. * Returns: {Object} @@ -1871,10 +1879,12 @@ console.log(`Report on fatal error: ${process.report.reportOnFatalError}`); ### `process.report.reportOnSignal` -> Stability: 1 - Experimental - * {boolean} If `true`, a diagnostic report is generated when the process receives the @@ -1887,10 +1897,12 @@ console.log(`Report on signal: ${process.report.reportOnSignal}`); ### `process.report.reportOnUncaughtException` -> Stability: 1 - Experimental - * {boolean} If `true`, a diagnostic report is generated on uncaught exception. @@ -1902,10 +1914,12 @@ console.log(`Report on exception: ${process.report.reportOnUncaughtException}`); ### `process.report.signal` -> Stability: 1 - Experimental - * {string} The signal used to trigger the creation of a diagnostic report. Defaults to @@ -1918,10 +1932,12 @@ console.log(`Report signal: ${process.report.signal}`); ### `process.report.writeReport([filename][, err])` -> Stability: 1 - Experimental - * `filename` {string} Name of the file where the report is written. This should be a relative path, that will be appended to the directory specified in `process.report.directory`, or the current working directory of the Node.js diff --git a/doc/api/report.md b/doc/api/report.md index a292d0a05826b3..7762424ec5f7b6 100644 --- a/doc/api/report.md +++ b/doc/api/report.md @@ -3,7 +3,7 @@ -> Stability: 1 - Experimental +> Stability: 2 - Stable @@ -32,7 +32,6 @@ is provided below for reference. "cwd": "/home/nodeuser/project/node", "commandLine": [ "/home/nodeuser/project/node/out/Release/node", - "--experimental-report", "--report-uncaught-exception", "/home/nodeuser/project/node/test/report/test-exception.js", "child" @@ -392,14 +391,10 @@ is provided below for reference. ## Usage ```bash -node --experimental-report --report-uncaught-exception \ - --report-on-signal --report-on-fatalerror app.js +node --report-uncaught-exception --report-on-signal \ +--report-on-fatalerror app.js ``` -* `--experimental-report` Enables the diagnostic report feature. - In the absence of this flag, use of all other related options will result in - an error. - * `--report-uncaught-exception` Enables report to be generated on un-caught exceptions. Useful when inspecting JavaScript stack in conjunction with native stack and other runtime environment data. @@ -569,7 +564,7 @@ Configuration on module initialization is also available via environment variables: ```bash -NODE_OPTIONS="--experimental-report --report-uncaught-exception \ +NODE_OPTIONS="--report-uncaught-exception \ --report-on-fatalerror --report-on-signal \ --report-signal=SIGUSR2 --report-filename=./report.json \ --report-directory=/home/nodeuser" diff --git a/doc/node.1 b/doc/node.1 index 71325cc1cde864..9d75596c60ec6e 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -138,11 +138,6 @@ keyword support in REPL. .It Fl -experimental-specifier-resolution Select extension resolution algorithm for ES Modules; either 'explicit' (default) or 'node' . -.It Fl -experimental-report -Enable experimental -.Sy diagnostic report -feature. -. .It Fl -experimental-vm-modules Enable experimental ES module support in VM module. . @@ -299,16 +294,16 @@ will be written. .It Fl -report-on-fatalerror Enables the .Sy diagnostic report -to be triggered on fatal errors (internal errors within the Node.js runtime such as out of memory) that leads to termination of the application, if -.Sy --experimental-report -is enabled. Useful to inspect various diagnostic data elements such as heap, stack, event loop state, resource consumption etc. to reason about the fatal error. +to be triggered on fatal errors (internal errors within the Node.js runtime such +as out of memory) that leads to termination of the application. Useful to +inspect various diagnostic data elements such as heap, stack, event loop state, +resource consumption etc. to reason about the fatal error. . .It Fl -report-on-signal Enables .Sy diagnostic report -to be generated upon receiving the specified (or predefined) signal to the running Node.js process, if -.Sy --experimental-report -is enabled. Default signal is SIGUSR2. +to be generated upon receiving the specified (or predefined) signal to the +running Node.js process. Default signal is SIGUSR2. . .It Fl -report-signal Sets or resets the signal for @@ -318,9 +313,8 @@ generation (not supported on Windows). Default signal is SIGUSR2. .It Fl -report-uncaught-exception Enables .Sy diagnostic report -to be generated on un-caught exceptions, if -.Sy --experimental-report -is enabled. Useful when inspecting JavaScript stack in conjunction with native stack and other runtime environment data. +to be generated on un-caught exceptions. Useful when inspecting JavaScript +stack in conjunction with native stack and other runtime environment data. . .It Fl -throw-deprecation Throw errors for deprecations. diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 46af6c30e0daa8..3d5e0061daa8d1 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -163,16 +163,11 @@ function setupStacktracePrinterOnSigint() { } function initializeReport() { - if (!getOptionValue('--experimental-report')) { - return; - } const { report } = require('internal/process/report'); - const { emitExperimentalWarning } = require('internal/util'); ObjectDefineProperty(process, 'report', { enumerable: false, configurable: true, get() { - emitExperimentalWarning('report'); return report; } }); @@ -187,10 +182,6 @@ function setupDebugEnv() { // This has to be called after initializeReport() is called function initializeReportSignalHandlers() { - if (!getOptionValue('--experimental-report')) { - return; - } - const { addSignalHandler } = require('internal/process/report'); addSignalHandler(); diff --git a/node.gyp b/node.gyp index 8a23ec2f1f398b..c8e7387c2a8cf1 100644 --- a/node.gyp +++ b/node.gyp @@ -337,6 +337,8 @@ 'type': 'executable', 'defines': [ + 'NODE_ARCH="<(target_arch)"', + 'NODE_PLATFORM="<(OS)"', 'NODE_WANT_INTERNALS=1', ], @@ -424,13 +426,6 @@ 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ], }, }], - [ 'node_report=="true"', { - 'defines': [ - 'NODE_REPORT', - 'NODE_ARCH="<(target_arch)"', - 'NODE_PLATFORM="<(OS)"', - ], - }], ['OS=="win"', { 'libraries': [ 'Dbghelp.lib', @@ -596,6 +591,9 @@ 'src/node_process_events.cc', 'src/node_process_methods.cc', 'src/node_process_object.cc', + 'src/node_report.cc', + 'src/node_report_module.cc', + 'src/node_report_utils.cc', 'src/node_serdes.cc', 'src/node_sockaddr.cc', 'src/node_stat_watcher.cc', @@ -685,6 +683,7 @@ 'src/node_perf_common.h', 'src/node_platform.h', 'src/node_process.h', + 'src/node_report.h', 'src/node_revert.h', 'src/node_root_certs.h', 'src/node_sockaddr.h', @@ -781,6 +780,7 @@ 'libraries': [ 'Dbghelp', 'Psapi', + 'Ws2_32', ], }], [ 'node_use_etw=="true"', { @@ -865,23 +865,6 @@ 'src/tls_wrap.h' ], }], - [ 'node_report=="true"', { - 'sources': [ - 'src/node_report.cc', - 'src/node_report_module.cc', - 'src/node_report_utils.cc', - ], - 'defines': [ - 'NODE_REPORT', - 'NODE_ARCH="<(target_arch)"', - 'NODE_PLATFORM="<(OS)"', - ], - 'conditions': [ - ['OS=="win"', { - 'libraries': [ 'Ws2_32' ], - }], - ], - }], [ 'OS in "linux freebsd mac" and ' 'target_arch=="x64" and ' 'node_target_type=="executable"', { @@ -1138,7 +1121,11 @@ 'test/cctest', ], - 'defines': [ 'NODE_WANT_INTERNALS=1' ], + 'defines': [ + 'NODE_ARCH="<(target_arch)"', + 'NODE_PLATFORM="<(OS)"', + 'NODE_WANT_INTERNALS=1', + ], 'sources': [ 'src/node_snapshot_stub.cc', @@ -1155,6 +1142,7 @@ 'test/cctest/test_linked_binding.cc', 'test/cctest/test_per_process.cc', 'test/cctest/test_platform.cc', + 'test/cctest/test_report_util.cc', 'test/cctest/test_sockaddr.cc', 'test/cctest/test_traced_value.cc', 'test/cctest/test_util.cc', @@ -1192,21 +1180,6 @@ 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ], }, }], - [ 'node_report=="true"', { - 'sources': [ - 'test/cctest/test_report_util.cc', - ], - 'defines': [ - 'NODE_REPORT', - 'NODE_ARCH="<(target_arch)"', - 'NODE_PLATFORM="<(OS)"', - ], - 'conditions': [ - ['OS=="win"', { - 'libraries': [ 'Ws2_32' ], - }], - ], - }], ['OS=="win"', { 'libraries': [ 'Dbghelp.lib', diff --git a/src/node.cc b/src/node.cc index 1fec85aa793dc4..290d36d2d2058a 100644 --- a/src/node.cc +++ b/src/node.cc @@ -35,6 +35,7 @@ #include "node_options-inl.h" #include "node_perf.h" #include "node_process.h" +#include "node_report.h" #include "node_revert.h" #include "node_v8_platform-inl.h" #include "node_version.h" @@ -67,10 +68,6 @@ #include "large_pages/node_large_page.h" -#ifdef NODE_REPORT -#include "node_report.h" -#endif - #if defined(__APPLE__) || defined(__linux__) #define NODE_USE_V8_WASM_TRAP_HANDLER 1 #else @@ -781,11 +778,9 @@ int InitializeNodeWithArgs(std::vector* argv, // Make inherited handles noninheritable. uv_disable_stdio_inheritance(); -#ifdef NODE_REPORT // Cache the original command line to be // used in diagnostic reports. per_process::cli_options->cmdline = *argv; -#endif // NODE_REPORT #if defined(NODE_V8_OPTIONS) // Should come before the call to V8::SetFlagsFromCommandLine() diff --git a/src/node_binding.cc b/src/node_binding.cc index 37c64000650085..592d0ca2a397e2 100644 --- a/src/node_binding.cc +++ b/src/node_binding.cc @@ -17,12 +17,6 @@ #define NODE_BUILTIN_ICU_MODULES(V) #endif -#if NODE_REPORT -#define NODE_BUILTIN_REPORT_MODULES(V) V(report) -#else -#define NODE_BUILTIN_REPORT_MODULES(V) -#endif - #if HAVE_INSPECTOR #define NODE_BUILTIN_PROFILER_MODULES(V) V(profiler) #else @@ -67,6 +61,7 @@ V(pipe_wrap) \ V(process_wrap) \ V(process_methods) \ + V(report) \ V(serdes) \ V(signal_wrap) \ V(spawn_sync) \ @@ -94,7 +89,6 @@ NODE_BUILTIN_STANDARD_MODULES(V) \ NODE_BUILTIN_OPENSSL_MODULES(V) \ NODE_BUILTIN_ICU_MODULES(V) \ - NODE_BUILTIN_REPORT_MODULES(V) \ NODE_BUILTIN_PROFILER_MODULES(V) \ NODE_BUILTIN_DTRACE_MODULES(V) diff --git a/src/node_errors.cc b/src/node_errors.cc index 9d038e3d1683e7..ae1da87ef6b0e0 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -4,9 +4,7 @@ #include "debug_utils-inl.h" #include "node_errors.h" #include "node_internals.h" -#ifdef NODE_REPORT #include "node_report.h" -#endif #include "node_process.h" #include "node_v8_platform-inl.h" #include "util-inl.h" @@ -405,14 +403,14 @@ void OnFatalError(const char* location, const char* message) { } else { FPrintF(stderr, "FATAL ERROR: %s\n", message); } -#ifdef NODE_REPORT + Isolate* isolate = Isolate::GetCurrent(); Environment* env = Environment::GetCurrent(isolate); if (env == nullptr || env->isolate_data()->options()->report_on_fatalerror) { report::TriggerNodeReport( isolate, env, message, "FatalError", "", Local()); } -#endif // NODE_REPORT + fflush(stderr); ABORT(); } diff --git a/src/node_options.cc b/src/node_options.cc index 3bf1031f1667ba..a555ac5cb3e0ee 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -76,48 +76,6 @@ void PerProcessOptions::CheckOptions(std::vector* errors) { void PerIsolateOptions::CheckOptions(std::vector* errors) { per_env->CheckOptions(errors); -#ifdef NODE_REPORT - if (per_env->experimental_report) { - // Assign the report_signal default value here. Once the - // --experimental-report flag is dropped, move this initialization to - // node_options.h, where report_signal is declared. - if (report_signal.empty()) - report_signal = "SIGUSR2"; - return; - } - - if (!report_directory.empty()) { - errors->push_back("--report-directory option is valid only when " - "--experimental-report is set"); - } - - if (!report_filename.empty()) { - errors->push_back("--report-filename option is valid only when " - "--experimental-report is set"); - } - - if (!report_signal.empty()) { - errors->push_back("--report-signal option is valid only when " - "--experimental-report is set"); - } - - if (report_on_fatalerror) { - errors->push_back( - "--report-on-fatalerror option is valid only when " - "--experimental-report is set"); - } - - if (report_on_signal) { - errors->push_back("--report-on-signal option is valid only when " - "--experimental-report is set"); - } - - if (report_uncaught_exception) { - errors->push_back( - "--report-uncaught-exception option is valid only when " - "--experimental-report is set"); - } -#endif // NODE_REPORT } void EnvironmentOptions::CheckOptions(std::vector* errors) { @@ -361,12 +319,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { &EnvironmentOptions::experimental_vm_modules, kAllowedInEnvironment); AddOption("--experimental-worker", "", NoOp{}, kAllowedInEnvironment); -#ifdef NODE_REPORT - AddOption("--experimental-report", - "enable report generation", - &EnvironmentOptions::experimental_report, - kAllowedInEnvironment); -#endif // NODE_REPORT + AddOption("--experimental-report", "", NoOp{}, kAllowedInEnvironment); AddOption("--experimental-wasi-unstable-preview1", "experimental WASI support", &EnvironmentOptions::experimental_wasi, @@ -620,8 +573,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( "disable runtime allocation of executable memory", V8Option{}, kAllowedInEnvironment); - -#ifdef NODE_REPORT AddOption("--report-uncaught-exception", "generate diagnostic report on uncaught exceptions", &PerIsolateOptions::report_uncaught_exception, @@ -650,7 +601,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( " (default: current working directory of Node.js process)", &PerIsolateOptions::report_directory, kAllowedInEnvironment); -#endif // NODE_REPORT Insert(eop, &PerIsolateOptions::get_per_env_options); } diff --git a/src/node_options.h b/src/node_options.h index 470007f06b6342..a4174767c9b2ba 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -151,9 +151,6 @@ class EnvironmentOptions : public Options { bool syntax_check_only = false; bool has_eval_string = false; -#ifdef NODE_REPORT - bool experimental_report = false; -#endif // NODE_REPORT bool experimental_wasi = false; std::string eval_string; bool print_eval = false; @@ -187,15 +184,12 @@ class PerIsolateOptions : public Options { std::shared_ptr per_env { new EnvironmentOptions() }; bool track_heap_objects = false; bool no_node_snapshot = false; - -#ifdef NODE_REPORT bool report_uncaught_exception = false; bool report_on_signal = false; bool report_on_fatalerror = false; - std::string report_signal; + std::string report_signal = "SIGUSR2"; std::string report_filename; std::string report_directory; -#endif // NODE_REPORT inline EnvironmentOptions* get_per_env_options(); void CheckOptions(std::vector* errors) override; }; @@ -239,10 +233,7 @@ class PerProcessOptions : public Options { #endif std::string use_largepages = "off"; bool trace_sigint = false; - -#ifdef NODE_REPORT std::vector cmdline; -#endif // NODE_REPORT inline PerIsolateOptions* get_per_isolate_options(); void CheckOptions(std::vector* errors) override; diff --git a/test/addons/worker-addon/test.js b/test/addons/worker-addon/test.js index 85a5e2701609fd..f2df4665f53068 100644 --- a/test/addons/worker-addon/test.js +++ b/test/addons/worker-addon/test.js @@ -1,4 +1,3 @@ -// Flags: --experimental-report 'use strict'; const common = require('../../common'); const assert = require('assert'); diff --git a/test/common/index.js b/test/common/index.js index 28ce841c48cc3f..e77e7b95059947 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -553,12 +553,6 @@ function skipIfInspectorDisabled() { } } -function skipIfReportDisabled() { - if (!process.config.variables.node_report) { - skip('Diagnostic reporting is disabled'); - } -} - function skipIf32Bits() { if (bits < 64) { skip('The tested feature is not available in 32bit builds'); @@ -700,7 +694,6 @@ const common = { skipIf32Bits, skipIfEslintMissing, skipIfInspectorDisabled, - skipIfReportDisabled, skipIfWorker, get enoughTestCpu() { diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index 5680017e0c8026..e07ca03e807b5d 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -22,6 +22,7 @@ const expectedModules = new Set([ 'Internal Binding native_module', 'Internal Binding options', 'Internal Binding process_methods', + 'Internal Binding report', 'Internal Binding string_decoder', 'Internal Binding task_queue', 'Internal Binding timers', @@ -64,6 +65,7 @@ const expectedModules = new Set([ 'NativeModule internal/process/execution', 'NativeModule internal/process/per_thread', 'NativeModule internal/process/promises', + 'NativeModule internal/process/report', 'NativeModule internal/process/signal', 'NativeModule internal/process/task_queues', 'NativeModule internal/process/warning', diff --git a/test/parallel/test-process-env-allowed-flags-are-documented.js b/test/parallel/test-process-env-allowed-flags-are-documented.js index f356f88fe9c740..0e0af9471ce84e 100644 --- a/test/parallel/test-process-env-allowed-flags-are-documented.js +++ b/test/parallel/test-process-env-allowed-flags-are-documented.js @@ -59,8 +59,6 @@ const conditionalOpts = [ filter: (opt) => opt === '--icu-data-dir' }, { include: process.features.inspector, filter: (opt) => opt.startsWith('--inspect') || opt === '--debug-port' }, - { include: process.config.variables.node_report, - filter: (opt) => opt.includes('-report') }, ]; documented.forEach((opt) => { conditionalOpts.forEach(({ include, filter }) => { @@ -86,6 +84,7 @@ const undocumented = difference(process.allowedNodeEnvironmentFlags, // Remove intentionally undocumented options. assert(undocumented.delete('--debug-arraybuffer-allocations')); assert(undocumented.delete('--es-module-specifier-resolution')); +assert(undocumented.delete('--experimental-report')); assert(undocumented.delete('--experimental-worker')); assert(undocumented.delete('--no-node-snapshot')); assert(undocumented.delete('--loader')); diff --git a/test/report/test-report-config.js b/test/report/test-report-config.js index 4f6fdf2a80e111..f179925440ab7b 100644 --- a/test/report/test-report-config.js +++ b/test/report/test-report-config.js @@ -1,13 +1,8 @@ -// Flags: --experimental-report --report-on-fatalerror --report-on-signal --report-uncaught-exception +// Flags: --report-on-fatalerror --report-on-signal --report-uncaught-exception 'use strict'; const common = require('../common'); -common.skipIfReportDisabled(); const assert = require('assert'); -common.expectWarning('ExperimentalWarning', - 'report is an experimental feature. This feature could ' + - 'change at any time'); - // Verify that process.report.directory behaves properly. assert.strictEqual(process.report.directory, ''); process.report.directory = __dirname; diff --git a/test/report/test-report-fatal-error.js b/test/report/test-report-fatal-error.js index 8ecd058cf8a4de..99a2da71c203e1 100644 --- a/test/report/test-report-fatal-error.js +++ b/test/report/test-report-fatal-error.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common'); -common.skipIfReportDisabled(); const assert = require('assert'); // Testcase to produce report on fatal error (javascript heap OOM) if (process.argv[2] === 'child') { @@ -22,8 +21,7 @@ if (process.argv[2] === 'child') { const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); const spawn = require('child_process').spawn; - const args = ['--experimental-report', - '--report-on-fatalerror', + const args = ['--report-on-fatalerror', '--max-old-space-size=20', __filename, 'child']; diff --git a/test/report/test-report-getreport.js b/test/report/test-report-getreport.js index ba645df69fdd7b..4c68b4ecbb5e48 100644 --- a/test/report/test-report-getreport.js +++ b/test/report/test-report-getreport.js @@ -1,14 +1,8 @@ -// Flags: --experimental-report 'use strict'; -const common = require('../common'); -common.skipIfReportDisabled(); +require('../common'); const assert = require('assert'); const helper = require('../common/report'); -common.expectWarning('ExperimentalWarning', - 'report is an experimental feature. This feature could ' + - 'change at any time'); - { // Test with no arguments. helper.validateContent(process.report.getReport()); diff --git a/test/report/test-report-signal.js b/test/report/test-report-signal.js index 51244fcade2196..cb5efd9fc39fe2 100644 --- a/test/report/test-report-signal.js +++ b/test/report/test-report-signal.js @@ -1,8 +1,8 @@ -// Flags: --experimental-report --report-on-signal +// Flags: --report-on-signal 'use strict'; // Test producing a report via signal. const common = require('../common'); -common.skipIfReportDisabled(); + if (common.isWindows) return common.skip('Unsupported on Windows.'); @@ -13,9 +13,6 @@ const assert = require('assert'); const helper = require('../common/report'); const tmpdir = require('../common/tmpdir'); -common.expectWarning('ExperimentalWarning', - 'report is an experimental feature. This feature could ' + - 'change at any time'); tmpdir.refresh(); process.report.directory = tmpdir.path; diff --git a/test/report/test-report-uncaught-exception.js b/test/report/test-report-uncaught-exception.js index 4a2627c13c88ff..10dcccb090019c 100644 --- a/test/report/test-report-uncaught-exception.js +++ b/test/report/test-report-uncaught-exception.js @@ -1,16 +1,12 @@ -// Flags: --experimental-report --report-uncaught-exception +// Flags: --report-uncaught-exception 'use strict'; // Test producing a report on uncaught exception. const common = require('../common'); -common.skipIfReportDisabled(); const assert = require('assert'); const helper = require('../common/report'); const tmpdir = require('../common/tmpdir'); const error = new Error('test error'); -common.expectWarning('ExperimentalWarning', - 'report is an experimental feature. This feature could ' + - 'change at any time'); tmpdir.refresh(); process.report.directory = tmpdir.path; diff --git a/test/report/test-report-uv-handles.js b/test/report/test-report-uv-handles.js index ea0c189b859c1a..3a6a34a8573fe7 100644 --- a/test/report/test-report-uv-handles.js +++ b/test/report/test-report-uv-handles.js @@ -5,7 +5,6 @@ const common = require('../common'); if (common.isIBMi) common.skip('IBMi does not support fs.watch()'); -common.skipIfReportDisabled(); if (process.argv[2] === 'child') { // Exit on loss of parent process const exit = () => process.exit(2); @@ -78,13 +77,12 @@ if (process.argv[2] === 'child') { const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); const options = { encoding: 'utf8', silent: true, cwd: tmpdir.path }; - const child = fork('--experimental-report', [__filename, 'child'], options); + const child = fork(__filename, ['child'], options); let child_data; child.on('message', (data) => { child_data = data; }); let stderr = ''; child.stderr.on('data', (chunk) => { stderr += chunk; }); let stdout = ''; - const std_msg = 'Found messages in stderr unexpectedly: '; const report_msg = 'Report files were written: unexpectedly'; child.stdout.on('data', (chunk) => { stdout += chunk; }); child.on('exit', common.mustCall((code, signal) => { @@ -92,10 +90,7 @@ if (process.argv[2] === 'child') { `${code}`); assert.deepStrictEqual(signal, null, 'Process should have exited cleanly,' + ` but did not: ${signal}`); - assert.ok(stderr.match( - '(node:.*) ExperimentalWarning: report is an experimental' + - ' feature. This feature could change at any time'), - std_msg); + assert.strictEqual(stderr.trim(), ''); const reports = helper.findReports(child.pid, tmpdir.path); assert.deepStrictEqual(reports, [], report_msg, reports); diff --git a/test/report/test-report-worker.js b/test/report/test-report-worker.js index 39a2c87f65f044..26b28219c84088 100644 --- a/test/report/test-report-worker.js +++ b/test/report/test-report-worker.js @@ -1,7 +1,5 @@ -// Flags: --experimental-report 'use strict'; const common = require('../common'); -common.skipIfReportDisabled(); const assert = require('assert'); const { Worker } = require('worker_threads'); const { once } = require('events'); diff --git a/test/report/test-report-writereport.js b/test/report/test-report-writereport.js index a72744fcd4fcb7..50514c68373d15 100644 --- a/test/report/test-report-writereport.js +++ b/test/report/test-report-writereport.js @@ -1,9 +1,7 @@ -// Flags: --experimental-report 'use strict'; // Test producing a report via API call, using the no-hooks/no-signal interface. -const common = require('../common'); -common.skipIfReportDisabled(); +require('../common'); const assert = require('assert'); const { spawnSync } = require('child_process'); const fs = require('fs'); @@ -11,9 +9,6 @@ const path = require('path'); const helper = require('../common/report'); const tmpdir = require('../common/tmpdir'); -common.expectWarning('ExperimentalWarning', - 'report is an experimental feature. This feature could ' + - 'change at any time'); tmpdir.refresh(); process.report.directory = tmpdir.path; @@ -93,8 +88,7 @@ function validate() { { // Test the special "stdout" filename. - const args = ['--experimental-report', '-e', - 'process.report.writeReport("stdout")']; + const args = ['-e', 'process.report.writeReport("stdout")']; const child = spawnSync(process.execPath, args, { cwd: tmpdir.path }); assert.strictEqual(child.status, 0); assert.strictEqual(child.signal, null); @@ -104,8 +98,7 @@ function validate() { { // Test the special "stderr" filename. - const args = ['--experimental-report', '-e', - 'process.report.writeReport("stderr")']; + const args = ['-e', 'process.report.writeReport("stderr")']; const child = spawnSync(process.execPath, args, { cwd: tmpdir.path }); assert.strictEqual(child.status, 0); assert.strictEqual(child.signal, null); @@ -118,8 +111,7 @@ function validate() { { // Test the case where the report file cannot be opened. const reportDir = path.join(tmpdir.path, 'does', 'not', 'exist'); - const args = ['--experimental-report', - `--report-directory=${reportDir}`, + const args = [`--report-directory=${reportDir}`, '-e', 'process.report.writeReport()']; const child = spawnSync(process.execPath, args, { cwd: tmpdir.path });