From e30b119194266c9dca83ff84c118c48b749b87c7 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 26 Apr 2019 15:14:47 -0400 Subject: [PATCH 1/4] test: document NODE_TEST_KNOWN_GLOBALS PR-URL: https://github.com/nodejs/node/pull/27434 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca --- test/common/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/common/README.md b/test/common/README.md index 0542c38bbcb419..0c8455dd28a21e 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -9,6 +9,7 @@ This directory contains modules used to test the Node.js implementation. * [Countdown module](#countdown-module) * [DNS module](#dns-module) * [Duplex pair helper](#duplex-pair-helper) +* [Environment variables](#environment-variables) * [Fixtures module](#fixtures-module) * [Heap dump checker module](#heap-dump-checker-module) * [HTTP2 module](#http2-module) @@ -495,6 +496,17 @@ which returns an object `{ clientSide, serverSide }` where each side is a There is no difference between client or server side beyond their names. +## Environment variables + +The behavior of the Node.js test suite can be altered using the following +environment variables. + +### NODE_TEST_KNOWN_GLOBALS + +A comma-separated list of variables names that are appended to the global +variable whitelist. Alternatively, if `NODE_TEST_KNOWN_GLOBALS` is set to `'0'`, +global leak detection is disabled. + ## Fixtures Module The `common/fixtures` module provides convenience methods for working with From 0abc05bdb55e2e119a45a92d398c7729532f0d0b Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 26 Apr 2019 15:21:18 -0400 Subject: [PATCH 2/4] test: document NODE_SKIP_FLAG_CHECK PR-URL: https://github.com/nodejs/node/pull/27434 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca --- test/common/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/common/README.md b/test/common/README.md index 0c8455dd28a21e..f32d9eb91a72f1 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -501,6 +501,10 @@ There is no difference between client or server side beyond their names. The behavior of the Node.js test suite can be altered using the following environment variables. +### NODE_SKIP_FLAG_CHECK + +If set, command line arguments passed to individual tests are not validated. + ### NODE_TEST_KNOWN_GLOBALS A comma-separated list of variables names that are appended to the global From affcbd68886f6e5bf0c70de48f2f54593d1a492a Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 26 Apr 2019 15:35:12 -0400 Subject: [PATCH 3/4] test: document report helper module PR-URL: https://github.com/nodejs/node/pull/27434 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca --- test/common/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/common/README.md b/test/common/README.md index f32d9eb91a72f1..66cb3966075f34 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -14,6 +14,7 @@ This directory contains modules used to test the Node.js implementation. * [Heap dump checker module](#heap-dump-checker-module) * [HTTP2 module](#http2-module) * [Internet module](#internet-module) +* [Report module](#report-module) * [tick module](#tick-module) * [tmpdir module](#tmpdir-module) * [WPT module](#wpt-module) @@ -796,6 +797,33 @@ a full `setImmediate()` invocation passes. `listener` is an object to make it easier to use a closure; the target object should not be in scope when `listener.ongc()` is created. +## Report Module + +The `report` module provides helper functions for testing diagnostic reporting +functionality. + +### findReports(pid, dir) + +* `pid` [<number>] Process ID to retrieve diagnostic report files for. +* `dir` [<string>] Directory to search for diagnostic report files. +* return [<Array>] + +Returns an array of diagnotic report file names found in `dir`. The files should +have been generated by a process whose PID matches `pid`. + +### validate(report) + +* `report` [<string>] Diagnostic report file name to validate. + +Validates the schema of a diagnostic report file whose path is specified in +`report`. If the report fails validation, an exception is thrown. + +### validateContent(data) + +* `data` [<string>] Contents of a diagnostic report file. + +Validates the schema of a diagnostic report whose content is specified in +`data`. If the report fails validation, an exception is thrown. ## tick Module From 5f6438f62537779eff6402688cbe7ef30b63202e Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 26 Apr 2019 15:41:57 -0400 Subject: [PATCH 4/4] test: add missing ToC entries These modules were already documented, but not included in the table of contents. PR-URL: https://github.com/nodejs/node/pull/27434 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca --- test/common/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/common/README.md b/test/common/README.md index 66cb3966075f34..f62ad2bb816441 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -4,6 +4,7 @@ This directory contains modules used to test the Node.js implementation. ## Table of Contents +* [ArrayStream module](#arraystream-module) * [Benchmark module](#benchmark-module) * [Common module API](#common-module-api) * [Countdown module](#countdown-module) @@ -12,8 +13,10 @@ This directory contains modules used to test the Node.js implementation. * [Environment variables](#environment-variables) * [Fixtures module](#fixtures-module) * [Heap dump checker module](#heap-dump-checker-module) +* [hijackstdio module](#hijackstdio-module) * [HTTP2 module](#http2-module) * [Internet module](#internet-module) +* [ongc module](#ongc-module) * [Report module](#report-module) * [tick module](#tick-module) * [tmpdir module](#tmpdir-module)