summaryrefslogtreecommitdiff
path: root/test/common
AgeCommit message (Collapse)Author
2018-08-27src: move process.binding('async_wrap') internalDaniel Bevenius
This commit makes the async_wrap builtin an internal builtin, and changes usage of the builtin from using process.binding('async_wrap') to use internalBinding instead. Refs: https://github.com/nodejs/node/issues/22160 PR-URL: https://github.com/nodejs/node/pull/22469 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-24test: move common.isCPPSymbolsNotMapped to tick-processor testsJames M Snell
`common.isCPPSymbolsNotMapped` is used only by the tests in the `test/tick-processor` folder. Move it local to those to get it out of `common`. PR-URL: https://github.com/nodejs/node/pull/22459 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-08-24test: move common.onGC to individual moduleJames M Snell
Incrementally making `require('../common')` less of a monolith. Move the `common.onGC()` utility to a separate standalone module that is only imported when it's actually needed. PR-URL: https://github.com/nodejs/node/pull/22446 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-24test: move hijackstdio out of require('common')James M Snell
Move the hijackstdio functions out of common so that they are imported only into the tests that actually need them PR-URL: https://github.com/nodejs/node/pull/22462 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-08-24src: move process.binding('tcp_wrap') to internalDaniel Bevenius
This commit makes the tcp_wrap builtin an internal builtin, and changes usage of the builtin from using process.binding('tcp_wrap') to use internalBinding instead. Refs: https://github.com/nodejs/node/issues/22160 PR-URL: https://github.com/nodejs/node/pull/22432 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-23test: move common.ArrayStream to separate moduleJames M Snell
In a continuing effort to de-monolithize `require('../common')`, move `common.ArrayStream` out to a separate module that is imported only when it is needed. PR-URL: https://github.com/nodejs/node/pull/22447 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-08-23test: remove isGlibc from commonJames M Snell
The `common.isGlibc()` function is called exactly once from only one test. There's no reason for it to be in `require('../common')` at the current time. If it ends up needing to be used by multiple tests, it can easily be moved into it's own common sub-module (e.g. `require('../common/isglibc')` ... for now tho, just move it into the one test that uses it and simplify the implementation a bit to remove unnecessary caching. PR-URL: https://github.com/nodejs/node/pull/22443 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-08-19src: implement the new EmbedderGraph::AddEdge()Joyee Cheung
The signature of EmbedderGraph::AddEdge() has been changed so the current implementation of JSGraph no longer compiles. This patch updates the implementation accordingly. PR-URL: https://github.com/nodejs/node/pull/22106 Refs: https://github.com/v8/v8/commit/6ee834532d6f924f6057584085fa79b4777c396a Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-13test: remove common.hasTracingRich Trott
`common.hasTracing` is only used in one place. `common` is bloated so let's move that to the one test that uses it. `hasTracing` is undocumented so there's no need to remove it from the README file as it's not there in the first place. Similarly, it's not included in the .mjs version of the `common` file. PR-URL: https://github.com/nodejs/node/pull/22250 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-08-12test,doc: wrap common module md doc at 80 charsRich Trott
In preparation for markdown linting of files in the `test` directory, make sure all lines in `test/common/README.md` are no more than 80 characters long. PR-URL: https://github.com/nodejs/node/pull/22221 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
2018-08-09test: don't mask descriptor.enumerableThomas Leah
PR-URL: https://github.com/nodejs/node/pull/22172 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-08-08test: remove common.fileExists()Rich Trott
common.fileExists() can be replaced with fs.existsSync(). PR-URL: https://github.com/nodejs/node/pull/22151 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-08-04test: run ESM tests in parallelMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/21919 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-01test: pass through stderr in benchmark testsAnna Henningsen
This helps a lot with debugging failing benchmark tests, which would otherwise just print an assertion for the exit code (something like `+1 -0`, which yields almost no information about a failure). PR-URL: https://github.com/nodejs/node/pull/21860 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
2018-07-19test: make crashOnUnhandleRejection opt-outMichaël Zasso
This commit removes `common.crashOnUnhandledRejection()` and adds `common.disableCrashOnUnhandledRejection()`. To reduce the risk of mistakes and make writing tests that involve promises simpler, always install the unhandledRejection hook in tests and provide a way to disable it for the rare cases where it's needed. PR-URL: https://github.com/nodejs/node/pull/21849 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-16test: add gc tracking to common APIAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/21794 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-15test: add heap snapshot testsAnna Henningsen
Add a number of tests that validate that heap snapshots contain what we expect them to contain, and cross-check against a JS version of our own embedder graphs. PR-URL: https://github.com/nodejs/node/pull/21741 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-07-07inspector: expose original consoleMatteo Collina
Adds require('inspector').console, mapping it to the original global.console of V8. This enables applications to send messages to the inspector console programmatically. Fixes: https://github.com/nodejs/node/issues/21651 PR-URL: https://github.com/nodejs/node/pull/21659 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-30esm: loader hook URL validation and error messagesguybedford
PR-URL: https://github.com/nodejs/node/pull/21352 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-06-24src: refactor timers to remove TimerWrapAnatoli Papirovski
Refactor Timers to behave more similarly to Immediates by having a single uv_timer_t handle which is stored on the Environment. No longer expose timers in a public binding and instead make it part of the internalBinding. PR-URL: https://github.com/nodejs/node/pull/20894 Fixes: https://github.com/nodejs/node/issues/10154 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-06-19test: check that benchmark tests are minimalRich Trott
Check that benchmark tests are not running longer than necessary by confirming that they only produce one set of configs to report on per benchmark file. PR-URL: https://github.com/nodejs/node/pull/21046 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-13worker,src: display remaining handles if `uv_loop_close` failsAnna Henningsen
Right now, we crash the process if there are handles remaining on the event loop when we exit (except for the main thread). This does not provide a lot of information about causes, though; in particular, we don’t show which handles are pending and who own them. This patch adds debug output to these cases to help with the situation. PR-URL: https://github.com/nodejs/node/pull/21238 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-12test: add regression test for nghttp2 CVE-2018-1000168James M Snell
PR-URL: https://github.com/nodejs-private/node-private/pull/117 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
2018-06-12test: add tls write error regression testShigeki Ohtsu
Add a mock TLS socket implementation and a regression test for the previous commit. Refs: https://github.com/nodejs-private/security/issues/189 PR-URL: https://github.com/nodejs-private/node-private/pull/127 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Evan Lucas <evanlucas@me.com>
2018-06-06worker: rename to worker_threadsAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-06-06test,tools: enable running tests under workersAnna Henningsen
Enable running tests inside workers by passing `--worker` to `tools/test.py`. A number of tests are marked as skipped, or have been slightly altered to fit the different environment. PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-06-04test: make handling of noWarnCode stricterTobias Nießen
This change requires all expected warnings to be specified along with their respective code and will raise an error if the code does not match. This also kind of fixes the behavior when the expected warning code was noWarnCode and there is an actual warning code. PR-URL: https://github.com/nodejs/node/pull/21075 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-05-19test: remove common.globalCheckRuben Bridgewater
This flag is partially used in tests where it was not necessary and it is always possible to replace this flag with `common.allowGlobals`. This makes sure all globals are truly tested for. PR-URL: https://github.com/nodejs/node/pull/20717 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-19test: remove untested knownGlobalsRuben Bridgewater
These values are all non-enumerable and will never be checked. By removing them, we make sure they will not become enumerable unnoticed. PR-URL: https://github.com/nodejs/node/pull/20717 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-08tools: add eslint check for skipIfEslintMissingRichard Lau
Add a custom eslint rule to check for `common.skipIfEslintMissing()` to allow tests to run from source tarballs that do not include eslint. Fix up rule tests that were failing the new check. Refs: https://github.com/nodejs/node/issues/20336 PR-URL: https://github.com/nodejs/node/pull/20372 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-05test: fix common.canCreateSymLink() on non-WindowsMasashi Hirano
test/common/README.md indicates that canCreateSymlink() always returns true on non-Windows platforms. However, prior to this commit, undefined was being returned. This commit aligns the implementation with the docs by returning true. PR-URL: https://github.com/nodejs/node/pull/20511 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-29test: verify arguments length in common.expectsErrorRuben Bridgewater
If `common.expectsError` is used as a callback, it will now also verify that there is only one argument (the expected error). PR-URL: https://github.com/nodejs/node/pull/20311 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-26inspector: allow concurrent inspector sessionsEugene Ostroukhov
This change enables concurrent inspector sessions, through WebSocket interface as well as JS interface, in any combination. PR-URL: https://github.com/nodejs/node/pull/20137 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-04-23test: improve common.expectsErrorRuben Bridgewater
The output is now improved by showing most properties all at once. Besides that this adds a warning to use `assert.throws` instead due to a better output. PR-URL: https://github.com/nodejs/node/pull/19797 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-04-18doc: fix misplaced entries in test/common docRich Trott
One entry is placed in the wrong module and other entries are not in alphabetical order. PR-URL: https://github.com/nodejs/node/pull/20117 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2018-04-17trace_events: adds a new trace_events apiJames M Snell
Removes the requirement to use `--trace-events-enabled` to enable trace events. Tracing is enabled automatically if there are any enabled categories. Adds a new `trace_events` module with an API for enabling/disabling trace events at runtime without a command line flag. ```js const trace_events = require('trace_events'); const categories = [ 'node.perf', 'node.async_hooks' ]; const tracing = trace_events.createTracing({ categories }); tracing.enable(); // do stuff tracing.disable(); ``` Multiple `Tracing` objects may exist and be enabled at any point in time. The enabled trace event categories is the union of all enabled `Tracing` objects and the `--trace-event-categories` flag. PR-URL: https://github.com/nodejs/node/pull/19803 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-04-06test: fix multiple expectedWarnings bugDaniel Bevenius
Commit 8fb4ea9f75 ("test: add deprecation code to expectWarning") did not take into account that the same warning could be expected multiple times. This bug was discovered in https://github.com/nodejs/node/pull/18138 and this commit adds a fix for this issue. PR-URL: https://github.com/nodejs/node/pull/19766 Refs: https://github.com/nodejs/node/pull/18138 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-05errors: make message non-enumerableRuben Bridgewater
A error message should always be non-enumerable. This makes sure that is true for dns errors as well. It also adds another check in `common.expectsError` to make sure no other regressions are introduced going forward. Fixes #19716 PR-URL: https://github.com/nodejs/node/pull/19719 Fixes: https://github.com/nodejs/node/issues/19716 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-05test: add info option to common.expectsErrorJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/19514 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-04test: check all properties in common.expectsErrorRuben Bridgewater
This makes sure all properties that are meant to be checked will actually be tested for. PR-URL: https://github.com/nodejs/node/pull/19722 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-02inspector: report client-visible host and portEugene Ostroukhov
Node instance may not know the real host and port user sees when debug frontend connects through the SSH tunnel. This change fixes '/json/list' response by using the value client provided in the host header. PR-URL: https://github.com/nodejs/node/pull/19664 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-04-01tools: add 'spaced-comment' into eslint rulesWeijia Wang
PR-URL: https://github.com/nodejs/node/pull/19596 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-03-26test: add deprecation code to expectWarningDaniel Bevenius
This commit adds a deprecation code to expectWarning and updates the function to check the passed code against the code property on the warning object. Not all warnings have a deprecation code so for those that don't an explicit code of common.noWarnCode is required. Passing this skips the assertion of the code. PR-URL: https://github.com/nodejs/node/pull/19474 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-03-11test: fix test-abort-backtrace in shared lib buildYihong Wang
When using shared lib build, the binary path in the stack frames points to shared lib. Change the checking criteria in the test case to match that. Refs: https://github.com/nodejs/node/issues/18535 Signed-off-by: Yihong Wang <yh.wang@ibm.com> PR-URL: https://github.com/nodejs/node/pull/19213 Refs: https://github.com/nodejs/node/issues/18535 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-04lib,test: remove yoda statementsRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/18746 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-01src: Remove lttng support.Glen Keane
This cleans up and removes lttng support completely. Recent discussion on a PR to deprecate lttng suggested that we remove it completely pending feedback from the TSC. This should be considered a non breaking change, as a recent PR reveals that compiling with this system has been broken for nearly two years. Refs: https://github.com/nodejs/node/issues/18971 Refs: https://github.com/nodejs/node/pull/18975 Refs: https://github.com/nodejs/node/pull/18945 PR-URL: https://github.com/nodejs/node/pull/18982 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-22test: introduce common.runWithInvalidFD()Joyee Cheung
This provides a more reliable way to get a fd that can be used to tirgger EBADF. PR-URL: https://github.com/nodejs/node/pull/18864 Fixes: https://github.com/nodejs/node/issues/18820 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-22doc: lowercase primitives in test/common/README.mdVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/18875 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-21test: check symbols in shared libYihong Wang
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: https://github.com/nodejs/node/issues/18535 Signed-off-by: Yihong Wang <yh.wang@ibm.com> PR-URL: https://github.com/nodejs/node/pull/18806 Refs: https://github.com/nodejs/node/issues/18535 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-20lint: move eslint to new plugin systemGus Caplan
PR-URL: https://github.com/nodejs/node/pull/18566 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>